WebKit Bugzilla
Attachment 338885 Details for
Bug 185030
: Token misspelled "tocken" in error message string
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix typo "tocken" => "token" in SyntaxError message string
0001-Fix-typo-tocken-token-in-SyntaxError-message-string.patch (text/plain), 131.43 KB, created by
Rick Waldron
on 2018-04-26 10:11:57 PDT
(
hide
)
Description:
Fix typo "tocken" => "token" in SyntaxError message string
Filename:
MIME Type:
Creator:
Rick Waldron
Created:
2018-04-26 10:11:57 PDT
Size:
131.43 KB
patch
obsolete
>From 5604b9757e466f84a565462cb7e4fd89ebf0be38 Mon Sep 17 00:00:00 2001 >From: Rick Waldron <waldron.rick@gmail.com> >Date: Thu, 26 Apr 2018 13:08:52 -0400 >Subject: [PATCH] Fix typo "tocken" => "token" in SyntaxError message string > >--- > .../test/Basics/IdsWithEscapes.baseline-jsc | 16 +- > JSTests/ChangeLog | 101 ++++--- > JSTests/stress/destructuring-assignment-syntax.js | 10 +- > ...or-messages-for-in-operator-should-not-crash.js | 6 +- > JSTests/stress/reserved-word-with-escape.js | 124 ++++---- > Source/JavaScriptCore/ChangeLog | 322 ++++++++++++--------- > Source/JavaScriptCore/parser/Parser.cpp | 204 ++++++------- > Tools/ChangeLog | 43 +-- > Tools/Scripts/test262/test262-expectations.yaml | 8 +- > 9 files changed, 452 insertions(+), 382 deletions(-) > >diff --git a/JSTests/ChakraCore/test/Basics/IdsWithEscapes.baseline-jsc b/JSTests/ChakraCore/test/Basics/IdsWithEscapes.baseline-jsc >index 18d60c5dab..9f5b948975 100644 >--- a/JSTests/ChakraCore/test/Basics/IdsWithEscapes.baseline-jsc >+++ b/JSTests/ChakraCore/test/Basics/IdsWithEscapes.baseline-jsc >@@ -3,20 +3,20 @@ > 20 > 20 > ReferenceError: Can't find variable: hello2 >-SyntaxError: Unexpected escaped characters in keyword tocken: 'fals\u0065' >-SyntaxError: Unexpected escaped characters in keyword tocken: 'fals\u0065' >-SyntaxError: Unexpected escaped characters in keyword tocken: 'tru\u0065' >+SyntaxError: Unexpected escaped characters in keyword token: 'fals\u0065' >+SyntaxError: Unexpected escaped characters in keyword token: 'fals\u0065' >+SyntaxError: Unexpected escaped characters in keyword token: 'tru\u0065' > SyntaxError: Unexpected keyword 'var' >-SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u0061r' >+SyntaxError: Unexpected escaped characters in keyword token: 'v\u0061r' > SyntaxError: Unexpected keyword 'else' >-SyntaxError: Unexpected escaped characters in keyword tocken: 'els\u0065' >+SyntaxError: Unexpected escaped characters in keyword token: 'els\u0065' > SyntaxError: Cannot use the keyword 'false' as a variable name. > SyntaxError: Cannot use the keyword 'var' as a variable name. >-SyntaxError: Unexpected escaped characters in keyword tocken: 'fals\u0065' >-SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u0061r' >+SyntaxError: Unexpected escaped characters in keyword token: 'fals\u0065' >+SyntaxError: Unexpected escaped characters in keyword token: 'v\u0061r' > 10 > 10 > 10 > 10 > SyntaxError: Cannot use the keyword 'else' as a function name. >-SyntaxError: Unexpected escaped characters in keyword tocken: 'els\u0065' >+SyntaxError: Unexpected escaped characters in keyword token: 'els\u0065' >diff --git a/JSTests/ChangeLog b/JSTests/ChangeLog >index 461f6d606c..f6dcc55b6e 100644 >--- a/JSTests/ChangeLog >+++ b/JSTests/ChangeLog >@@ -1,3 +1,18 @@ >+2018-04-26 Rick Waldron <waldron.rick@gmail.com> >+ >+ Token misspelled "tocken" in error message string >+ https://bugs.webkit.org/show_bug.cgi?id=185030 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * ChakraCore/test/Basics/IdsWithEscapes.baseline-jsc: Fix typo "tocken" => "token" >+ * stress/destructuring-assignment-syntax.js: Fix typo "tocken" => "token" >+ * stress/error-messages-for-in-operator-should-not-crash.js: Fix typo "tocken" => "token" >+ * stress/reserved-word-with-escape.js: Fix typo "tocken" => "token" >+ (testSyntaxError.String.raw.v): >+ (String.raw.SyntaxError.Cannot.use.the.keyword.string_appeared_here.as.a.name): >+ (testSyntaxError.String.raw.a): >+ > 2018-04-25 Robin Morisset <rmorisset@apple.com> > > In FTLLowerDFGToB3.cpp::compileCreateRest, always use a contiguous array as the indexing type when under isWatchingHavingABadTimeWatchpoint >@@ -372,7 +387,7 @@ > https://bugs.webkit.org/show_bug.cgi?id=184440 > > Reviewed by Saam Barati. >- >+ > Add tests for all of the bugs I fixed. > > * stress/direct-arguments-out-of-bounds-change-structure.js: Added. >@@ -716,7 +731,7 @@ > https://bugs.webkit.org/show_bug.cgi?id=183863 > > Reviewed by Mark Lam. >- >+ > Adds another stress test of scoped arguments. > > * stress/scoped-arguments-test.js: Added. >@@ -1267,7 +1282,7 @@ > https://bugs.webkit.org/show_bug.cgi?id=182656 > > Reviewed by Saam Barati. >- >+ > Tests the policy. > > * stress/gc-error-stack.js: Added. Shows that the GC forgets frames now. >@@ -3524,7 +3539,7 @@ > https://bugs.webkit.org/show_bug.cgi?id=177586 > > Reviewed by JF Bastien. >- >+ > Add tests for when Gigacage gets runtime disabled. > > * stress/disable-gigacage-arrays.js: Added. >@@ -3646,7 +3661,7 @@ > https://bugs.webkit.org/show_bug.cgi?id=177586 > > Reviewed by JF Bastien. >- >+ > Add tests for when Gigacage gets runtime disabled. > > * stress/disable-gigacage-arrays.js: Added. >@@ -3759,7 +3774,7 @@ > https://bugs.webkit.org/show_bug.cgi?id=177586 > > Reviewed by JF Bastien. >- >+ > Add tests for when Gigacage gets runtime disabled. > > * stress/disable-gigacage-arrays.js: Added. >@@ -5011,7 +5026,7 @@ > * stress/super-get-by-id.js: > ClassDeclaration when evaled no longer produce values. Convert > these to ClassExpressions so they produce the class value. >- >+ > * ChakraCore/test/GlobalFunctions/evalreturns3.baseline-jsc: > This is a progression for currect spec behavior. > >@@ -5127,7 +5142,7 @@ > 2017-08-31 Filip Pizlo <fpizlo@apple.com> > > Unreviewed, skipping slow tests. >- >+ > These tests are now timing out. They would have always been slow. The timeouts are probably because OOMs > work differently now. > >@@ -5817,7 +5832,7 @@ > > Reviewed by Yusuke Suzuki. > >- Add @skip parameters to tests, and remove test for async iterator from >+ Add @skip parameters to tests, and remove test for async iterator from > async await syntax test because it is already covered by async-iterator-syntax.js > > * stress/async-await-syntax.js: >@@ -6426,7 +6441,7 @@ > * stress/super-get-by-id.js: > ClassDeclaration when evaled no longer produce values. Convert > these to ClassExpressions so they produce the class value. >- >+ > * ChakraCore/test/GlobalFunctions/evalreturns3.baseline-jsc: > This is a progression for currect spec behavior. > >@@ -7497,7 +7512,7 @@ > https://bugs.webkit.org/show_bug.cgi?id=172302 > > Reviewed by Saam Barati. >- >+ > This tests all three kinds of constructs in BytecodeGenerator. All three were previously > wrong. > >@@ -7723,7 +7738,7 @@ > https://bugs.webkit.org/show_bug.cgi?id=171801 > > Reviewed by Michael Saboff. >- >+ > These tests used to crash. The prefix and postfix tests cover different paths, except > postfix-ignored goes down the same path as prefix due to an optimization. > >@@ -8573,7 +8588,7 @@ > https://bugs.webkit.org/show_bug.cgi?id=164108 > > Reviewed by Saam Barati. >- >+ > Added a fairly comprehensive test of the intrinsics. This creates a function for each possible > combination of type and operation, and then first uses it nicely and then tries a bunch of > erroneous conditions like OOB. >@@ -8716,7 +8731,7 @@ > https://bugs.webkit.org/show_bug.cgi?id=170958 > > Reviewed by Keith Miller. >- >+ > Add the ability to skip tests easily. Skip the test. > > * wasm.yaml: >@@ -8983,7 +8998,7 @@ > Added JSC baseline and enabled defineIndexProperty test. > > Note that JSC differs from Chakra in that a JSC doesn't use indexed >- properties placed on the Array prototype when sorting the indexed >+ properties placed on the Array prototype when sorting the indexed > properties of an Object. This is behavior is considered undefined > in the standard. > >@@ -11293,7 +11308,7 @@ > https://bugs.webkit.org/show_bug.cgi?id=169656 > > Reviewed by Geoffrey Garen and Saam Barati. >- >+ > Added basic performance tests of global and eval code. These tests will run a lot faster in with > the FTL because of the object allocation. > >@@ -11371,7 +11386,7 @@ > https://bugs.webkit.org/show_bug.cgi?id=169519 > > Reviewed by Mark Lam. >- >+ > This benchmark runs 3.5x faster thanks to this patch. > > * microbenchmarks/strict-arguments-no-escape.js: Added. >@@ -11835,7 +11850,7 @@ > https://bugs.webkit.org/show_bug.cgi?id=167737 > > Reviewed by Keith Miller. >- >+ > Add versions of splay that flash heap access, to simulate what might happen if a third-party app > was running concurrent GC. In this case, we might actually start the collector thread. > >@@ -12024,7 +12039,7 @@ > https://bugs.webkit.org/show_bug.cgi?id=167737 > > Reviewed by Keith Miller. >- >+ > Add versions of splay that flash heap access, to simulate what might happen if a third-party app > was running concurrent GC. In this case, we might actually start the collector thread. > >@@ -12259,7 +12274,7 @@ > https://bugs.webkit.org/show_bug.cgi?id=167676 > > Reviewed by Saam Barati. >- >+ > The microbenchmarks directory is profitable when it's cheap to run. This change moves very slow > tests (>=200ms running time on my machine) and puts them in JSTests/slowMicrobenchmarks instead. > That directory is run only through `slow!; defaultQuickRun` and is not run by run-jsc-benchmarks. >@@ -12390,7 +12405,7 @@ > https://bugs.webkit.org/show_bug.cgi?id=167431 > > Reviewed by Saam Barati. >- >+ > Add a very basic test of Atomics using $.agent. This is based on > LayoutTests/workers/sab/simple.html. > >@@ -12493,7 +12508,7 @@ > https://bugs.webkit.org/show_bug.cgi?id=165760 > > Reviewed by Geoffrey Garen. >- >+ > Added this test, which demonstrates the benefit of having a dedicated string subspace. > > * microbenchmarks/stringalloc.js: Added. >@@ -13154,11 +13169,11 @@ > > This patch implements the Wasm spec's tests found here: > https://github.com/WebAssembly/spec/tree/master/interpreter/test >- >+ > These tests are in .wast s-epxression format. To convert > them to JS, I use a script from the wabt library, found here: > https://github.com/WebAssembly/wabt/blob/master/test/run-gen-spec-js.py >- >+ > I also added a script that automatically imports the tests as > JS files. The inputs to the script is the path to the Wasm spec > git repo and the path to the wabt git repo. This will make importing >@@ -14545,7 +14560,7 @@ > > 2016-12-05 Caitlin Potter <caitp@igalia.com> > >- [JSC] report unexpected token when "async" is followed by identifier >+ [JSC] report unexpected token when "async" is followed by identifier > https://bugs.webkit.org/show_bug.cgi?id=165091 > > Reviewed by Mark Lam. >@@ -15698,7 +15713,7 @@ > https://bugs.webkit.org/show_bug.cgi?id=164309 > > Reviewed by Saam Barati. >- >+ > This test demonstrates why the DFG needs to recognize the shadow value of a Phi. > > * stress/dfg-ssa-swap.js: Added. >@@ -15723,7 +15738,7 @@ > https://bugs.webkit.org/show_bug.cgi?id=164309 > > Reviewed by Saam Barati. >- >+ > This test demonstrates why the DFG needs to recognize the shadow value of a Phi. > > * stress/dfg-ssa-swap.js: Added. >@@ -15860,7 +15875,7 @@ > https://bugs.webkit.org/show_bug.cgi?id=163986 > > Reviewed by Keith Miller. >- >+ > This adds our own test for the various corner cases of SharedArrayBuffer. This test is meant to > check all of the things that don't require concurrency. > >@@ -16508,7 +16523,7 @@ > https://bugs.webkit.org/show_bug.cgi?id=163371 > > Reviewed by Geoffrey Garen and Saam Barati. >- >+ > Add microbenchmarks for all of the cases that this patch optimizes. > > * microbenchmarks/direct-call-arity-mismatch.js: Added. >@@ -17261,7 +17276,7 @@ > https://bugs.webkit.org/show_bug.cgi?id=161581 > > Reviewed by Geoffrey Garen. >- >+ > Add a microbenchmark for why we want to reclaim empty blocks from other allocators. > > * microbenchmarks/switching-size-classes.js: Added. >@@ -17821,7 +17836,7 @@ > https://bugs.webkit.org/show_bug.cgi?id=160125 > > Reviewed by Geoffrey Garen and Keith Miller. >- >+ > Most of the things I did properly covered by existing tests, but I found some simple cases of > unshifting that had sketchy coverage. > >@@ -17855,24 +17870,24 @@ > variations of tests. The runtest.py driver consults rlexe.xml files in each test > subdirectory to determine the test to run, the options to pass to the test and how to > determine pass/fail of the test. With runtests.py as the start, tests that didn't >- pass directly where either skipped, with a message describing why or through >+ pass directly where either skipped, with a message describing why or through > adjustments to the test infrastructure, as described below, where made to pass. >- >+ > The only modification to the test infrastrucutre are: > > 1) Added simple mapping of Chakra expected exception text to JSC expected text in > test/UnitTestFramework/UnitTestFramework.js. It would make sense to also > map some JSC specific exception text to more generic text for the cases where > that text contains indetifier names or other source specific strings and the >- Chakra equivolent exception texts are generic. >- >+ Chakra equivolent exception texts are generic. >+ > 2) Created JSC specific expected text files where it is clear that the text work > as expected on JSC but the test output is different. Typically the differences > fall into three categories, different exception output, different output from > toString() of a function, slight numeric differences, and test that rely on > iteration order. > >- 3) Stripped the CR's from the CR-LF line terminations of the files. >+ 3) Stripped the CR's from the CR-LF line terminations of the files. > > No actual test .js files were modified. > >@@ -17946,7 +17961,7 @@ > https://bugs.webkit.org/show_bug.cgi?id=161492 > > Reviewed by Mark Lam. >- >+ > This bug affected function->activation references but not object->object field references, > because object->object field references are !neededForMaterialization(). So, the object > test always passed but the activation/function test used to always fail. It passes now. >@@ -18160,7 +18175,7 @@ > https://bugs.webkit.org/show_bug.cgi?id=160125 > > Reviewed by Geoffrey Garen. >- >+ > Most of the things I did properly covered by existing tests, but I found some simple cases of > unshifting that had sketchy coverage. > >@@ -18975,8 +18990,8 @@ > > Reviewed by Saam Barati. > >- Patch contains fix statuses of specs in the test262 test collection after implementation of >- Object.values and Object.entries functions. Also patch contains small fixes in tests of the >+ Patch contains fix statuses of specs in the test262 test collection after implementation of >+ Object.values and Object.entries functions. Also patch contains small fixes in tests of the > tests for Object.values/entries functions. > > * stress/object-entries.js: >@@ -19003,10 +19018,10 @@ > > Reviewed by Saam Barati. > >- Patch contains tests for Object.entries function and >+ Patch contains tests for Object.entries function and > fix of wrong tests for Object.values function. > >- * stress/object-entries.js: >+ * stress/object-entries.js: > (compare): > (string_appeared_here.forEach): > (const.getInvokedFunctions.): >@@ -19213,7 +19228,7 @@ > https://bugs.webkit.org/show_bug.cgi?id=160479 > > Reviewed by Mark Lam. >- >+ > Added a stress test for this case, since we don't always run test262. > > * stress/freeze-setter.js: Added. >diff --git a/JSTests/stress/destructuring-assignment-syntax.js b/JSTests/stress/destructuring-assignment-syntax.js >index 5808fd24d4..4567da25e2 100644 >--- a/JSTests/stress/destructuring-assignment-syntax.js >+++ b/JSTests/stress/destructuring-assignment-syntax.js >@@ -47,16 +47,16 @@ testSyntax("[{prop: 1}.prop] = []"); > testSyntaxError("[...c = 1] = []", "SyntaxError: Unexpected token '='. Expected a closing ']' following a rest element destructuring pattern."); > testSyntaxError("[...c, d] = []", "SyntaxError: Unexpected token ','. Expected a closing ']' following a rest element destructuring pattern."); > testSyntaxError("[this] = []", "SyntaxError: Invalid destructuring assignment target."); >-testSyntaxError("[th\\u{69}s] = []", "SyntaxError: Unexpected escaped characters in keyword tocken: 'th\\u{69}s'"); >+testSyntaxError("[th\\u{69}s] = []", "SyntaxError: Unexpected escaped characters in keyword token: 'th\\u{69}s'"); > testSyntaxError("[function() {}] = []", "SyntaxError: Invalid destructuring assignment target."); > testSyntaxError("['string'] = []", "SyntaxError: Invalid destructuring assignment target."); > testSyntaxError("[123] = []", "SyntaxError: Invalid destructuring assignment target."); > testSyntaxError("[true] = []", "SyntaxError: Invalid destructuring assignment target."); >-testSyntaxError("[tru\\u0065] = []", "SyntaxError: Unexpected escaped characters in keyword tocken: 'tru\\u0065'"); >+testSyntaxError("[tru\\u0065] = []", "SyntaxError: Unexpected escaped characters in keyword token: 'tru\\u0065'"); > testSyntaxError("[false] = []", "SyntaxError: Invalid destructuring assignment target."); >-testSyntaxError("[f\\u0061lse] = []", "SyntaxError: Unexpected escaped characters in keyword tocken: 'f\\u0061lse'"); >+testSyntaxError("[f\\u0061lse] = []", "SyntaxError: Unexpected escaped characters in keyword token: 'f\\u0061lse'"); > testSyntaxError("[null] = []", "SyntaxError: Invalid destructuring assignment target."); >-testSyntaxError("[n\\u{75}ll] = []", "SyntaxError: Unexpected escaped characters in keyword tocken: 'n\\u{75}ll'"); >+testSyntaxError("[n\\u{75}ll] = []", "SyntaxError: Unexpected escaped characters in keyword token: 'n\\u{75}ll'"); > > testSyntaxError("'use strict'; ({ eval } = {})", "SyntaxError: Cannot modify 'eval' in strict mode."); > testSyntaxError("'use strict'; ({ eval = 0 } = {})", "SyntaxError: Cannot modify 'eval' in strict mode."); >@@ -69,4 +69,4 @@ testSyntaxError("'use strict'; ({ a: arguments = 0 } = {})", "SyntaxError: Canno > testSyntaxError("'use strict'; ([ eval ] = [])", "SyntaxError: Cannot modify 'eval' in strict mode."); > testSyntaxError("'use strict'; ([ eval = 0 ] = [])", "SyntaxError: Cannot modify 'eval' in strict mode."); > testSyntaxError("'use strict'; ([ arguments ] = [])", "SyntaxError: Cannot modify 'arguments' in strict mode."); >-testSyntaxError("'use strict'; ([ arguments = 0 ] = [])", "SyntaxError: Cannot modify 'arguments' in strict mode."); >\ No newline at end of file >+testSyntaxError("'use strict'; ([ arguments = 0 ] = [])", "SyntaxError: Cannot modify 'arguments' in strict mode."); >diff --git a/JSTests/stress/error-messages-for-in-operator-should-not-crash.js b/JSTests/stress/error-messages-for-in-operator-should-not-crash.js >index b54580cc28..8f33d6d21c 100644 >--- a/JSTests/stress/error-messages-for-in-operator-should-not-crash.js >+++ b/JSTests/stress/error-messages-for-in-operator-should-not-crash.js >@@ -5,7 +5,7 @@ try { > error = e; > } > >-if (!error || error.message !== "Unexpected escaped characters in keyword tocken: 'i\\u{006E}'") >+if (!error || error.message !== "Unexpected escaped characters in keyword token: 'i\\u{006E}'") > throw new Error("Bad"); > > error = null; >@@ -15,7 +15,7 @@ try { > error = e; > } > >-if (!error || error.message !== "Unexpected escaped characters in keyword tocken: 'i\\u006E'") >+if (!error || error.message !== "Unexpected escaped characters in keyword token: 'i\\u006E'") > throw new Error("Bad"); > > // This test should not crash. >@@ -27,4 +27,4 @@ try { > } > > if (!error || error.message !== "20 is not an Object. (evaluating \'\"prop\" in 20\')") >- throw new Error("Bad"); >\ No newline at end of file >+ throw new Error("Bad"); >diff --git a/JSTests/stress/reserved-word-with-escape.js b/JSTests/stress/reserved-word-with-escape.js >index 0f688e078d..d6db09ac21 100644 >--- a/JSTests/stress/reserved-word-with-escape.js >+++ b/JSTests/stress/reserved-word-with-escape.js >@@ -25,122 +25,122 @@ testSyntax("var cocoa"); > testSyntax("var c\u006fcoa"); > > testSyntaxError(String.raw`var var`, String.raw`SyntaxError: Cannot use the keyword 'var' as a variable name.`); >-testSyntaxError(String.raw`var v\u0061r`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u0061r'`); >-testSyntaxError(String.raw`var v\u{0061}r`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u{0061}r'`); >+testSyntaxError(String.raw`var v\u0061r`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u0061r'`); >+testSyntaxError(String.raw`var v\u{0061}r`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u{0061}r'`); > > testSyntaxError(String.raw`var var = 2000000;`, String.raw`SyntaxError: Cannot use the keyword 'var' as a variable name.`); >-testSyntaxError(String.raw`var v\u0061r = 2000000;`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u0061r'`); >-testSyntaxError(String.raw`var v\u{0061}r = 2000000`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u{0061}r'`); >+testSyntaxError(String.raw`var v\u0061r = 2000000;`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u0061r'`); >+testSyntaxError(String.raw`var v\u{0061}r = 2000000`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u{0061}r'`); > > testSyntaxError(String.raw`var {var} = obj)`, String.raw`SyntaxError: Cannot use abbreviated destructuring syntax for keyword 'var'.`); >-testSyntaxError(String.raw`var {v\u0061r} = obj`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u0061r'`); >-testSyntaxError(String.raw`var {v\u{0061}r} = obj`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u{0061}r'`); >+testSyntaxError(String.raw`var {v\u0061r} = obj`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u0061r'`); >+testSyntaxError(String.raw`var {v\u{0061}r} = obj`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u{0061}r'`); > > testSyntaxError(String.raw`var {var:var} = obj)`, String.raw`SyntaxError: Cannot use the keyword 'var' as a variable name.`); >-testSyntaxError(String.raw`var {var:v\u0061r} = obj`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u0061r'`); >-testSyntaxError(String.raw`var {var:v\u{0061}r} = obj`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u{0061}r'`); >+testSyntaxError(String.raw`var {var:v\u0061r} = obj`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u0061r'`); >+testSyntaxError(String.raw`var {var:v\u{0061}r} = obj`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u{0061}r'`); > > testSyntaxError(String.raw`var [var] = obj`, String.raw`SyntaxError: Cannot use the keyword 'var' as a variable name.`); >-testSyntaxError(String.raw`var [v\u0061r] = obj`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u0061r'`); >-testSyntaxError(String.raw`var [v\u{0061}r] = obj`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u{0061}r'`); >+testSyntaxError(String.raw`var [v\u0061r] = obj`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u0061r'`); >+testSyntaxError(String.raw`var [v\u{0061}r] = obj`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u{0061}r'`); > > testSyntaxError(String.raw`[var] = obj`, String.raw`SyntaxError: Unexpected keyword 'var'`); >-testSyntaxError(String.raw`[v\u0061r] = obj`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u0061r'`); >-testSyntaxError(String.raw`[v\u{0061}r] = obj`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u{0061}r'`); >+testSyntaxError(String.raw`[v\u0061r] = obj`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u0061r'`); >+testSyntaxError(String.raw`[v\u{0061}r] = obj`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u{0061}r'`); > > testSyntaxError(String.raw`function var() { }`, String.raw`SyntaxError: Cannot use the keyword 'var' as a function name.`); >-testSyntaxError(String.raw`function v\u0061r() { }`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u0061r'`); >-testSyntaxError(String.raw`function v\u{0061}r() { }`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u{0061}r'`); >+testSyntaxError(String.raw`function v\u0061r() { }`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u0061r'`); >+testSyntaxError(String.raw`function v\u{0061}r() { }`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u{0061}r'`); > > testSyntaxError(String.raw`function a(var) { }`, String.raw`SyntaxError: Cannot use the keyword 'var' as a parameter name.`); >-testSyntaxError(String.raw`function a(v\u0061r) { }`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u0061r'`); >-testSyntaxError(String.raw`function a(v\u{0061}r) { }`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u{0061}r'`); >+testSyntaxError(String.raw`function a(v\u0061r) { }`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u0061r'`); >+testSyntaxError(String.raw`function a(v\u{0061}r) { }`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u{0061}r'`); > > testSyntaxError(String.raw`function a({var}) { }`, String.raw`SyntaxError: Cannot use abbreviated destructuring syntax for keyword 'var'.`); >-testSyntaxError(String.raw`function a({v\u0061r}) { }`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u0061r'`); >-testSyntaxError(String.raw`function a({v\u{0061}r}) { }`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u{0061}r'`); >+testSyntaxError(String.raw`function a({v\u0061r}) { }`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u0061r'`); >+testSyntaxError(String.raw`function a({v\u{0061}r}) { }`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u{0061}r'`); > > testSyntaxError(String.raw`function a({var:var}) { }`, String.raw`SyntaxError: Cannot use the keyword 'var' as a parameter name.`); >-testSyntaxError(String.raw`function a({var:v\u0061r}) { }`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u0061r'`); >-testSyntaxError(String.raw`function a({var:v\u{0061}r}) { }`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u{0061}r'`); >+testSyntaxError(String.raw`function a({var:v\u0061r}) { }`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u0061r'`); >+testSyntaxError(String.raw`function a({var:v\u{0061}r}) { }`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u{0061}r'`); > > testSyntaxError(String.raw`function a([var]) { }`, String.raw`SyntaxError: Cannot use the keyword 'var' as a parameter name.`); >-testSyntaxError(String.raw`function a([v\u0061r]) { }`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u0061r'`); >-testSyntaxError(String.raw`function a([v\u{0061}r]) { }`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u{0061}r'`); >+testSyntaxError(String.raw`function a([v\u0061r]) { }`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u0061r'`); >+testSyntaxError(String.raw`function a([v\u{0061}r]) { }`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u{0061}r'`); > > testSyntaxError(String.raw`(function var() { })`, String.raw`SyntaxError: Cannot use the keyword 'var' as a function name.`); >-testSyntaxError(String.raw`(function v\u0061r() { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u0061r'`); >-testSyntaxError(String.raw`(function v\u{0061}r() { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u{0061}r'`); >+testSyntaxError(String.raw`(function v\u0061r() { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u0061r'`); >+testSyntaxError(String.raw`(function v\u{0061}r() { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u{0061}r'`); > > testSyntaxError(String.raw`(function a(var) { })`, String.raw`SyntaxError: Cannot use the keyword 'var' as a parameter name.`); >-testSyntaxError(String.raw`(function a(v\u0061r) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u0061r'`); >-testSyntaxError(String.raw`(function a(v\u{0061}r) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u{0061}r'`); >+testSyntaxError(String.raw`(function a(v\u0061r) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u0061r'`); >+testSyntaxError(String.raw`(function a(v\u{0061}r) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u{0061}r'`); > > testSyntaxError(String.raw`(function a({var}) { })`, String.raw`SyntaxError: Cannot use abbreviated destructuring syntax for keyword 'var'.`); >-testSyntaxError(String.raw`(function a({v\u0061r}) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u0061r'`); >-testSyntaxError(String.raw`(function a({v\u{0061}r}) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u{0061}r'`); >+testSyntaxError(String.raw`(function a({v\u0061r}) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u0061r'`); >+testSyntaxError(String.raw`(function a({v\u{0061}r}) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u{0061}r'`); > > testSyntaxError(String.raw`(function a({var:var}) { })`, String.raw`SyntaxError: Cannot use the keyword 'var' as a parameter name.`); >-testSyntaxError(String.raw`(function a({var:v\u0061r}) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u0061r'`); >-testSyntaxError(String.raw`(function a({var:v\u{0061}r}) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u{0061}r'`); >+testSyntaxError(String.raw`(function a({var:v\u0061r}) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u0061r'`); >+testSyntaxError(String.raw`(function a({var:v\u{0061}r}) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u{0061}r'`); > > testSyntaxError(String.raw`(function a([var]) { })`, String.raw`SyntaxError: Cannot use the keyword 'var' as a parameter name.`); >-testSyntaxError(String.raw`(function a([v\u0061r]) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u0061r'`); >-testSyntaxError(String.raw`(function a([v\u{0061}r]) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u{0061}r'`); >+testSyntaxError(String.raw`(function a([v\u0061r]) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u0061r'`); >+testSyntaxError(String.raw`(function a([v\u{0061}r]) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u{0061}r'`); > > testSyntaxError(String.raw`(function a([{var}]) { })`, String.raw`SyntaxError: Cannot use abbreviated destructuring syntax for keyword 'var'.`); >-testSyntaxError(String.raw`(function a([{v\u0061r}]) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u0061r'`); >-testSyntaxError(String.raw`(function a([{v\u{0061}r}]) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u{0061}r'`); >+testSyntaxError(String.raw`(function a([{v\u0061r}]) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u0061r'`); >+testSyntaxError(String.raw`(function a([{v\u{0061}r}]) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u{0061}r'`); > > testSyntaxError(String.raw`(function a([{var:var}]) { })`, String.raw`SyntaxError: Cannot use the keyword 'var' as a parameter name.`); >-testSyntaxError(String.raw`(function a([{var:v\u0061r}]) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u0061r'`); >-testSyntaxError(String.raw`(function a([{var:v\u{0061}r}]) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u{0061}r'`); >+testSyntaxError(String.raw`(function a([{var:v\u0061r}]) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u0061r'`); >+testSyntaxError(String.raw`(function a([{var:v\u{0061}r}]) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u{0061}r'`); > > testSyntaxError(String.raw`(function a([[var]]) { })`, String.raw`SyntaxError: Cannot use the keyword 'var' as a parameter name.`); >-testSyntaxError(String.raw`(function a([[v\u0061r]]) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u0061r'`); >-testSyntaxError(String.raw`(function a([[v\u{0061}r]]) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u{0061}r'`); >+testSyntaxError(String.raw`(function a([[v\u0061r]]) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u0061r'`); >+testSyntaxError(String.raw`(function a([[v\u{0061}r]]) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u{0061}r'`); > > testSyntaxError(String.raw`(function a({ hello: {var}}) { })`, String.raw`SyntaxError: Cannot use abbreviated destructuring syntax for keyword 'var'.`); >-testSyntaxError(String.raw`(function a({ hello: {v\u0061r}}) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u0061r'`); >-testSyntaxError(String.raw`(function a({ hello: {v\u{0061}r}}) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u{0061}r'`); >+testSyntaxError(String.raw`(function a({ hello: {v\u0061r}}) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u0061r'`); >+testSyntaxError(String.raw`(function a({ hello: {v\u{0061}r}}) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u{0061}r'`); > > testSyntaxError(String.raw`(function a({ hello: {var:var}}) { })`, String.raw`SyntaxError: Cannot use the keyword 'var' as a parameter name.`); >-testSyntaxError(String.raw`(function a({ hello: {var:v\u0061r}}) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u0061r'`); >-testSyntaxError(String.raw`(function a({ hello: {var:v\u{0061}r}}) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u{0061}r'`); >+testSyntaxError(String.raw`(function a({ hello: {var:v\u0061r}}) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u0061r'`); >+testSyntaxError(String.raw`(function a({ hello: {var:v\u{0061}r}}) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u{0061}r'`); > > testSyntaxError(String.raw`(function a({ hello: [var]}) { })`, String.raw`SyntaxError: Cannot use the keyword 'var' as a parameter name.`); >-testSyntaxError(String.raw`(function a({ hello: [v\u0061r]}) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u0061r'`); >-testSyntaxError(String.raw`(function a({ hello: [v\u{0061}r]}) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u{0061}r'`); >+testSyntaxError(String.raw`(function a({ hello: [v\u0061r]}) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u0061r'`); >+testSyntaxError(String.raw`(function a({ hello: [v\u{0061}r]}) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u{0061}r'`); > > testSyntaxError(String.raw`(function a({ 0: {var} }) { })`, String.raw`SyntaxError: Cannot use abbreviated destructuring syntax for keyword 'var'.`); >-testSyntaxError(String.raw`(function a({ 0: {v\u0061r}}) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u0061r'`); >-testSyntaxError(String.raw`(function a({ 0: {v\u{0061}r}}) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u{0061}r'`); >+testSyntaxError(String.raw`(function a({ 0: {v\u0061r}}) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u0061r'`); >+testSyntaxError(String.raw`(function a({ 0: {v\u{0061}r}}) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u{0061}r'`); > > testSyntaxError(String.raw`(function a({ 0: {var:var}}) { })`, String.raw`SyntaxError: Cannot use the keyword 'var' as a parameter name.`); >-testSyntaxError(String.raw`(function a({ 0: {var:v\u0061r}}) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u0061r'`); >-testSyntaxError(String.raw`(function a({ 0: {var:v\u{0061}r}}) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u{0061}r'`); >+testSyntaxError(String.raw`(function a({ 0: {var:v\u0061r}}) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u0061r'`); >+testSyntaxError(String.raw`(function a({ 0: {var:v\u{0061}r}}) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u{0061}r'`); > > testSyntaxError(String.raw`(function a({ 0: {value:var}}) { })`, String.raw`SyntaxError: Cannot use the keyword 'var' as a parameter name.`); >-testSyntaxError(String.raw`(function a({ 0: {value:v\u0061r}}) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u0061r'`); >-testSyntaxError(String.raw`(function a({ 0: {value:v\u{0061}r}}) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u{0061}r'`); >+testSyntaxError(String.raw`(function a({ 0: {value:v\u0061r}}) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u0061r'`); >+testSyntaxError(String.raw`(function a({ 0: {value:v\u{0061}r}}) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u{0061}r'`); > > testSyntaxError(String.raw`(function a({ 0: [var]}) { })`, String.raw`SyntaxError: Cannot use the keyword 'var' as a parameter name.`); >-testSyntaxError(String.raw`(function a({ 0: [v\u0061r]}) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u0061r'`); >-testSyntaxError(String.raw`(function a({ 0: [v\u{0061}r]}) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u{0061}r'`); >+testSyntaxError(String.raw`(function a({ 0: [v\u0061r]}) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u0061r'`); >+testSyntaxError(String.raw`(function a({ 0: [v\u{0061}r]}) { })`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u{0061}r'`); > > testSyntaxError(String.raw`try { } catch(var) { }`, String.raw`SyntaxError: Cannot use the keyword 'var' as a catch parameter name.`); >-testSyntaxError(String.raw`try { } catch(v\u0061r) { }`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u0061r'`); >-testSyntaxError(String.raw`try { } catch(v\u{0061}r) { }`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u{0061}r'`); >+testSyntaxError(String.raw`try { } catch(v\u0061r) { }`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u0061r'`); >+testSyntaxError(String.raw`try { } catch(v\u{0061}r) { }`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u{0061}r'`); > > testSyntaxError(String.raw`class var { }`, String.raw`SyntaxError: Cannot use the keyword 'var' as a class name.`); >-testSyntaxError(String.raw`class v\u0061r { }`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u0061r'`); >-testSyntaxError(String.raw`class v\u{0061}r { }`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u{0061}r'`); >+testSyntaxError(String.raw`class v\u0061r { }`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u0061r'`); >+testSyntaxError(String.raw`class v\u{0061}r { }`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u{0061}r'`); > >-testSyntaxError(String.raw`({ v\u0061r: 'Cocoa' })`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u0061r'`); >-testSyntaxError(String.raw`({ v\u{0061}r: 'Cocoa' })`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'v\u{0061}r'`); >+testSyntaxError(String.raw`({ v\u0061r: 'Cocoa' })`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u0061r'`); >+testSyntaxError(String.raw`({ v\u{0061}r: 'Cocoa' })`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'v\u{0061}r'`); > >-testSyntaxError(String.raw`{for(o i\u006E {}){}}`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'i\u006E'`); >-testSyntaxError(String.raw`{for(o i\u{006E} {}){}}`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'i\u{006E}'`); >+testSyntaxError(String.raw`{for(o i\u006E {}){}}`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'i\u006E'`); >+testSyntaxError(String.raw`{for(o i\u{006E} {}){}}`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'i\u{006E}'`); > > > testSyntaxError(String.raw`implements`, String.raw`ReferenceError: Can't find variable: implements`); >@@ -148,5 +148,5 @@ testSyntaxError(String.raw`impleme\u006Ets`, String.raw`ReferenceError: Can't fi > testSyntaxError(String.raw`impleme\u{006E}ts`, String.raw`ReferenceError: Can't find variable: implements`); > > testSyntaxError(String.raw`'use strict'; implements`, String.raw`SyntaxError: Unexpected use of reserved word 'implements' in strict mode`); >-testSyntaxError(String.raw`'use strict'; impleme\u006Ets`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'impleme\u006Ets'`); >-testSyntaxError(String.raw`'use strict'; impleme\u{006E}ts`, String.raw`SyntaxError: Unexpected escaped characters in keyword tocken: 'impleme\u{006E}ts'`); >+testSyntaxError(String.raw`'use strict'; impleme\u006Ets`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'impleme\u006Ets'`); >+testSyntaxError(String.raw`'use strict'; impleme\u{006E}ts`, String.raw`SyntaxError: Unexpected escaped characters in keyword token: 'impleme\u{006E}ts'`); >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index 7582352686..32a554fa9d 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,49 @@ >+2018-04-26 Rick Waldron <waldron.rick@gmail.com> >+ >+ Token misspelled "tocken" in error message string >+ https://bugs.webkit.org/show_bug.cgi?id=185030 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * parser/Parser.cpp: Fix typo "tocken" => "token" in SyntaxError message string >+ (JSC::Parser<LexerType>::Parser): >+ (JSC::Parser<LexerType>::didFinishParsing): >+ (JSC::Parser<LexerType>::parseSourceElements): >+ (JSC::Parser<LexerType>::parseAsyncGeneratorFunctionSourceElements): >+ (JSC::Parser<LexerType>::parseVariableDeclaration): >+ (JSC::Parser<LexerType>::parseWhileStatement): >+ (JSC::Parser<LexerType>::parseVariableDeclarationList): >+ (JSC::Parser<LexerType>::createBindingPattern): >+ (JSC::Parser<LexerType>::parseArrowFunctionSingleExpressionBodySourceElements): >+ (JSC::Parser<LexerType>::parseObjectRestElement): >+ (JSC::Parser<LexerType>::parseDestructuringPattern): >+ (JSC::Parser<LexerType>::parseForStatement): >+ (JSC::Parser<LexerType>::parseBreakStatement): >+ (JSC::Parser<LexerType>::parseContinueStatement): >+ (JSC::Parser<LexerType>::parseThrowStatement): >+ (JSC::Parser<LexerType>::parseWithStatement): >+ (JSC::Parser<LexerType>::parseSwitchStatement): >+ (JSC::Parser<LexerType>::parseSwitchClauses): >+ (JSC::Parser<LexerType>::parseTryStatement): >+ (JSC::Parser<LexerType>::parseBlockStatement): >+ (JSC::Parser<LexerType>::parseFormalParameters): >+ (JSC::Parser<LexerType>::parseFunctionParameters): >+ (JSC::Parser<LexerType>::parseFunctionInfo): >+ (JSC::Parser<LexerType>::parseExpressionOrLabelStatement): >+ (JSC::Parser<LexerType>::parseExpressionStatement): >+ (JSC::Parser<LexerType>::parseIfStatement): >+ (JSC::Parser<LexerType>::parseAssignmentExpression): >+ (JSC::Parser<LexerType>::parseConditionalExpression): >+ (JSC::Parser<LexerType>::parseBinaryExpression): >+ (JSC::Parser<LexerType>::parseObjectLiteral): >+ (JSC::Parser<LexerType>::parseStrictObjectLiteral): >+ (JSC::Parser<LexerType>::parseArrayLiteral): >+ (JSC::Parser<LexerType>::parseArguments): >+ (JSC::Parser<LexerType>::parseMemberExpression): >+ (JSC::operatorString): >+ (JSC::Parser<LexerType>::parseUnaryExpression): >+ (JSC::Parser<LexerType>::printUnexpectedTokenText): >+ > 2018-04-26 Dominik Infuehr <dinfuehr@igalia.com> > > [MIPS] Fix branch offsets in branchNeg32 >@@ -192,22 +238,22 @@ > https://bugs.webkit.org/show_bug.cgi?id=184923 > > Reviewed by Saam Barati. >- >+ > If we have a MultiGetByOffset or MultiPutByOffset over a structure set that we've already proved > (i.e. we know that the object has one of those structures), then previously we would still emit a > switch with a case per structure along with a default case. That would mean one extra redundant > branch to check that whatever structure we wound up with belongs to the set. In that case, we > were already making the default case be an Oops. >- >+ > One possible solution would be to say that the default case being Oops means that B3 doesn't need > to emit the extra branch. But that would require having B3 exploit the fact that Oops is known to > be unreachable. Although B3 IR semantics (webkit.org/docs/b3/intermediate-representation.html) > seem to allow this, I don't particularly like that style of optimization. I like Oops to mean > trap. >- >+ > So, this patch makes FTL lowering turn one of the cases into the default, explicitly removing the > extra branch. >- >+ > This is not a speed-up. But it makes the B3 IR for MultiByOffset a lot simpler, which should make > it easier to implement B3-level optimizations for MultiByOffset. It also makes the IR easier to > read. >@@ -223,10 +269,10 @@ > https://bugs.webkit.org/show_bug.cgi?id=159859 > > Reviewed by Keith Miller. >- >+ > This teaches Node::remove() how to decay a MultiGetByOffset to a CheckStructure, so that > clobberize() can report a def() for MultiGetByOffset. >- >+ > This is a slight improvement to codegen in splay because splay is a heavy user of > MultiGetByOffset. It uses it redundantly in one of its hot functions (the function called > "splay_"). I don't see a net speed-up in the benchmark. However, this is just a first step to >@@ -263,10 +309,10 @@ > https://bugs.webkit.org/show_bug.cgi?id=184916 > > Reviewed by Sam Weinig. >- >+ > When debugging regressions in tests that are GC heavy, it's nice to be able to query the total > time spent in GC to determine if the regression is because the GC got slower. >- >+ > This adds $vm.totalGCTime(), which tells you the total time spent in GC, in seconds. > > * heap/Heap.cpp: >@@ -297,7 +343,7 @@ > Roll out r226655 because it broke OSR entry when the pre-header is inadequately profiled. > > Rubber stamped by Saam Barati. >- >+ > This is a >2x speed-up in SunSpider/bitops-bitwise-and. We don't really care about SunSpider > anymore, but r226655 didn't result in any benchmark wins and just regressed this test by a lot. > Seems sensible to just roll it out. >@@ -572,7 +618,7 @@ > https://bugs.webkit.org/show_bug.cgi?id=184721 > > Reviewed by Saam Barati. >- >+ > This moves InternalFunction into a IsoSubspace. It also moves all subclasses into IsoSubspaces, > but subclasses that are the same size as InternalFunction share its subspace. I did this > because the subclasses appear to just override methods, which are called dynamically via the >@@ -1564,15 +1610,15 @@ > https://bugs.webkit.org/show_bug.cgi?id=184705 > > Reviewed by Michael Saboff. >- >+ > My old multisocket Mac Pro is amazing at catching race conditions in the GC. Earlier today > while testing an unrelated patch, a concurrent GC thread crashed inside > JSGenericTypedArrayView<>::visitChildren() calling markAuxiliary(). I'm pretty sure it's > because a typed array became wasteful concurrently to the GC. So, visitChildren() read one > mode and another vector. >- >+ > The fix is to lock inside visitChildren and anyone who changes those fields. >- >+ > I'm not even going to try to write a test. I think it's super lucky that my Mac Pro caught > this. > >@@ -1622,7 +1668,7 @@ > https://bugs.webkit.org/show_bug.cgi?id=184704 > > Reviewed by Mark Lam. >- >+ > Previously it was in a CompleteSubspace, which is pretty good, but also quite wasteful. > CompleteSubspace means about 4KB of data to track the size-allocator mapping. IsoSubspace > shortcircuits this. Also, IsoSubspace uses the iso allocator, so it provides stronger UAF >@@ -1879,10 +1925,10 @@ > https://bugs.webkit.org/show_bug.cgi?id=184630 > > Reviewed by Yusuke Suzuki. >- >+ > Function.prototype.caller no longer returns generator bodies. Those are meant to be > private. >- >+ > Also added some builtin debugging tools so that it's easier to do the investigation that I > did. > >@@ -2408,18 +2454,18 @@ > https://bugs.webkit.org/show_bug.cgi?id=184440 > > Reviewed by Saam Barati. >- >+ > One way to fix bugs involving underapproximation in AI or clobberize is to assert that they > agree with each other. That's what this patch does: it adds an assertion that AI's structure > state tracking must be equivalent to JSCell_structureID being clobbered. >- >+ > One subtlety is that AI sometimes folds away structure clobbering using information that > clobberize doesn't have. So, we track this wuth special kinds of AI states (FoldedClobber and > ObservedTransitions). >- >+ > This fixes a bunch of cases of AI missing clobberStructures/clobberWorld and one case of > clobberize missing a write(Heap). >- >+ > This also makes some cases more precise in order to appease the assertion. Making things more > precise might make things faster, but I didn't measure it because that wasn't the goal. > >@@ -2477,20 +2523,20 @@ > https://bugs.webkit.org/show_bug.cgi?id=184455 > > Reviewed by Michael Saboff. >- >+ > LICM is sort of an assertion that AI is as precise as clobberize about effects. If clobberize > says that something is not effectful, then LICM will try to hoist it. But LICM's AI hack > (AtTailAbstractState) cannot handle hoisting of things that have effects. So, if AI thinks that > the thing being hoisted does have effects, then we get a crash. >- >+ > In r227341, we incorrectly told AI that CompareEq(Untyped:, _) is effectful. In fact, only > ComapreEq(Untyped:, Untyped:) is effectful, and clobberize knew this already. As a result, LICM > would blow up if we hoisted CompareEq(Untyped:, Other:), which clobberize knew wasn't > effectful. >- >+ > Instead of fixing this by making AI precise, in r227742 we made matters worse by then breaking > clobberize to also think that CompareEq(Untyped:, _) is effectful. >- >+ > This fixes the whole situation by teaching both clobberize and AI that the only effectful form > of CompareEq is ComapreEq(Untyped:, Untyped:). > >@@ -2505,7 +2551,7 @@ > https://bugs.webkit.org/show_bug.cgi?id=184372 > > Reviewed by Saam Barati. >- >+ > We do a pretty good job of not emitting checks for KnownBlah edges, since those mean that we > have already proved, using techniques that are more precise than AI, that the edge has type > Blah. Unfortunately, we do not handle this case gracefully when AI state becomes bottom, >@@ -3326,10 +3372,10 @@ > https://bugs.webkit.org/show_bug.cgi?id=184290 > > Reviewed by Mark Lam. >- >+ > If you write to an array that may contain pointers and you didn't just allocate it, then you need to > barrier right after. >- >+ > I don't know if this is really a bug - it's possible that all callers of appendMemcpy do things that > obviate the need for this barrier. But these barriers are cheap, so we should do them if in doubt. > >@@ -3342,7 +3388,7 @@ > https://bugs.webkit.org/show_bug.cgi?id=184195 > > Reviewed by Saam Barati. >- >+ > This rolls out SecurityKind/SecurityOriginToken, but keeps the TLC infrastructure. It seems > to be a small speed-up. > >@@ -3503,7 +3549,7 @@ > https://bugs.webkit.org/show_bug.cgi?id=184194 > > Reviewed by Yusuke Suzuki. >- >+ > Remove index masking, because it's not the way we'll mitigate Spectre. > > * API/tests/JSObjectGetProxyTargetTest.cpp: >@@ -4999,7 +5045,7 @@ > https://bugs.webkit.org/show_bug.cgi?id=183863 > > Reviewed by Mark Lam. >- >+ > This outlines the ScopedArguments overflow storage and adds poisoning. > > * bytecode/AccessCase.cpp: >@@ -5754,7 +5800,7 @@ > > 2018-03-15 Ross Kirsling <ross.kirsling@sony.com> > >- Fix MSVC run-time check after r229391. >+ Fix MSVC run-time check after r229391. > https://bugs.webkit.org/show_bug.cgi?id=183673 > > Reviewed by Keith Miller. >@@ -5806,7 +5852,7 @@ > 4. Updated clients to pass a PtrTag. For the most part, I just apply NoPtrTag as > a placeholder until we have time to analyze what pointer profile each client > site has later. >- >+ > 5. Apply PtrTags to the YarrJIT. > > * assembler/ARM64Assembler.h: >@@ -6303,27 +6349,27 @@ > https://bugs.webkit.org/show_bug.cgi?id=183458 > > Reviewed by Yusuke Suzuki. >- >+ > Our Spectre plan for JSValue objects is to allow inline JSValue stores and loads guarded by > unmitigated structure checks. This works because objects reachable from JSValues (i.e. JSValue > objects, like String, Symbol, and any descendant of JSObject) will only contain fields that it's OK > to read and write within a Spectre mitigation window. Writes are important, because within the > window, a write could appear to be made speculatively and rolled out later. This means that: >- >+ > - JSValue objects cannot have lengths, masks, or anything else inline. >- >+ > - JSValue objects cannot have an inline type that is used as part of a Spectre mitigation for a type > check, unless that type is in the form of a poison key. >- >+ > This means that the dynamic poisoning that I previously landed for DirectArguments is wrong. It also > means that it's wrong for DirectArguments to have an inline length. >- >+ > This changes DirectArguments to use poisoning according to the universal formula: >- >+ > - The random accessed portions are out-of-line, pointed to by a poisoned pointer. >- >+ > - No inline length. >- >+ > Surprisingly, this is perf-neutral. It's probably perf-neutral because our compiler optimizations > amortize whatever cost there was. > >@@ -7348,7 +7394,7 @@ > https://bugs.webkit.org/show_bug.cgi?id=183416 > > Reviewed by Keith Miller. >- >+ > This is disabled by default for now, because it reveals a regalloc bug in wasm. > > * b3/air/AirCode.cpp: >@@ -7799,7 +7845,7 @@ > https://bugs.webkit.org/show_bug.cgi?id=183377 > > Reviewed by Michael Saboff. >- >+ > That prevents it from being used to pivot UAF on malloc memory into corruption in the JS heap. > > * runtime/ArgList.cpp: >@@ -8273,7 +8319,7 @@ > This patch makes both InternalFunctionAllocationProfile and the VM's > structure cache having-a-bad-time aware. For InternalFunctionAllocationProfile, > we clear them when they'd produce an object with a bad indexing type. >- For the VM's Structure cache, we conservatively clear the entire cache >+ For the VM's Structure cache, we conservatively clear the entire cache > since it may be housing Structures with bad indexing types. > > * runtime/FunctionRareData.h: >@@ -8612,7 +8658,7 @@ > > Reviewed by JF Bastien. > >- Cache memory address/size in wasm:Instance to avoid load wasm:Memory >+ Cache memory address/size in wasm:Instance to avoid load wasm:Memory > object during access to memory and memory size property in JiT > > * wasm/WasmB3IRGenerator.cpp: >@@ -8806,10 +8852,10 @@ > length accesses on Cloned/Direct Arguments objects as escapes. > It teaches this phase to materialize the length in the same > way the ArgumentsEliminationPhase does. >- >+ > This is around a 0.5-1% speedup on ARES6 on my iMac. It speeds > up the ML subtest by 2-4%. >- >+ > This patch also extends compileGetArgumentCountIncludingThis to take > a parameter that is the inline call frame to load from (in the case > where the inline call frame is a varargs frame). This allows the >@@ -8899,13 +8945,13 @@ > that is a JSFunction can use the object allocation profile and go down the > fast path to allocate the |this| object. Implied by this approach is that > accessing the 'prototype' property of the incoming function is not an >- effectful operation. This is inherent to the ObjectAllocationProfile >+ effectful operation. This is inherent to the ObjectAllocationProfile > data structure: it caches the prototype field. However, getting the > 'prototype' property might be an effectful operation, e.g, it could > be a getter. Many variants of functions in JS have the 'prototype' property > as non-configurable. However, some functions, like bound functions, do not > have the 'prototype' field with these attributes. >- >+ > This patch adds the notion of 'canUseAllocationProfile' to JSFunction > and threads it through so that we only go down the fast path and use > the allocation profile when the prototype property is non-configurable. >@@ -8942,12 +8988,12 @@ > This patch just makes sure to not mark the ArrayProfile as out of bounds > in this scenario for Contiguous arrays, since the DFG will always optimize > this case. >- >+ > However, we should extend this by profiling when a GetByVal loads a hole. By > doing so, we can optimize this for Int32, ArrayStorage, and maybe even Double > arrays. That work will happen in: > https://bugs.webkit.org/show_bug.cgi?id=182940 >- >+ > This patch is a 30-50% speedup on JetStream's hash-map test. This patch > speeds up JetStream by 1% when testing on my iMac. > >@@ -8972,14 +9018,14 @@ > https://bugs.webkit.org/show_bug.cgi?id=182907 > > Reviewed by Saam Barati. >- >+ > Implement constant folding for GetArrayMask. This revealed a bug in tryGetFoldableView, where it was > ignoring the result of a jsDynamicCast<>(). This wasn't a bug before because it would have been > impossible for that function to get called with a non-null value if the value was not an array view, > due to type filtering in CheckArray, the fact that CheckArray had to dominate GetArrayLength, and > the fact that the other tryGetFoldableView overload made sure that the array mode was some typed > array. >- >+ > This isn't a measurable progression, but it does save a register in the codegen for typed array > accesses. Hopefully these improvements add up. > >@@ -9176,14 +9222,14 @@ > a made a couple of mistakes in r228411. One is probably a security bug, and > the other is a performance bug because it'll prevent CSE for certain flavors > of GetByVal nodes. Both blunders are similar in nature. >- >+ > In r228411, I added code in LICM that inserted a CheckVarargs node with children > of another varargs node. However, to construct this new node's children, > I just copied the AdjacencyList. This does a shallow copy. What we needed > was a deep copy. We needed to create a new vararg AdjacencyList that points > to edges that are deep copies of the original varargs children. This patch > fixes this goof in LICM. >- >+ > r228411 made it so that PureValue over a varargs node would just compare actual > AdjacencyLists structs. So, if you had two GetByVals that had equal santized > children, their actual AdjacencyList structs are *not* bitwise equal, since they'll >@@ -9246,15 +9292,15 @@ > https://bugs.webkit.org/show_bug.cgi?id=182843 > > Reviewed by Saam Barati. >- >+ > To complete our object distancing plan, we need to put objects that can contain unpoisoned data > far away from objects that cannot. Objects referenceable from JSValues cannot contain > unpoisoned data, but auxiliary data can. This further divides auxiliary data that is meant for > storing mostly JSValues from data that is meant for storing anything. >- >+ > This is achieved by having three SecurityKinds that are used for MarkedBlock selection and > zeroing sort of the same way SecurityOriginToken already was. >- >+ > This change shouldn't make anything slower. If anything, it will be a small speed-up because it > removes some cases of MarkedBlock zeroing since we don't need to zero blocks used for two of > the SecurityKinds. >@@ -9601,7 +9647,7 @@ > was in C code. This is wrong, as installing traps mallocs, and the JS thread > may have been holding the malloc lock while in C code. This could lead to a > deadlock when C code was holding the malloc lock. >- >+ > This patch makes it so that we only install traps when we've proven the PC > is in JIT or LLInt code. If we're in JIT/LLInt code, we are guaranteed that > we're not holding the malloc lock. >@@ -9887,10 +9933,10 @@ > https://bugs.webkit.org/show_bug.cgi?id=182652 > > Reviewed by Saam Barati. >- >+ > This poisons pointers in JSFunction and puts all of the types in the JSFunction hierarchy in > isospaces. >- >+ > This is so neutral on JetStream: 0.01% slower with p = 0.969211. > > * dfg/DFGSpeculativeJIT.cpp: >@@ -9958,9 +10004,9 @@ > load). However, for these loops I analyzed, the DFG would be able to hoist > these loads out of loops because it knows about JS semantics to correctly > reason about the safety of hoisting the load. >- >+ > This is a 1% speedup on JetStream on Mac and iOS in my testing. >- >+ > This patch also adds some infrastructure for eliminating and doing CSE on > varargs nodes. Because this patch makes GetByVal a varargs node, I ran into > issues we never had before. We never had a varargs node that could be CSEd or be >@@ -10147,13 +10193,13 @@ > https://bugs.webkit.org/show_bug.cgi?id=182656 > > Reviewed by Saam Barati. >- >+ > This makes the StackFrames in ErrorInstance and Exception weak. We simply forget their > contents if we GC. >- >+ > This isn't going to happen under normal operation since your callees and code blocks will > still be alive when you ask for .stack. >- >+ > Bug 182650 tracks improving this so that it's not lossy. For now, I think it's worth it, > since it is likely to recover 3-5 MB on membuster. > >@@ -10197,7 +10243,7 @@ > https://bugs.webkit.org/show_bug.cgi?id=182563 > > Reviewed by Michael Saboff and Mark Lam. >- >+ > This adopts new fastCopy/fastZeroFill calls for calls to memcpy/memset that do not take a > constant size argument. > >@@ -10448,27 +10494,27 @@ > https://bugs.webkit.org/show_bug.cgi?id=182227 > > Reviewed by JF Bastien. >- >+ > This uses TLCs to create at least `minimumDistanceBetweenCellsFromDifferenOrigins` bytes of > distance between objects from different origins, using the following combination of things. For > short lets refer to that constant as K. >- >+ > - Since r227721, LargeAllocation puts K bytes padding at the end of each allocation. >- >+ > - Since r227718, MarkedBlock puts at least K bytes in its footer. >- >+ > - Since r227617, global objects can have their own TLCs, which make them allocate from a > different set of blocks than other global objects. The TLC of a global object comes into > effect when you enter the VM via that global object. >- >+ > - With this change, TLCs and blocks both have security origins. A TLC will only use blocks that > share the same security origin or empty blocks (in which case we zero the block and change > its security origin). >- >+ > WebCore determines the TLC-GlobalObject mapping. By default, global objects would simply use > the VM's default TLC. WebCore makes it so that DOM windows (but not worker global objects) get > a TLC based on their document's SecurityOrigin. >- >+ > * JavaScriptCore.xcodeproj/project.pbxproj: > * Sources.txt: > * heap/BlockDirectory.cpp: >@@ -11245,22 +11291,22 @@ > Reviewed by Saam Barati. > > This makes LargeAllocation do the same exact distancing that MarkedBlock promises to do. >- >+ > To make that possible, this patch first makes MarkedBlock know exactly how much distancing it > is doing: >- >+ > - I've rationalized the payloadSize calculation. In particular, I made MarkedSpace use the > calculation done in MarkedBlock. MarkedSpace used to do the math a different way. This > keeps the old way just for a static_assert. >- >+ > - The promised amount of distancing is now codified in HeapCell.h as > minimumDistanceBetweenCellsFromDifferentOrigins. We assert that the footer size is at least > as big as this. I didn't want to just use footer size for this constant because then, if > you increased the size of the footer, you'd also add padding to every large allocation. >- >+ > Then this patch just adds minimumDistanceBetweenCellsFromDifferentOrigins to each large > allocation. It also zeroes that slice of memory to prevent any information leaks that way. >- >+ > This is perf neutral. Large allocations start out at ~8000 bytes. The amount of padding is > ~300 bytes. That's 3.75% space overhead for objects that are ~8000 bytes, zero overhead for > smaller objects, and diminishing overhead for larger objects. We allocate very few large >@@ -11278,10 +11324,10 @@ > https://bugs.webkit.org/show_bug.cgi?id=182220 > > Reviewed by JF Bastien. >- >+ > This makes the block footer larger by moving the newlyAllocated bits from the handle into > the footer. >- >+ > It used to be profitable to put anything we could into the handle because that would free up > payload space inside the block. But now that we want to use the footer for padding, it's > profitable to put GC state information - especially data that is used by the GC itself and so >@@ -11330,10 +11376,10 @@ > https://bugs.webkit.org/show_bug.cgi?id=182217 > > Reviewed by JF Bastien. >- >+ > This moves the MarkedBlock's meta-data from the header to the footer. This doesn't really > change anything except for some compile-time constants, so it should not affect performance. >- >+ > This change is to help protect against Spectre attacks on structure checks, which allow for > small-offset out-of-bounds access. By putting the meta-data at the end of the block, small > OOBs will only get to other objects in the same block or the block footer. The block footer >@@ -11341,7 +11387,7 @@ > can use blocks as the mechanism of achieving distance between objects from different origins. > We just need to avoid ever putting objects from different origins in the same block. That's > what bug 181636 is about. >- >+ > * heap/BlockDirectory.cpp: > (JSC::blockHeaderSize): Deleted. > (JSC::BlockDirectory::blockSizeForBytes): Deleted. >@@ -11480,7 +11526,7 @@ > this by allocating the Node subclass, and casting it to ParserArenaDeletable to > get the correct pointer to append to ParserArena::m_deletableObjects. > >- To simplify things, we introduce a JSC_MAKE_PARSER_ARENA_DELETABLE_ALLOCATED >+ To simplify things, we introduce a JSC_MAKE_PARSER_ARENA_DELETABLE_ALLOCATED > (analogous to WTF_MAKE_FAST_ALLOCATED) for use in Node subclasses that extends > ParserArenaDeletable. > >@@ -11558,14 +11604,14 @@ > https://bugs.webkit.org/show_bug.cgi?id=182086 > > Reviewed by Saam Barati. >- >+ > This implements dynamic poisoning and precise index masking in DirectArguments, using the > helpers from <wtf/MathExtras.h> and helpers in AssemblyHelpers and FTL::LowerDFGToB3. >- >+ > We use dynamic poisoning for DirectArguments since this object did not have any additional > indirection inside it that could have been poisoned. So, we use the xor of the expected type > and the actual type as an additional input into the pointer. >- >+ > We use precise index masking for bounds checks, because it's not worth doing index masking > unless we know that precise index masking is too slow. > >@@ -11615,13 +11661,13 @@ > https://bugs.webkit.org/show_bug.cgi?id=181559 > > Reviewed by Mark Lam and Saam Barati. >- >+ > This is a big step towards object distancing by site origin. This patch implements TLCs, or > thread-local caches, which allow each thread to allocate from its own free lists. It also > means that any given thread can context-switch TLCs. This will allow us to do separate > allocation for separate site origins. Eventually, once we reshape how MarkedBlock looks, this > will allow us to have a hard distancing constraint between objects from different origins. >- >+ > In this new design, every "size class" is represented as a BlockDirectory (formerly known as > MarkedAllocator, prior to r226822). This contains a bag of blocks allocated using some > aligned memory allocator (which roughly represents which cage you came out of), and anyone >@@ -11629,7 +11675,7 @@ > BlockDirectory, they will have the size and type of that directory. Previously, each > BlockDirectory had exactly one FreeList. Now, each BlockDirectory has a double-linked-list of > LocalAllocators, each of which has a FreeList. >- >+ > To decide which LocalAllocator to allocate out of, we need a ThreadLocalCache and a > BlockDirectory. The directory gives us an offset-within-the-ThreadLocalCache, which we simply > call the Allocator (which is just a POD type that contains a 32-bit offset). Each allocation >@@ -11638,12 +11684,12 @@ > Allocator offset to the ThreadLocalCache::Data to get the LocalAllocator. Note that we use > offsets as opposed to indices to make it easy to do the math on each allocation (if > LocalAllocator had a weird size then every allocation would have to do an imul). >- >+ > This is a definite slow-down on GC-heavy benchmarks, but by a small margin, and only on > unusually heavy tests. For example, boyer and splay are both 3% regressed, but the Octane > geomean is just fine. The JetStream score regressed by 0.5% with p = 0.08 (so maybe there is > something there, but it's not significant according to our threshold). >- >+ > Relanding after fixing ARM64 bug in AssemblyHelpers::emitAllocateWithNonNullAllocator(). That > function needs to be careful to avoid using the scratch register because the FTL will call it > in disallow-scratch-register mode. >@@ -11893,13 +11939,13 @@ > https://bugs.webkit.org/show_bug.cgi?id=181559 > > Reviewed by Mark Lam and Saam Barati. >- >+ > This is a big step towards object distancing by site origin. This patch implements TLCs, or > thread-local caches, which allow each thread to allocate from its own free lists. It also > means that any given thread can context-switch TLCs. This will allow us to do separate > allocation for separate site origins. Eventually, once we reshape how MarkedBlock looks, this > will allow us to have a hard distancing constraint between objects from different origins. >- >+ > In this new design, every "size class" is represented as a BlockDirectory (formerly known as > MarkedAllocator, prior to r226822). This contains a bag of blocks allocated using some > aligned memory allocator (which roughly represents which cage you came out of), and anyone >@@ -11907,7 +11953,7 @@ > BlockDirectory, they will have the size and type of that directory. Previously, each > BlockDirectory had exactly one FreeList. Now, each BlockDirectory has a double-linked-list of > LocalAllocators, each of which has a FreeList. >- >+ > To decide which LocalAllocator to allocate out of, we need a ThreadLocalCache and a > BlockDirectory. The directory gives us an offset-within-the-ThreadLocalCache, which we simply > call the Allocator (which is just a POD type that contains a 32-bit offset). Each allocation >@@ -11916,7 +11962,7 @@ > Allocator offset to the ThreadLocalCache::Data to get the LocalAllocator. Note that we use > offsets as opposed to indices to make it easy to do the math on each allocation (if > LocalAllocator had a weird size then every allocation would have to do an imul). >- >+ > This is a definite slow-down on GC-heavy benchmarks, but by a small margin, and only on > unusually heavy tests. For example, boyer and splay are both 3% regressed, but the Octane > geomean is just fine. The JetStream score regressed by 0.5% with p = 0.08 (so maybe there is >@@ -12265,9 +12311,9 @@ > https://bugs.webkit.org/show_bug.cgi?id=182006 > > Reviewed by Keith Miller. >- >+ > This protects speculative out-of-bounds on arguments[index]. >- >+ > Making this work right involved fixing a possible overflow situation with > numberOfArgumentsToSkip. > >@@ -12375,12 +12421,12 @@ > https://bugs.webkit.org/show_bug.cgi?id=181999 > > Reviewed by Saam Barati and Mark Lam. >- >+ > This is going to make it possible to use precise index masking for arguments-on-the-stack > accesses with an index adjusted so that 0 is this. Without this change, we would have no way > of masking when the argument count is 0, unless we padded the argument area so that there was > always an argument slot after `this` and it was always initialized. >- >+ > This is neutral on all benchmarks. > > * dfg/DFGByteCodeParser.cpp: >@@ -12400,12 +12446,12 @@ > https://bugs.webkit.org/show_bug.cgi?id=181991 > > Reviewed by JF Bastien and Mark Lam. >- >+ > This adds a WTF::speculationFence on VM entry and exit. >- >+ > For a microbenchmark that just calls a native function (supplied via an Objective-C block) in a > tight loop from JS is a 0% regression on x86 and a 11% regression on ARM64. >- >+ > * runtime/JSLock.cpp: > (JSC::JSLock::didAcquireLock): > (JSC::JSLock::willReleaseLock): >@@ -13048,7 +13094,7 @@ > This often leads to the first compile of a CodeBlock, backed by an UnlinkedCodeBlock > pulled from the code cache, making better compilation decisions, usually > resulting in fewer exits, and fewer recompilations. >- >+ > This is a 1% Speedometer progression in my testing. > > * bytecode/BytecodeDumper.cpp: >@@ -13174,14 +13220,14 @@ > However, we may eliminate a CheckStructure if it's preceded by a CheckStructureOrEmpty. This doesn't > have semantic consequences when validation is turned off. However, with validation on, this trips up > our OSR exit machinery that says when an exit is allowed to happen. >- >+ > Consider the following IR: >- >+ > a: GetClosureVar // Or any other node that produces BytecodeTop > ... > c: CheckStructure(Cell:@a, {s2}) > d: PutByOffset(KnownCell:@a, KnownCell:@a, @value) >- >+ > In the TypeCheckHoistingPhase, we may insert CheckStructureOrEmptys like this: > a: GetClosureVar > e: CheckStructureOrEmpty(@a, {s1}) >@@ -13189,23 +13235,23 @@ > f: CheckStructureOrEmpty(@a, {s2}) > c: CheckStructure(Cell:@a, {s2}) > d: PutByOffset(KnownCell:@a, KnownCell:@a, @value) >- >+ > This will cause constant folding to change the IR to: > a: GetClosureVar > e: CheckStructureOrEmpty(@a, {s1}) > ... > f: CheckStructureOrEmpty(@a, {s2}) > d: PutByOffset(KnownCell:@a, KnownCell:@a, @value) >- >+ > Our mayExit analysis determines that the PutByOffset should not exit. Note >- that AI will determine the only value the PutByOffset can see in @a is >+ that AI will determine the only value the PutByOffset can see in @a is > the empty value. Because KnownCell filters SpecCell and not SpecCellCheck, > when lowering the PutByOffset, we reach a contradiction in AI and emit > an OSR exit. However, because mayExit said we couldn't exit, we assert. >- >+ > Note that if we did not run the TypeCheckHoistingPhase on this IR, AI > would have determined we would OSR exit at the second CheckStructure. >- >+ > This patch makes it so constant folding produces the following IR: > a: GetClosureVar > e: CheckStructureOrEmpty(@a, {s1}) >@@ -13214,7 +13260,7 @@ > f: CheckStructureOrEmpty(@a, {s2}) > h: AssertNotEmpty(@a) > d: PutByOffset(KnownCell:@a, KnownCell:@a, @value) >- >+ > This modification will cause AI to know we will OSR exit before even reaching > the PutByOffset. Note that in the original IR, the GetClosureVar won't > actually produce the TDZ value. If it did, bytecode would have caused us >@@ -13341,7 +13387,7 @@ > https://bugs.webkit.org/show_bug.cgi?id=181543 > > Rubber stamped by Michael Saboff. >- >+ > In a world that has thread-local caches, the thing we now call the "MarkedAllocator" doesn't > really have anything to do with allocation anymore. The allocation will be done by something > in the TLC. When you move the allocation logic out of MarkedAllocator, it becomes just a >@@ -13701,15 +13747,15 @@ > https://bugs.webkit.org/show_bug.cgi?id=180884 > > Reviewed by Saam Barati. >- >+ > This moves CodeBlocks into IsoSubspaces. Doing so means that we no longer need to have the > special CodeBlockSet HashSets of new and old CodeBlocks. We also no longer use > WeakReferenceHarvester or UnconditionalFinalizer. Instead: >- >+ > - Code block sweeping is now just eager sweeping. This means that it automatically takes > advantage of our unswept set, which roughly corresponds to what CodeBlockSet used to use > its eden set for. >- >+ > - Those idea of Executable "weakly visiting" the CodeBlock is replaced by Executable > marking a ExecutableToCodeBlockEdge object. That object being marked corresponds to what > we used to call CodeBlock "having been weakly visited". This means that CodeBlockSet no >@@ -13718,20 +13764,20 @@ > CodeBlocks during GC are now the edge's job. The edge is also in an IsoSubspace and it > has IsoCellSets to tell us which edges have output constraints (what we used to call > CodeBlock's weak reference harvester) and which have unconditional finalizers. >- >+ > - CodeBlock now uses an IsoCellSet to tell if it has an unconditional finalizer. >- >+ > - CodeBlockSet still exists! It has one unified HashSet of CodeBlocks that we use to > handle requests from the sampler, debugger, and other facilities. They may want to ask > if some pointer corresponds to a CodeBlock during stages of execution during which the > GC is unable to answer isLive() queries. The trickiest is the sampling profiler thread. > There is no way that the GC's isLive could tell us of a CodeBlock that had already been > allocated has now been full constructed. >- >+ > Rolling this back in because it was rolled out by mistake. There was a flaky crash that was > happening before and after this change, but we misread the revision numbers at first and > thought that this was the cause. >- >+ > * JavaScriptCore.xcodeproj/project.pbxproj: > * Sources.txt: > * bytecode/CodeBlock.cpp: >@@ -14003,7 +14049,7 @@ > indexed properties. Clearly this is wrong. This caching breaks when a prototype > adds new indexed properties. We would continue to enumerate the old cached > state of properties, and not include the new indexed properties. >- >+ > The old code used to prevent caching only if the base structure had > indexed properties. This patch extends it to prevent caching if the > base, or any structure in the prototype chain, has indexed properties. >@@ -14092,15 +14138,15 @@ > https://bugs.webkit.org/show_bug.cgi?id=180884 > > Reviewed by Saam Barati. >- >+ > This moves CodeBlocks into IsoSubspaces. Doing so means that we no longer need to have the > special CodeBlockSet HashSets of new and old CodeBlocks. We also no longer use > WeakReferenceHarvester or UnconditionalFinalizer. Instead: >- >+ > - Code block sweeping is now just eager sweeping. This means that it automatically takes > advantage of our unswept set, which roughly corresponds to what CodeBlockSet used to use > its eden set for. >- >+ > - Those idea of Executable "weakly visiting" the CodeBlock is replaced by Executable > marking a ExecutableToCodeBlockEdge object. That object being marked corresponds to what > we used to call CodeBlock "having been weakly visited". This means that CodeBlockSet no >@@ -14109,16 +14155,16 @@ > CodeBlocks during GC are now the edge's job. The edge is also in an IsoSubspace and it > has IsoCellSets to tell us which edges have output constraints (what we used to call > CodeBlock's weak reference harvester) and which have unconditional finalizers. >- >+ > - CodeBlock now uses an IsoCellSet to tell if it has an unconditional finalizer. >- >+ > - CodeBlockSet still exists! It has one unified HashSet of CodeBlocks that we use to > handle requests from the sampler, debugger, and other facilities. They may want to ask > if some pointer corresponds to a CodeBlock during stages of execution during which the > GC is unable to answer isLive() queries. The trickiest is the sampling profiler thread. > There is no way that the GC's isLive could tell us of a CodeBlock that had already been > allocated has now been full constructed. >- >+ > * JavaScriptCore.xcodeproj/project.pbxproj: > * Sources.txt: > * bytecode/CodeBlock.cpp: >@@ -14329,7 +14375,7 @@ > spending a lot of time compiling basic blocks that never executed. We often > plant ForceOSRExit nodes when we parse bytecodes that have a null value profile. > This is the case when such a node never executes. >- >+ > This patch makes it so that anytime a block has a ForceOSRExit, we replace its > terminal node with an Unreachable node (and remove all nodes after the > ForceOSRExit). This will cut down on graph size when such a block dominates >@@ -14337,13 +14383,13 @@ > in certain programs. When doing this transformation, we also insert > Flushes/PhantomLocals to ensure we can recover values that are bytecode > live-in to the ForceOSRExit. >- >+ > Using ForceOSRExit as the signal for this is a bit of a hack. It definitely > does not get rid of all the CFG that it could. If we decide it's worth > it, we could use additional inputs into this mechanism. For example, we could > profile if a basic block ever executes inside the LLInt/Baseline, and > remove parts of the CFG based on that. >- >+ > When running Speedometer with the concurrent JIT turned off, this patch > improves DFG/FTL compile times by around 5%. > >@@ -14756,7 +14802,7 @@ > SpecCellOther input also produced SpecCellOther. However, this is incorrect, > given that the input may implement ToThis that produces an arbitrary result. > This is seen inside Speedometer. This patch fixes an OSR exit loop in Speedometer. >- >+ > Interestingly, this patch only does value profiling on the slow path. The fast > path of to_this in the LLInt/baseline just perform a structure check. If it > passes, the result is the same as the input. Therefore, doing value profiling >@@ -14884,11 +14930,11 @@ > Inside Speedometer's Ember test, there is a recompile loop like: > a: GetByVal(..., semanticOriginX) > b: SetLocal(Cell:@a, semanticOriginX) >- >+ > where the cell check always fails. For reasons I didn't investigate, the > baseline JIT's value profiling doesn't accurately capture the GetByVal's > result. >- >+ > However, when compiling this cell speculation check in the DFG, we get a null > MethodOfGettingAValueProfile inside Graph::methodOfGettingAValueProfileFor for > this IR pattern because both @a and @b have the same semantic origin. We >@@ -15111,7 +15157,7 @@ > Reviewed by Brent Fulgham. > > Do not set the runtime library compile flag for C files, it is already set to the correct value. >- >+ > * shell/PlatformWin.cmake: > > 2018-01-03 Robin Morisset <rmorisset@apple.com> >@@ -15134,11 +15180,11 @@ > Reviewed by Yusuke Suzuki. > > Consider a PutById compiled to a setter in a function like so: >- >+ > ``` > function foo(o) { o.f = o; } > ``` >- >+ > The DFG will often assign the same registers to the baseGPR (o in o.f) and the > valueRegsPayloadGPR (o in the RHS). The code totally works when these are assigned > to the same register. However, we're asserting that they're not the same register. >@@ -15166,7 +15212,7 @@ > spec. > > [1] - https://tc39.github.io/proposal-bigint/#sec-bigint-constructor >- [2] - https://tc39.github.io/proposal-bigint/#sec-properties-of-the-bigint-prototype-object >+ [2] - https://tc39.github.io/proposal-bigint/#sec-properties-of-the-bigint-prototype-object > > * CMakeLists.txt: > * DerivedSources.make: >diff --git a/Source/JavaScriptCore/parser/Parser.cpp b/Source/JavaScriptCore/parser/Parser.cpp >index 6fa3ad1fa7..8a9dd71d23 100644 >--- a/Source/JavaScriptCore/parser/Parser.cpp >+++ b/Source/JavaScriptCore/parser/Parser.cpp >@@ -156,12 +156,12 @@ Parser<LexerType>::Parser(VM* vm, const SourceCode& source, JSParserBuiltinMode > scope->setIsEvalContext(isEvalContext); > if (isEvalContext) > scope->setEvalContextType(evalContextType); >- >+ > if (derivedContextType == DerivedContextType::DerivedConstructorContext) { > scope->setConstructorKind(ConstructorKind::Extends); > scope->setExpectedSuperBinding(SuperBinding::Needed); > } >- >+ > if (derivedContextType == DerivedContextType::DerivedMethodContext) > scope->setExpectedSuperBinding(SuperBinding::Needed); > >@@ -294,7 +294,7 @@ String Parser<LexerType>::parseInner(const Identifier& calleeName, SourceParseMo > } > > template <typename LexerType> >-void Parser<LexerType>::didFinishParsing(SourceElements* sourceElements, DeclarationStacks::FunctionStack&& funcStack, >+void Parser<LexerType>::didFinishParsing(SourceElements* sourceElements, DeclarationStacks::FunctionStack&& funcStack, > VariableEnvironment& varDeclarations, UniquedStringImplPtrSet&& sloppyModeHoistedFunctions, CodeFeatures features, int numConstants) > { > m_sourceElements = sourceElements; >@@ -358,7 +358,7 @@ template <class TreeBuilder> TreeSourceElements Parser<LexerType>::parseSourceEl > unsigned directiveLiteralLength = 0; > auto savePoint = createSavePoint(); > bool shouldCheckForUseStrict = mode == CheckForStrictMode; >- >+ > while (TreeStatement statement = parseStatementListItem(context, directive, &directiveLiteralLength)) { > if (shouldCheckForUseStrict) { > if (directive) { >@@ -570,14 +570,14 @@ template <class TreeBuilder> TreeSourceElements Parser<LexerType>::parseAsyncGen > { > ASSERT_UNUSED(parseMode, isAsyncGeneratorFunctionParseMode(parseMode)); > auto sourceElements = context.createSourceElements(); >- >+ > unsigned functionKeywordStart = tokenStart(); > JSTokenLocation startLocation(tokenLocation()); > JSTextPosition start = tokenStartPosition(); > unsigned startColumn = tokenColumn(); > int functionNameStart = m_token.m_location.startOffset; > int parametersStart = m_token.m_location.startOffset; >- >+ > ParserFunctionInfo<TreeBuilder> info; > info.name = &m_vm->propertyNames->nullIdentifier; > createGeneratorParameters(context, info.parameterCount); >@@ -610,10 +610,10 @@ template <class TreeBuilder> TreeSourceElements Parser<LexerType>::parseAsyncGen > auto functionExpr = context.createAsyncFunctionBody(startLocation, info, innerParseMode); > auto statement = context.createExprStatement(startLocation, functionExpr, start, m_lastTokenEndPosition.line); > context.appendStatement(sourceElements, statement); >- >+ > return sourceElements; > } >- >+ > template <typename LexerType> > template <class TreeBuilder> TreeStatement Parser<LexerType>::parseStatementListItem(TreeBuilder& context, const Identifier*& directive, unsigned* directiveLiteralLength) > { >@@ -715,7 +715,7 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseVariableDecla > TreeExpression variableDecls = parseVariableDeclarationList(context, scratch, scratch1, scratch2, scratch3, scratch3, scratch3, VarDeclarationContext, declarationType, exportType, scratchBool); > propagateError(); > failIfFalse(autoSemiColon(), "Expected ';' after variable declaration"); >- >+ > return context.createDeclarationStatement(location, variableDecls, start, end); > } > >@@ -751,7 +751,7 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseWhileStatemen > JSTokenLocation location(tokenLocation()); > int startLine = tokenLine(); > next(); >- >+ > handleProductionOrFail(OPENPAREN, "(", "start", "while loop condition"); > semanticFailIfTrue(match(CLOSEPAREN), "Must provide an expression as a while loop condition"); > TreeExpression expr = parseExpression(context); >@@ -775,7 +775,7 @@ template <class TreeBuilder> TreeExpression Parser<LexerType>::parseVariableDecl > TreeExpression head = 0; > TreeExpression tail = 0; > const Identifier* lastIdent; >- JSToken lastIdentToken; >+ JSToken lastIdentToken; > AssignmentContext assignmentContext = assignmentContextFromDeclarationType(declarationType); > do { > lastIdent = 0; >@@ -786,7 +786,7 @@ template <class TreeBuilder> TreeExpression Parser<LexerType>::parseVariableDecl > declarations++; > bool hasInitializer = false; > if (matchSpecIdentifier()) { >- failIfTrue(match(LET) && (declarationType == DeclarationType::LetDeclaration || declarationType == DeclarationType::ConstDeclaration), >+ failIfTrue(match(LET) && (declarationType == DeclarationType::LetDeclaration || declarationType == DeclarationType::ConstDeclaration), > "Cannot use 'let' as an identifier name for a LexicalDeclaration"); > semanticFailIfTrue(isDisallowedIdentifierAwait(m_token), "Cannot use 'await' as a ", declarationTypeToVariableKind(declarationType), " ", disallowedIdentifierAwaitReason()); > JSTextPosition varStart = tokenStartPosition(); >@@ -801,7 +801,7 @@ template <class TreeBuilder> TreeExpression Parser<LexerType>::parseVariableDecl > if (declarationResult != DeclarationResult::Valid) { > failIfTrueIfStrict(declarationResult & DeclarationResult::InvalidStrictMode, "Cannot declare a variable named ", name->impl(), " in strict mode"); > if (declarationResult & DeclarationResult::InvalidDuplicateDeclaration) { >- if (declarationType == DeclarationType::LetDeclaration) >+ if (declarationType == DeclarationType::LetDeclaration) > internalFailWithMessage(false, "Cannot declare a let variable twice: '", name->impl(), "'"); > if (declarationType == DeclarationType::ConstDeclaration) > internalFailWithMessage(false, "Cannot declare a const variable twice: '", name->impl(), "'"); >@@ -823,7 +823,7 @@ template <class TreeBuilder> TreeExpression Parser<LexerType>::parseVariableDecl > initEnd = lastTokenEndPosition(); > lastInitializer = initializer; > failIfFalse(initializer, "Expected expression as the intializer for the variable '", name->impl(), "'"); >- >+ > node = context.createAssignResolve(location, *name, initializer, varStart, varDivot, lastTokenEndPosition(), assignmentContext); > } else { > if (declarationListContext == ForLoopContext && declarationType == DeclarationType::ConstDeclaration) >@@ -895,7 +895,7 @@ template <typename LexerType> > template <class TreeBuilder> TreeDestructuringPattern Parser<LexerType>::createBindingPattern(TreeBuilder& context, DestructuringKind kind, ExportType exportType, const Identifier& name, JSToken token, AssignmentContext bindingContext, const Identifier** duplicateIdentifier) > { > ASSERT(!name.isNull()); >- >+ > ASSERT(name.impl()->isAtomic() || name.impl()->isSymbol()); > > switch (kind) { >@@ -953,11 +953,11 @@ template <class TreeBuilder> TreeSourceElements Parser<LexerType>::parseArrowFun > failIfStackOverflow(); > TreeExpression expr = parseAssignmentExpression(context); > failIfFalse(expr, "Cannot parse the arrow function expression"); >- >+ > context.setEndOffset(expr, m_lastTokenEndPosition.offset); > > JSTextPosition end = tokenEndPosition(); >- >+ > TreeSourceElements sourceElements = context.createSourceElements(); > TreeStatement body = context.createReturnStatement(location, expr, start, end); > context.setEndOffset(body, m_lastTokenEndPosition.offset); >@@ -1053,7 +1053,7 @@ template <class TreeBuilder> TreeDestructuringPattern Parser<LexerType>::parseOb > ASSERT(kind != DestructuringKind::DestructureToExpressions); > failIfStackOverflow(); > TreeDestructuringPattern pattern; >- >+ > if (!matchSpecIdentifier()) { > semanticFailureDueToKeyword(destructuringKindToVariableKindName(kind)); > failWithMessage("Expected a binding element"); >@@ -1209,7 +1209,7 @@ template <class TreeBuilder> TreeDestructuringPattern Parser<LexerType>::parseDe > semanticFailIfTrue(tokenType == RESERVED, "Cannot use abbreviated destructuring syntax for reserved name '", propertyName->impl(), "'"); > semanticFailIfTrue(tokenType == RESERVED_IF_STRICT, "Cannot use abbreviated destructuring syntax for reserved name '", propertyName->impl(), "' in strict mode"); > semanticFailIfTrue(tokenType & KeywordTokenFlag, "Cannot use abbreviated destructuring syntax for keyword '", propertyName->impl(), "'"); >- >+ > failWithMessage("Expected a ':' prior to a named destructuring property"); > } > innerPattern = parseBindingOrAssignmentElement(context, kind, exportType, duplicateIdentifier, hasDestructuringPattern, bindingContext, depth + 1); >@@ -1370,11 +1370,11 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseForStatement( > failIfFalse(expr, "Expected expression to enumerate"); > recordPauseLocation(context.breakpointLocation(expr)); > JSTextPosition exprEnd = lastTokenEndPosition(); >- >+ > int endLine = tokenLine(); >- >+ > handleProductionOrFail(CLOSEPAREN, ")", "end", (isOfEnumeration ? "for-of header" : "for-in header")); >- >+ > const Identifier* unused = 0; > startLoop(); > TreeStatement statement = parseStatement(context, unused); >@@ -1394,7 +1394,7 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseForStatement( > popLexicalScopeIfNecessary(); > return result; > } >- >+ > if (!match(SEMICOLON)) { > if (match(OPENBRACE) || match(OPENBRACKET)) { > SavePoint savePoint = createSavePoint(); >@@ -1414,7 +1414,7 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseForStatement( > failIfFalse(decls, "Cannot parse for loop declarations"); > recordPauseLocation(context.breakpointLocation(decls)); > } >- >+ > if (match(SEMICOLON)) { > standardForLoop: > failIfFalse(!isAwaitFor, "Unexpected a ';' in for-await-of header"); >@@ -1424,14 +1424,14 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseForStatement( > next(); > TreeExpression condition = 0; > failIfTrue(forLoopConstDoesNotHaveInitializer && isConstDeclaration, "const variables in for loops must have initializers"); >- >+ > if (!match(SEMICOLON)) { > condition = parseExpression(context); > failIfFalse(condition, "Cannot parse for loop condition expression"); > recordPauseLocation(context.breakpointLocation(condition)); > } > consumeOrFail(SEMICOLON, "Expected a ';' after the for loop condition expression"); >- >+ > TreeExpression increment = 0; > if (!match(CLOSEPAREN)) { > increment = parseExpression(context); >@@ -1450,7 +1450,7 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseForStatement( > popLexicalScopeIfNecessary(); > return result; > } >- >+ > // For-in and For-of loop > enumerationLoop: > failIfFalse(nonLHSCount == m_parserState.nonLHSCount, "Expected a reference on the left hand side of an enumeration statement"); >@@ -1469,7 +1469,7 @@ enumerationLoop: > recordPauseLocation(context.breakpointLocation(expr)); > JSTextPosition exprEnd = lastTokenEndPosition(); > int endLine = tokenLine(); >- >+ > handleProductionOrFail(CLOSEPAREN, ")", "end", (isOfEnumeration ? "for-of header" : "for-in header")); > const Identifier* unused = 0; > startLoop(); >@@ -1508,7 +1508,7 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseBreakStatemen > JSTextPosition start = tokenStartPosition(); > JSTextPosition end = tokenEndPosition(); > next(); >- >+ > if (autoSemiColon()) { > semanticFailIfFalse(breakIsValid(), "'break' is only valid inside a switch or loop statement"); > return context.createBreakStatement(location, &m_vm->propertyNames->nullIdentifier, start, end); >@@ -1530,7 +1530,7 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseContinueState > JSTextPosition start = tokenStartPosition(); > JSTextPosition end = tokenEndPosition(); > next(); >- >+ > if (autoSemiColon()) { > semanticFailIfFalse(continueIsValid(), "'continue' is only valid inside a loop statement"); > return context.createContinueStatement(location, &m_vm->propertyNames->nullIdentifier, start, end); >@@ -1582,12 +1582,12 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseThrowStatemen > next(); > failIfTrue(match(SEMICOLON), "Expected expression after 'throw'"); > semanticFailIfTrue(autoSemiColon(), "Cannot have a newline after 'throw'"); >- >+ > TreeExpression expr = parseExpression(context); > failIfFalse(expr, "Cannot parse expression for throw statement"); > JSTextPosition end = lastTokenEndPosition(); > failIfFalse(autoSemiColon(), "Expected a ';' after a throw statement"); >- >+ > return context.createThrowStatement(location, expr, start, end); > } > >@@ -1612,7 +1612,7 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseWithStatement > const Identifier* unused = 0; > TreeStatement statement = parseStatement(context, unused); > failIfFalse(statement, "A 'with' statement must have a body"); >- >+ > return context.createWithStatement(location, expr, statement, start, end, startLine, endLine); > } > >@@ -1628,7 +1628,7 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseSwitchStateme > failIfFalse(expr, "Cannot parse switch subject expression"); > recordPauseLocation(context.breakpointLocation(expr)); > int endLine = tokenLine(); >- >+ > handleProductionOrFail(CLOSEPAREN, ")", "end", "subject of a 'switch'"); > handleProductionOrFail(OPENBRACE, "{", "start", "body of a 'switch'"); > AutoPopScopeRef lexicalScope(this, pushScope()); >@@ -1637,15 +1637,15 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseSwitchStateme > startSwitch(); > TreeClauseList firstClauses = parseSwitchClauses(context); > propagateError(); >- >+ > TreeClause defaultClause = parseSwitchDefaultClause(context); > propagateError(); >- >+ > TreeClauseList secondClauses = parseSwitchClauses(context); > propagateError(); > endSwitch(); > handleProductionOrFail(CLOSEBRACE, "}", "end", "body of a 'switch'"); >- >+ > TreeStatement result = context.createSwitchStatement(location, expr, firstClauses, defaultClause, secondClauses, startLine, endLine, lexicalScope->finalizeLexicalEnvironment(), lexicalScope->takeFunctionDeclarations()); > popScope(lexicalScope, TreeBuilder::NeedsFreeVariableInfo); > return result; >@@ -1667,7 +1667,7 @@ template <class TreeBuilder> TreeClauseList Parser<LexerType>::parseSwitchClause > context.setStartOffset(clause, startOffset); > TreeClauseList clauseList = context.createClauseList(clause); > TreeClauseList tail = clauseList; >- >+ > while (match(CASE)) { > startOffset = tokenStart(); > next(); >@@ -1710,14 +1710,14 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseTryStatement( > int firstLine = tokenLine(); > next(); > matchOrFail(OPENBRACE, "Expected a block statement as body of a try statement"); >- >+ > tryBlock = parseBlockStatement(context); > failIfFalse(tryBlock, "Cannot parse the body of try block"); > int lastLine = m_lastTokenEndPosition.line; >- VariableEnvironment catchEnvironment; >+ VariableEnvironment catchEnvironment; > if (match(CATCH)) { > next(); >- >+ > if (match(OPENBRACE)) { > catchBlock = parseBlockStatement(context); > failIfFalse(catchBlock, "Unable to parse 'catch' block"); >@@ -1745,7 +1745,7 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseTryStatement( > popScope(catchScope, TreeBuilder::NeedsFreeVariableInfo); > } > } >- >+ > if (match(FINALLY)) { > next(); > matchOrFail(OPENBRACE, "Expected block statement for finally body"); >@@ -1775,7 +1775,7 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseBlockStatemen > { > ASSERT(match(OPENBRACE)); > >- // We should treat the first block statement of the function (the body of the function) as the lexical >+ // We should treat the first block statement of the function (the body of the function) as the lexical > // scope of the function itself, and not the lexical scope of a 'block' statement within the function. > AutoCleanupLexicalScope lexicalScope; > bool shouldPushLexicalScope = m_statementDepth > 0; >@@ -2026,7 +2026,7 @@ template <class TreeBuilder> bool Parser<LexerType>::parseFormalParameters(TreeB > > if (UNLIKELY(match(CLOSEPAREN))) > break; >- >+ > if (match(DOTDOTDOT)) { > next(); > semanticFailIfTrue(!m_parserState.allowAwait && match(AWAIT), "Cannot use 'await' as a parameter name in an async function"); >@@ -2122,7 +2122,7 @@ static const char* stringArticleForFunctionMode(SourceParseMode mode) > RELEASE_ASSERT_NOT_REACHED(); > return nullptr; > } >- >+ > static const char* stringForFunctionMode(SourceParseMode mode) > { > switch (mode) { >@@ -2169,7 +2169,7 @@ template <typename LexerType> template <class TreeBuilder, class FunctionInfoTyp > RELEASE_ASSERT(!(SourceParseModeSet(SourceParseMode::ProgramMode, SourceParseMode::ModuleAnalyzeMode, SourceParseMode::ModuleEvaluateMode).contains(mode))); > TreeFormalParameterList parameterList = context.createFormalParameterList(); > SetForScope<FunctionParsePhase> functionParsePhasePoisoner(m_parserState.functionParsePhase, FunctionParsePhase::Parameters); >- >+ > if (UNLIKELY((SourceParseModeSet(SourceParseMode::ArrowFunctionMode, SourceParseMode::AsyncArrowFunctionMode).contains(mode)))) { > if (!matchSpecIdentifier() && !match(OPENPAREN)) { > semanticFailureDueToKeyword(stringForFunctionMode(mode), " name"); >@@ -2177,7 +2177,7 @@ template <typename LexerType> template <class TreeBuilder, class FunctionInfoTyp > } else { > if (match(OPENPAREN)) { > next(); >- >+ > if (match(CLOSEPAREN)) { > functionInfo.parameterCount = 0; > } else { >@@ -2185,7 +2185,7 @@ template <typename LexerType> template <class TreeBuilder, class FunctionInfoTyp > bool isMethod = false; > failIfFalse(parseFormalParameters(context, parameterList, isArrowFunction, isMethod, functionInfo.parameterCount), "Cannot parse parameters for this ", stringForFunctionMode(mode)); > } >- >+ > consumeOrFail(CLOSEPAREN, "Expected a ')' or a ',' after a parameter declaration"); > } else { > functionInfo.parameterCount = 1; >@@ -2317,7 +2317,7 @@ template <class TreeBuilder> bool Parser<LexerType>::parseFunctionInfo(TreeBuild > unsigned bodyEndColumn = endColumnIsOnStartLine ? endLocation.startOffset - currentLineStartOffset : endLocation.startOffset - endLocation.lineStartOffset; > > ASSERT(endLocation.startOffset >= endLocation.lineStartOffset); >- >+ > FunctionBodyType functionBodyType; > if (UNLIKELY(SourceParseModeSet(SourceParseMode::ArrowFunctionMode, SourceParseMode::AsyncArrowFunctionMode).contains(mode))) > functionBodyType = cachedInfo->isBodyArrowExpression ? ArrowFunctionBodyExpression : ArrowFunctionBodyBlock; >@@ -2327,8 +2327,8 @@ template <class TreeBuilder> bool Parser<LexerType>::parseFunctionInfo(TreeBuild > SuperBinding functionSuperBinding = adjustSuperBindingForBaseConstructor(constructorKind, expectedSuperBinding, cachedInfo->needsSuperBinding, cachedInfo->usesEval, cachedInfo->innerArrowFunctionFeatures); > > functionInfo.body = context.createFunctionMetadata( >- startLocation, endLocation, startColumn, bodyEndColumn, >- functionKeywordStart, functionNameStart, parametersStart, >+ startLocation, endLocation, startColumn, bodyEndColumn, >+ functionKeywordStart, functionNameStart, parametersStart, > cachedInfo->strictMode, constructorKind, functionSuperBinding, > cachedInfo->parameterCount, > mode, functionBodyType == ArrowFunctionBodyExpression); >@@ -2337,7 +2337,7 @@ template <class TreeBuilder> bool Parser<LexerType>::parseFunctionInfo(TreeBuild > > functionScope->restoreFromSourceProviderCache(cachedInfo); > popScope(functionScope, TreeBuilder::NeedsFreeVariableInfo); >- >+ > m_token = cachedInfo->endFunctionToken(); > > if (endColumnIsOnStartLine) >@@ -2460,12 +2460,12 @@ template <class TreeBuilder> bool Parser<LexerType>::parseFunctionInfo(TreeBuild > parseFunctionParameters(syntaxChecker, mode, functionInfo); > propagateError(); > } >- >+ > matchOrFail(OPENBRACE, "Expected an opening '{' at the start of a ", stringForFunctionMode(mode), " body"); >- >+ > // BytecodeGenerator emits code to throw TypeError when a class constructor is "call"ed. > // Set ConstructorKind to None for non-constructor methods of classes. >- >+ > if (m_defaultConstructorKind != ConstructorKind::None) { > constructorKind = m_defaultConstructorKind; > expectedSuperBinding = m_defaultConstructorKind == ConstructorKind::Extends ? SuperBinding::Needed : SuperBinding::NotNeeded; >@@ -2530,7 +2530,7 @@ template <class TreeBuilder> bool Parser<LexerType>::parseFunctionInfo(TreeBuild > popScope(generatorBodyScope, TreeBuilder::NeedsFreeVariableInfo); > } else > functionInfo.body = performParsingFunctionBody(); >- >+ > restoreParserState(oldState); > failIfFalse(functionInfo.body, "Cannot parse the body of this ", stringForFunctionMode(mode)); > context.setEndOffset(functionInfo.body, m_lexer->currentOffset()); >@@ -2543,7 +2543,7 @@ template <class TreeBuilder> bool Parser<LexerType>::parseFunctionInfo(TreeBuild > > JSTokenLocation location = JSTokenLocation(m_token.m_location); > functionInfo.endOffset = m_token.m_data.offset; >- >+ > if (functionBodyType == ArrowFunctionBodyExpression) { > location = locationBeforeLastToken(); > functionInfo.endOffset = location.endOffset; >@@ -2577,9 +2577,9 @@ template <class TreeBuilder> bool Parser<LexerType>::parseFunctionInfo(TreeBuild > functionScope->fillParametersForSourceProviderCache(parameters, nonLocalCapturesFromParameterExpressions); > newInfo = SourceProviderCacheItem::create(parameters); > } >- >+ > popScope(functionScope, TreeBuilder::NeedsFreeVariableInfo); >- >+ > if (functionBodyType != ArrowFunctionBodyExpression) { > matchOrFail(CLOSEBRACE, "Expected a closing '}' after a ", stringForFunctionMode(mode), " body"); > next(); >@@ -2587,7 +2587,7 @@ template <class TreeBuilder> bool Parser<LexerType>::parseFunctionInfo(TreeBuild > > if (newInfo) > m_functionCache->add(functionInfo.startOffset, WTFMove(newInfo)); >- >+ > functionInfo.endLine = m_lastTokenEndPosition.line; > return true; > } >@@ -2937,7 +2937,7 @@ struct LabelInfo { > , m_end(end) > { > } >- >+ > const Identifier* m_ident; > JSTextPosition m_start; > JSTextPosition m_end; >@@ -2946,7 +2946,7 @@ struct LabelInfo { > template <typename LexerType> > template <class TreeBuilder> TreeStatement Parser<LexerType>::parseExpressionOrLabelStatement(TreeBuilder& context, bool allowFunctionDeclarationAsStatement) > { >- >+ > /* Expression and Label statements are ambiguous at LL(1), so we have a > * special case that looks for a colon as the next character in the input. > */ >@@ -2989,7 +2989,7 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseExpressionOrL > case DO: > isLoop = true; > break; >- >+ > default: > break; > } >@@ -3018,7 +3018,7 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseExpressionSta > { > switch (m_token.m_type) { > // Consult: http://www.ecma-international.org/ecma-262/6.0/index.html#sec-expression-statement >- // The ES6 spec mandates that we should fail from FUNCTION token here. We handle this case >+ // The ES6 spec mandates that we should fail from FUNCTION token here. We handle this case > // in parseStatement() which is the only caller of parseExpressionStatement(). > // We actually allow FUNCTION in situations where it should not be allowed unless we're in strict mode. > case CLASSTOKEN: >@@ -3079,7 +3079,7 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseIfStatement(T > } > int innerStart = tokenLine(); > next(); >- >+ > handleProductionOrFail2(OPENPAREN, "(", "start", "'if' condition"); > > TreeExpression innerCondition = parseExpression(context); >@@ -3589,12 +3589,12 @@ template <typename TreeBuilder> NEVER_INLINE const char* Parser<LexerType>::meta > RELEASE_ASSERT_NOT_REACHED(); > return "error"; > } >- >+ > template <typename LexerType> > template <typename TreeBuilder> TreeExpression Parser<LexerType>::parseAssignmentExpression(TreeBuilder& context, ExpressionErrorClassifier& classifier) > { > ASSERT(!hasError()); >- >+ > failIfStackOverflow(); > > if (match(YIELD) && !isYIELDMaskedAsIDENT(currentScope()->isGenerator())) >@@ -3671,7 +3671,7 @@ template <typename TreeBuilder> TreeExpression Parser<LexerType>::parseAssignmen > > return lhs; > } >- >+ > int assignmentStack = 0; > Operator op; > bool hadAssignment = false; >@@ -3717,13 +3717,13 @@ template <typename TreeBuilder> TreeExpression Parser<LexerType>::parseAssignmen > end: > if (hadAssignment) > m_parserState.nonLHSCount++; >- >+ > if (!TreeBuilder::CreatesAST) > return lhs; >- >+ > while (assignmentStack) > lhs = context.createAssignment(location, assignmentStack, lhs, initialAssignmentCount, m_parserState.assignmentCount, lastTokenEndPosition()); >- >+ > return lhs; > } > >@@ -3791,7 +3791,7 @@ template <class TreeBuilder> TreeExpression Parser<LexerType>::parseConditionalE > failIfFalse(lhs, "Cannot parse left hand side of ternary operator"); > context.setEndOffset(lhs, m_lastTokenEndPosition.offset); > consumeOrFailWithFlags(COLON, TreeBuilder::DontBuildStrings, "Expected ':' in ternary operator"); >- >+ > TreeExpression rhs = parseAssignmentExpression(context); > failIfFalse(rhs, "Cannot parse right hand side of ternary operator"); > context.setEndOffset(rhs, m_lastTokenEndPosition.offset); >@@ -3826,7 +3826,7 @@ template <class TreeBuilder> TreeExpression Parser<LexerType>::parseBinaryExpres > JSTokenType leadingTokenTypeForUnaryExpression = m_token.m_type; > TreeExpression current = parseUnaryExpression(context); > failIfFalse(current, "Cannot parse expression"); >- >+ > context.appendBinaryExpressionInfo(operandStackDepth, current, exprStart, lastTokenEndPosition(), lastTokenEndPosition(), initialAssignments != m_parserState.assignmentCount); > > // 12.6 https://tc39.github.io/ecma262/#sec-exp-operator >@@ -3859,10 +3859,10 @@ template <class TreeBuilder> TreeExpression Parser<LexerType>::parseBinaryExpres > m_parserState.nonLHSCount++; > int operatorToken = m_token.m_type; > next(TreeBuilder::DontBuildStrings); >- >+ > while (operatorStackDepth && context.operatorStackShouldReduce(precedence)) { > ASSERT(operandStackDepth > 1); >- >+ > typename TreeBuilder::BinaryOperand rhs = context.getFromOperandStack(-1); > typename TreeBuilder::BinaryOperand lhs = context.getFromOperandStack(-2); > context.shrinkOperandStackBy(operandStackDepth, 2); >@@ -3873,7 +3873,7 @@ template <class TreeBuilder> TreeExpression Parser<LexerType>::parseBinaryExpres > } > while (operatorStackDepth) { > ASSERT(operandStackDepth > 1); >- >+ > typename TreeBuilder::BinaryOperand rhs = context.getFromOperandStack(-1); > typename TreeBuilder::BinaryOperand lhs = context.getFromOperandStack(-2); > context.shrinkOperandStackBy(operandStackDepth, 2); >@@ -4138,12 +4138,12 @@ template <class TreeBuilder> TreeExpression Parser<LexerType>::parseObjectLitera > > int oldNonLHSCount = m_parserState.nonLHSCount; > >- JSTokenLocation location(tokenLocation()); >+ JSTokenLocation location(tokenLocation()); > if (match(CLOSEBRACE)) { > next(); > return context.createObjectLiteral(location); > } >- >+ > TreeProperty property = parseProperty(context, false); > failIfFalse(property, "Cannot parse object literal property"); > >@@ -4180,9 +4180,9 @@ template <class TreeBuilder> TreeExpression Parser<LexerType>::parseObjectLitera > > location = tokenLocation(); > handleProductionOrFail2(CLOSEBRACE, "}", "end", "object literal"); >- >+ > m_parserState.nonLHSCount = oldNonLHSCount; >- >+ > return context.createObjectLiteral(location, propertyList); > } > >@@ -4190,7 +4190,7 @@ template <typename LexerType> > template <class TreeBuilder> TreeExpression Parser<LexerType>::parseStrictObjectLiteral(TreeBuilder& context) > { > consumeOrFail(OPENBRACE, "Expected opening '{' at the start of an object literal"); >- >+ > int oldNonLHSCount = m_parserState.nonLHSCount; > > JSTokenLocation location(tokenLocation()); >@@ -4198,7 +4198,7 @@ template <class TreeBuilder> TreeExpression Parser<LexerType>::parseStrictObject > next(); > return context.createObjectLiteral(location); > } >- >+ > TreeProperty property = parseProperty(context, true); > failIfFalse(property, "Cannot parse object literal property"); > >@@ -4236,9 +4236,9 @@ template <typename LexerType> > template <class TreeBuilder> TreeExpression Parser<LexerType>::parseArrayLiteral(TreeBuilder& context) > { > consumeOrFailWithFlags(OPENBRACKET, TreeBuilder::DontBuildStrings, "Expected an opening '[' at the beginning of an array literal"); >- >+ > int oldNonLHSCount = m_parserState.nonLHSCount; >- >+ > int elisions = 0; > while (match(COMMA)) { > next(TreeBuilder::DontBuildStrings); >@@ -4249,7 +4249,7 @@ template <class TreeBuilder> TreeExpression Parser<LexerType>::parseArrayLiteral > next(TreeBuilder::DontBuildStrings); > return context.createArray(location, elisions); > } >- >+ > TreeExpression elem; > if (UNLIKELY(match(DOTDOTDOT))) { > auto spreadLocation = m_token.m_location; >@@ -4268,12 +4268,12 @@ template <class TreeBuilder> TreeExpression Parser<LexerType>::parseArrayLiteral > while (match(COMMA)) { > next(TreeBuilder::DontBuildStrings); > elisions = 0; >- >+ > while (match(COMMA)) { > next(); > elisions++; > } >- >+ > if (match(CLOSEBRACKET)) { > JSTokenLocation location(tokenLocation()); > next(TreeBuilder::DontBuildStrings); >@@ -4300,9 +4300,9 @@ template <class TreeBuilder> TreeExpression Parser<LexerType>::parseArrayLiteral > failIfFalse(match(DOTDOTDOT), "Expected either a closing ']' or a ',' following an array element"); > semanticFail("The '...' operator should come before a target expression"); > } >- >+ > m_parserState.nonLHSCount = oldNonLHSCount; >- >+ > return context.createArray(location, elementList); > } > >@@ -4587,7 +4587,7 @@ template <class TreeBuilder> TreeArguments Parser<LexerType>::parseArguments(Tre > > if (UNLIKELY(match(CLOSEPAREN))) > break; >- >+ > TreeExpression arg = parseArgument(context, argType); > propagateError(); > semanticFailIfTrue(match(DOTDOTDOT), "The '...' operator should come before the target expression"); >@@ -4748,10 +4748,10 @@ template <class TreeBuilder> TreeExpression Parser<LexerType>::parseMemberExpres > TreeExpression property = parseExpression(context); > failIfFalse(property, "Cannot parse subscript expression"); > base = context.createBracketAccess(startLocation, base, property, initialAssignments != m_parserState.assignmentCount, expressionStart, expressionEnd, tokenEndPosition()); >- >+ > if (UNLIKELY(baseIsSuper && currentScope()->isArrowFunction())) > currentFunctionScope()->setInnerArrowFunctionUsesSuperProperty(); >- >+ > handleProductionOrFail(CLOSEBRACKET, "]", "end", "subscript expression"); > m_parserState.nonLHSCount = nonLHSCount; > break; >@@ -4871,13 +4871,13 @@ static const char* operatorString(bool prefix, unsigned tok) > > case TILDE: > return "bitwise-not"; >- >+ > case TYPEOF: > return "typeof"; >- >+ > case VOIDTOKEN: > return "void"; >- >+ > case DELETETOKEN: > return "delete"; > } >@@ -4970,7 +4970,7 @@ template <class TreeBuilder> TreeExpression Parser<LexerType>::parseUnaryExpress > default: > break; > } >- >+ > JSTextPosition end = lastTokenEndPosition(); > > if (!TreeBuilder::CreatesAST && (m_syntaxAlreadyValidated || !strictMode())) >@@ -5043,7 +5043,7 @@ template <typename LexerType> void Parser<LexerType>::printUnexpectedTokenText(W > out.print("Invalid escape in identifier: '", getToken(), "'"); > return; > case UNEXPECTED_ESCAPE_ERRORTOK: >- out.print("Unexpected escaped characters in keyword tocken: '", getToken(), "'"); >+ out.print("Unexpected escaped characters in keyword token: '", getToken(), "'"); > return; > case INVALID_IDENTIFIER_UNICODE_ESCAPE_ERRORTOK: > out.print("Invalid unicode escape in identifier: '", getToken(), "'"); >@@ -5067,11 +5067,11 @@ template <typename LexerType> void Parser<LexerType>::printUnexpectedTokenText(W > case DOUBLE: > out.print("Unexpected number '", getToken(), "'"); > return; >- >+ > case RESERVED_IF_STRICT: > out.print("Unexpected use of reserved word '", getToken(), "' in strict mode"); > return; >- >+ > case RESERVED: > out.print("Unexpected use of reserved word '", getToken(), "'"); > return; >@@ -5079,7 +5079,7 @@ template <typename LexerType> void Parser<LexerType>::printUnexpectedTokenText(W > case INVALID_PRIVATE_NAME_ERRORTOK: > out.print("Invalid private name '", getToken(), "'"); > return; >- >+ > case AWAIT: > case IDENT: > out.print("Unexpected identifier '", getToken(), "'"); >@@ -5093,12 +5093,12 @@ template <typename LexerType> void Parser<LexerType>::printUnexpectedTokenText(W > out.print("Unexpected keyword '", getToken(), "'"); > return; > } >- >+ > out.print("Unexpected token '", getToken(), "'"); > } > > // Instantiate the two flavors of Parser we need instead of putting most of this file in Parser.h > template class Parser<Lexer<LChar>>; > template class Parser<Lexer<UChar>>; >- >+ > } // namespace JSC >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 92e52145c5..b2de70ddd9 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,12 @@ >+2018-04-26 Rick Waldron <waldron.rick@gmail.com> >+ >+ Token misspelled "tocken" in error message string >+ https://bugs.webkit.org/show_bug.cgi?id=185030 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Scripts/test262/test262-expectations.yaml: Fix typo "tocken" => "token" >+ > 2018-04-25 Michael Catanzaro <mcatanzaro@igalia.com> > > [WPE] Build and link against latest WPEBackend and WPEBackend-fdo >@@ -209,7 +218,7 @@ > (Port._build_api_tests): Build TestWTF and TestWebKitAPI if required. > * Scripts/webkitpy/port/mac.py: > (MacPort.environment_for_api_tests): Enable GuardMalloc for API tests. >- * Scripts/webkitpy/port/server_process.py: >+ * Scripts/webkitpy/port/server_process.py: > (ServerProcess.pop_all_buffered_stdout): > > 2018-04-25 Carlos Garcia Campos <cgarcia@igalia.com> >@@ -708,7 +717,7 @@ > > * BuildSlaveSupport/built-product-archive: > (createZipManually): >- Default is to archive without compressing, so tell it to compress as well. >+ Default is to archive without compressing, so tell it to compress as well. > > 2018-04-18 Nan Wang <n_wang@apple.com> > >@@ -2794,7 +2803,7 @@ > > 1. The left/right floating array should hold the Display.Box (and not the Layout.Box) > 2. Clone the Display.Box and convert its rect absolute to the formatting context's root so that we >- don't have to keep converting the coordinates while computing the positions. >+ don't have to keep converting the coordinates while computing the positions. > > * LayoutReloaded/DisplayTree/Box.js: > (Display.Box.prototype.clone): >@@ -2934,7 +2943,7 @@ > > https://bugs.webkit.org/show_bug.cgi?id=183876 > <rdar://problem/38726459> >- >+ > Unreviewed, fix for the test added in r229995 in the iOS simulator. > > * TestWebKitAPI/Tests/WebKitCocoa/AVFoundationPreference.mm: >@@ -3006,7 +3015,7 @@ > > Add a set of ProcessPrivilege assertions to enforce the rule that the WebContent process > should never call Cookie API directly. That should only happen in the Networking or >- UIProcess. >+ UIProcess. > > * DumpRenderTree/mac/DumpRenderTree.mm: > (DumpRenderTreeMain): >@@ -3631,7 +3640,7 @@ > > This fix is to run Apache HTTP server from native Windows. The environment is different > from cygwin, which is used for AppleWin, in following points: >- - A temporary file behaves differently. It cannot reopen by anybody when indicated as >+ - A temporary file behaves differently. It cannot reopen by anybody when indicated as > delete on close. To solve this situation, filesystem.mkdtemp() is used instead. > - It's not unix so that `tail` command is not available. Replaced with python equivalent > function. >@@ -3951,7 +3960,7 @@ > Note that open(1) is meant for launching GUI apps. Standard output and standard error are > not sent to the tty when using open(1) to launch a non-GUI app. > >- * Scripts/run-webkit-app: We make the assumption that >+ * Scripts/run-webkit-app: We make the assumption that > * Scripts/webkitdirs.pm: > - Define and export constant DO_NOT_USE_OPEN_COMMAND. > >@@ -5744,7 +5753,7 @@ > > (+[DumpRenderTreeDraggingInfo clearAllFilePromiseReceivers]): > (-[DumpRenderTreeDraggingInfo enumerateDraggingItemsWithOptions:forView:classes:searchOptions:usingBlock:]): >- >+ > If NSFilesPromisePboardType is on the pasteboard and classArray contains > NSFilePromiseReceiver, construct a DumpRenderTreeFilePromiseReceiver, add it to the array of > all file promise receivers, then wrap it in an NSDraggingItem and call block. >@@ -6086,7 +6095,7 @@ > > Reviewed by Chris Fleizach. > >- The overhead of fetching a spell checked attributed string via AX API is substantial. >+ The overhead of fetching a spell checked attributed string via AX API is substantial. > In some cases on the order of 7/8 of the total time spent fetching the string. > > This change introduces the new attribute AXAttributedStringForTextMarkerRangeWithOptions which accepts an NSDictionary as it's parameter with keys "AXTextMarkerRange" (AXTextMarkerRangeRef) and "AXSpellCheck" (NSNumber(BOOL)). >@@ -6268,7 +6277,7 @@ > * WebKitTestRunner/cocoa/TestControllerCocoa.mm: > (WTR::TestController::cocoaResetStateToConsistentValues): Use a named constant for > no timeout. >- >+ > * WebKitTestRunner/ios/TestControllerIOS.mm: > (WTR::TestController::platformConfigureViewForTest): Removed a useless timeout. > Not sure if timing out here would corrupt the stack or not, but there is no reason >@@ -8511,7 +8520,7 @@ > > Reviewed by Alex Christensen. > >- Use 64-bit toolset for 64-bit build in order to improve build time. >+ Use 64-bit toolset for 64-bit build in order to improve build time. > > * Scripts/webkitdirs.pm: > (generateBuildSystemFromCMakeProject): >@@ -8523,7 +8532,7 @@ > rdar://problem/36593581 > > Reviewed by Tim Horton. >- >+ > If zoomToScale:animated: is called with the current zoom level, call the callback > rather than doing nothing. > >@@ -9692,7 +9701,7 @@ > > 2018-01-11 Jonathan Bedard <jbedard@apple.com> > >- REGRESSION(r225856): Incorrectly managing 'future' baseline_search_paths. >+ REGRESSION(r225856): Incorrectly managing 'future' baseline_search_paths. > https://bugs.webkit.org/show_bug.cgi?id=179621 > <rdar://problem/35589585> > >@@ -9708,10 +9717,10 @@ > https://bugs.webkit.org/show_bug.cgi?id=180884 > > Reviewed by Saam Barati. >- >+ > Remove some less important benchmarks from the default run. Doing run-jsc-benchmarks > shouldn't take a long time due to benchmarks we don't optimize for. >- >+ > * Scripts/run-jsc-benchmarks: > > 2018-01-11 Ms2ger <Ms2ger@igalia.com> >@@ -9797,7 +9806,7 @@ > https://bugs.webkit.org/show_bug.cgi?id=181492 > <rdar://problem/36359679> > >- Reviewed by Alexey Proskuryakov. >+ Reviewed by Alexey Proskuryakov. > > 2018-01-10 Adrian Perez de Castro <aperez@igalia.com> > >@@ -10307,7 +10316,7 @@ > 2018-01-05 Chris Fleizach <cfleizach@apple.com> > > iOS: Build fix after r226432. >- >+ > Unreviewed. Stop duplicating speakAs symbols for iOS. > > * DumpRenderTree/AccessibilityUIElement.cpp: >diff --git a/Tools/Scripts/test262/test262-expectations.yaml b/Tools/Scripts/test262/test262-expectations.yaml >index 945cc969f7..1d7bc7b216 100644 >--- a/Tools/Scripts/test262/test262-expectations.yaml >+++ b/Tools/Scripts/test262/test262-expectations.yaml >@@ -4173,10 +4173,10 @@ test/language/statements/labeled/decl-gen.js: > test/language/statements/labeled/let-array-with-newline.js: > default: 'Test262: This statement should not be evaluated.' > test/language/statements/labeled/value-await-non-module-escaped.js: >- default: "SyntaxError: Unexpected escaped characters in keyword tocken: 'aw\\u0061it'" >- strict mode: "SyntaxError: Unexpected escaped characters in keyword tocken: 'aw\\u0061it'" >+ default: "SyntaxError: Unexpected escaped characters in keyword token: 'aw\\u0061it'" >+ strict mode: "SyntaxError: Unexpected escaped characters in keyword token: 'aw\\u0061it'" > test/language/statements/labeled/value-yield-non-strict-escaped.js: >- default: "SyntaxError: Unexpected escaped characters in keyword tocken: 'yi\\u0065ld'" >+ default: "SyntaxError: Unexpected escaped characters in keyword token: 'yi\\u0065ld'" > test/language/statements/labeled/value-yield-non-strict.js: > strict mode: "SyntaxError: Cannot use 'yield' as a label in strict mode." > test/language/statements/labeled/value-yield-strict.js: >@@ -4192,7 +4192,7 @@ test/language/statements/let/syntax/attempt-to-redeclare-let-binding-with-var.js > default: 'Test262: This statement should not be evaluated.' > strict mode: 'Test262: This statement should not be evaluated.' > test/language/statements/let/syntax/escaped-let.js: >- default: "SyntaxError: Unexpected escaped characters in keyword tocken: 'l\\u0065t'" >+ default: "SyntaxError: Unexpected escaped characters in keyword token: 'l\\u0065t'" > test/language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-function-declaration.js: > default: 'Test262: This statement should not be evaluated.' > test/language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-generator-declaration.js: >-- >2.15.1 (Apple Git-101) >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
mark.lam
:
review-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185030
:
338885
|
338888