Diff
Modified: trunk/LayoutTests/ChangeLog (181830 => 181831)
--- trunk/LayoutTests/ChangeLog 2015-03-22 03:47:04 UTC (rev 181830)
+++ trunk/LayoutTests/ChangeLog 2015-03-22 04:08:23 UTC (rev 181831)
@@ -1,3 +1,17 @@
+2015-03-21 Joseph Pecoraro <[email protected]>
+
+ Fix a typo in Parser error message
+ https://bugs.webkit.org/show_bug.cgi?id=142942
+
+ Reviewed by Alexey Proskuryakov.
+
+ * js/class-syntax-declaration-expected.txt:
+ * js/class-syntax-_expression_-expected.txt:
+ * js/class-syntax-super-expected.txt:
+ * js/script-tests/class-syntax-declaration.js:
+ * js/script-tests/class-syntax-_expression_.js:
+ * js/script-tests/class-syntax-super.js:
+
2015-03-21 Brent Fulgham <[email protected]>
[Win] Try to get debug bots green.
Modified: trunk/LayoutTests/js/class-syntax-declaration-expected.txt (181830 => 181831)
--- trunk/LayoutTests/js/class-syntax-declaration-expected.txt 2015-03-22 03:47:04 UTC (rev 181830)
+++ trunk/LayoutTests/js/class-syntax-declaration-expected.txt 2015-03-22 04:08:23 UTC (rev 181831)
@@ -17,7 +17,7 @@
PASS A.prototype.constructor is A
PASS class threw exception SyntaxError: Unexpected end of script.
PASS class X { threw exception SyntaxError: Unexpected end of script.
-PASS class X { ( } threw exception SyntaxError: Unexpected token '('. Expected an indentifier..
+PASS class X { ( } threw exception SyntaxError: Unexpected token '('. Expected an identifier..
PASS class X {} did not throw exception.
PASS class X { constructor() {} constructor() {} } threw exception SyntaxError: Cannot declare multiple constructors in a single class..
PASS class X { constructor() {} static constructor() { return staticMethodValue; } } did not throw exception.
Modified: trunk/LayoutTests/js/class-syntax-_expression_-expected.txt (181830 => 181831)
--- trunk/LayoutTests/js/class-syntax-_expression_-expected.txt 2015-03-22 03:47:04 UTC (rev 181830)
+++ trunk/LayoutTests/js/class-syntax-_expression_-expected.txt 2015-03-22 04:08:23 UTC (rev 181831)
@@ -17,7 +17,7 @@
PASS A.prototype.constructor is A
PASS x = class threw exception SyntaxError: Unexpected end of script.
PASS x = class { threw exception SyntaxError: Unexpected end of script.
-PASS x = class { ( } threw exception SyntaxError: Unexpected token '('. Expected an indentifier..
+PASS x = class { ( } threw exception SyntaxError: Unexpected token '('. Expected an identifier..
PASS x = class {} did not throw exception.
PASS x = class { constructor() {} constructor() {} } threw exception SyntaxError: Cannot declare multiple constructors in a single class..
PASS x = class { constructor() {} static constructor() { return staticMethodValue; } } did not throw exception.
Modified: trunk/LayoutTests/js/class-syntax-super-expected.txt (181830 => 181831)
--- trunk/LayoutTests/js/class-syntax-super-expected.txt 2015-03-22 03:47:04 UTC (rev 181830)
+++ trunk/LayoutTests/js/class-syntax-super-expected.txt 2015-03-22 04:08:23 UTC (rev 181831)
@@ -13,7 +13,7 @@
PASS (new Derived).baseMethodInGetterSetter = 1; valueInSetter is (new Base).baseMethod
PASS Derived.staticMethod() is "base3"
PASS (new SecondDerived).chainMethod() is ["base", "derived", "secondDerived"]
-PASS x = class extends Base { constructor() { super(); } super() {} } threw exception SyntaxError: Unexpected keyword 'super'. Expected an indentifier..
+PASS x = class extends Base { constructor() { super(); } super() {} } threw exception SyntaxError: Unexpected keyword 'super'. Expected an identifier..
PASS x = class extends Base { constructor() { super(); } method() { super() } } threw exception SyntaxError: Cannot call super() outside of a class constructor..
PASS x = class extends Base { constructor() { super(); } method() { super } } threw exception SyntaxError: Cannot reference super..
PASS x = class extends Base { constructor() { super(); } method() { return new super } } did not throw exception.
Modified: trunk/LayoutTests/js/script-tests/class-syntax-declaration.js (181830 => 181831)
--- trunk/LayoutTests/js/script-tests/class-syntax-declaration.js 2015-03-22 03:47:04 UTC (rev 181830)
+++ trunk/LayoutTests/js/script-tests/class-syntax-declaration.js 2015-03-22 04:08:23 UTC (rev 181831)
@@ -29,7 +29,7 @@
shouldThrow("class", "'SyntaxError: Unexpected end of script'");
shouldThrow("class X {", "'SyntaxError: Unexpected end of script'");
-shouldThrow("class X { ( }", "'SyntaxError: Unexpected token \\'(\\'. Expected an indentifier.'");
+shouldThrow("class X { ( }", "'SyntaxError: Unexpected token \\'(\\'. Expected an identifier.'");
shouldNotThrow("class X {}");
shouldThrow("class X { constructor() {} constructor() {} }", "'SyntaxError: Cannot declare multiple constructors in a single class.'");
shouldNotThrow("class X { constructor() {} static constructor() { return staticMethodValue; } }");
Modified: trunk/LayoutTests/js/script-tests/class-syntax-_expression_.js (181830 => 181831)
--- trunk/LayoutTests/js/script-tests/class-syntax-_expression_.js 2015-03-22 03:47:04 UTC (rev 181830)
+++ trunk/LayoutTests/js/script-tests/class-syntax-_expression_.js 2015-03-22 04:08:23 UTC (rev 181831)
@@ -29,7 +29,7 @@
shouldThrow("x = class", "'SyntaxError: Unexpected end of script'");
shouldThrow("x = class {", "'SyntaxError: Unexpected end of script'");
-shouldThrow("x = class { ( }", "'SyntaxError: Unexpected token \\'(\\'. Expected an indentifier.'");
+shouldThrow("x = class { ( }", "'SyntaxError: Unexpected token \\'(\\'. Expected an identifier.'");
shouldNotThrow("x = class {}");
shouldThrow("x = class { constructor() {} constructor() {} }", "'SyntaxError: Cannot declare multiple constructors in a single class.'");
shouldNotThrow("x = class { constructor() {} static constructor() { return staticMethodValue; } }");
Modified: trunk/LayoutTests/js/script-tests/class-syntax-super.js (181830 => 181831)
--- trunk/LayoutTests/js/script-tests/class-syntax-super.js 2015-03-22 03:47:04 UTC (rev 181830)
+++ trunk/LayoutTests/js/script-tests/class-syntax-super.js 2015-03-22 04:08:23 UTC (rev 181831)
@@ -37,7 +37,7 @@
shouldBe('(new Derived).baseMethodInGetterSetter = 1; valueInSetter', '(new Base).baseMethod');
shouldBe('Derived.staticMethod()', '"base3"');
shouldBe('(new SecondDerived).chainMethod()', '["base", "derived", "secondDerived"]');
-shouldThrow('x = class extends Base { constructor() { super(); } super() {} }', '"SyntaxError: Unexpected keyword \'super\'. Expected an indentifier."');
+shouldThrow('x = class extends Base { constructor() { super(); } super() {} }', '"SyntaxError: Unexpected keyword \'super\'. Expected an identifier."');
shouldThrow('x = class extends Base { constructor() { super(); } method() { super() } }',
'"SyntaxError: Cannot call super() outside of a class constructor."');
shouldThrow('x = class extends Base { constructor() { super(); } method() { super } }', '"SyntaxError: Cannot reference super."');
Modified: trunk/Source/_javascript_Core/ChangeLog (181830 => 181831)
--- trunk/Source/_javascript_Core/ChangeLog 2015-03-22 03:47:04 UTC (rev 181830)
+++ trunk/Source/_javascript_Core/ChangeLog 2015-03-22 04:08:23 UTC (rev 181831)
@@ -1,5 +1,20 @@
2015-03-21 Joseph Pecoraro <[email protected]>
+ Fix a typo in Parser error message
+ https://bugs.webkit.org/show_bug.cgi?id=142942
+
+ Reviewed by Alexey Proskuryakov.
+
+ * jit/JITPropertyAccess.cpp:
+ (JSC::JIT::emitSlow_op_resolve_scope):
+ * jit/JITPropertyAccess32_64.cpp:
+ (JSC::JIT::emitSlow_op_resolve_scope):
+ * parser/Parser.cpp:
+ (JSC::Parser<LexerType>::parseClass):
+ Fix a common identifier typo.
+
+2015-03-21 Joseph Pecoraro <[email protected]>
+
Computed Property names should allow only AssignmentExpressions not any _expression_
https://bugs.webkit.org/show_bug.cgi?id=142902
Modified: trunk/Source/_javascript_Core/jit/JITPropertyAccess.cpp (181830 => 181831)
--- trunk/Source/_javascript_Core/jit/JITPropertyAccess.cpp 2015-03-22 03:47:04 UTC (rev 181830)
+++ trunk/Source/_javascript_Core/jit/JITPropertyAccess.cpp 2015-03-22 04:08:23 UTC (rev 181831)
@@ -637,8 +637,8 @@
linkSlowCase(iter);
int32_t scope = currentInstruction[2].u.operand;
- int32_t indentifierIndex = currentInstruction[3].u.operand;
- callOperation(operationResolveScope, dst, scope, indentifierIndex);
+ int32_t identifierIndex = currentInstruction[3].u.operand;
+ callOperation(operationResolveScope, dst, scope, identifierIndex);
}
void JIT::emitLoadWithStructureCheck(int scope, Structure** structureSlot)
Modified: trunk/Source/_javascript_Core/jit/JITPropertyAccess32_64.cpp (181830 => 181831)
--- trunk/Source/_javascript_Core/jit/JITPropertyAccess32_64.cpp 2015-03-22 03:47:04 UTC (rev 181830)
+++ trunk/Source/_javascript_Core/jit/JITPropertyAccess32_64.cpp 2015-03-22 04:08:23 UTC (rev 181831)
@@ -661,8 +661,8 @@
linkSlowCase(iter);
int32_t scope = currentInstruction[2].u.operand;
- int32_t indentifierIndex = currentInstruction[3].u.operand;
- callOperation(operationResolveScope, dst, scope, indentifierIndex);
+ int32_t identifierIndex = currentInstruction[3].u.operand;
+ callOperation(operationResolveScope, dst, scope, identifierIndex);
}
void JIT::emitLoadWithStructureCheck(int scope, Structure** structureSlot)
Modified: trunk/Source/_javascript_Core/parser/Parser.cpp (181830 => 181831)
--- trunk/Source/_javascript_Core/parser/Parser.cpp 2015-03-22 03:47:04 UTC (rev 181830)
+++ trunk/Source/_javascript_Core/parser/Parser.cpp 2015-03-22 04:08:23 UTC (rev 181831)
@@ -1513,7 +1513,7 @@
if (isStaticMethod)
next();
- matchOrFail(IDENT, "Expected an indentifier");
+ matchOrFail(IDENT, "Expected an identifier");
const CommonIdentifiers& propertyNames = *m_vm->propertyNames;
const Identifier& ident = *m_token.m_data.ident;