- 13 Aug, 2021 1 commit
-
-
Nicolò Ribaudo authored
Previously V8 was reusing the error fur duplicate declarations, using the private name for class fields or the class name for class methods as the redeclared identifier. class A { constructor(o) { return o } } class B extends A { #x } class C extends A { #x() {} } let D = (0, class extends A { #x() {} }); new B(new B({})) // Identifier '#x' has already been declared new C(new C({})) // Identifier 'C' has already been declared new D(new D({})) // Identifier '' has already been declared This patch changes it to use error messages that better explain what's happening: new B(new B({})) // Cannot initialize #x twice on the same object new C(new C({})) // Cannot initialize private methods of // class C twice on the same object new D(new D({})) // Cannot initialize private methods of // class anonymous twice on the same object I initially tried to use the same message for both fields and methods, but the problem with that is that when initializing fields we only have access to the field name, while when initializing methods we only have access to the class name (using the "private brand" symbol). However, almost all the error messages are different for private fields and for methods so this shouldn't be a problem. Bug: v8:12042 Change-Id: Iaa50c16e4fa5c0646ad9ef2aa7e65bb649b3fce2 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3078362Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Joyee Cheung <joyee@igalia.com> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/master@{#76279}
-
- 19 Feb, 2019 1 commit
-
-
Jaroslav Sevcik authored
Bug: chromium:933179 Change-Id: I511dfa7c060fd3f4e4b59c199a27a69d4cf81f97 Reviewed-on: https://chromium-review.googlesource.com/c/1477275Reviewed-by: Igor Sheludko <ishell@chromium.org> Commit-Queue: Jaroslav Sevcik <jarin@chromium.org> Cr-Commit-Position: refs/heads/master@{#59705}
-
- 23 Jan, 2019 1 commit
-
-
Georg Neis authored
Otherwise we might come across invalid locations. Bug: chromium:923675 Change-Id: I0b01ba4b11cc7270744ec438bedb0b8ada2aa29d Reviewed-on: https://chromium-review.googlesource.com/c/1426126 Commit-Queue: Georg Neis <neis@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/master@{#59026}
-
- 22 Jan, 2019 1 commit
-
-
Suraj Sharma authored
-5**2 now produces SyntaxError: Unary operator used immediately before exponentiation expression. Parenthesis must be used to disambiguate operator precedence. Bug: v8:6894 Change-Id: I89dd034ff90ee1a49ba61e0c613da534fbf8b41b Reviewed-on: https://chromium-review.googlesource.com/c/1418592Reviewed-by: Adam Klein <adamk@chromium.org> Commit-Queue: Suraj Sharma <surshar@microsoft.com> Cr-Commit-Position: refs/heads/master@{#59011}
-
- 16 Jan, 2019 1 commit
-
-
Toon Verwaest authored
That makes the declaration in sync with how dynamic references are resolved, avoiding duplicate variable creation in the likely case that the variable is also referenced within the eval. Bug: v8:5112, v8:5135, v8:8693 Change-Id: I0c55495f573fe8b5076b1627c139ff72d1adda74 Also-by: leszeks@chromium.org Reviewed-on: https://chromium-review.googlesource.com/c/1408890 Commit-Queue: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/master@{#58850}
-
- 09 Jan, 2019 1 commit
-
-
Toon Verwaest authored
Bug: v8:8659 Change-Id: I7208589dcb5c40dd915a50517f83f3da646202be Reviewed-on: https://chromium-review.googlesource.com/c/1402547Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/master@{#58657}
-
- 08 Jan, 2019 1 commit
-
-
Toon Verwaest authored
Bug: chromium:919710 Change-Id: I5a04e76fbc925a89b0ebe1916637f6ae5d109b24 Reviewed-on: https://chromium-review.googlesource.com/c/1400419Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/master@{#58637}
-