⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 181831 in webkit


Ignore:
Timestamp:
Mar 21, 2015, 9:08:23 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Fix a typo in Parser error message
https://bugs.webkit.org/show_bug.cgi?id=142942

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2015-03-21
Reviewed by Alexey Proskuryakov.

Source/JavaScriptCore:

  • 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.

LayoutTests:

  • 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:
Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r181830 r181831  
     12015-03-21  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Fix a typo in Parser error message
     4        https://bugs.webkit.org/show_bug.cgi?id=142942
     5
     6        Reviewed by Alexey Proskuryakov.
     7
     8        * js/class-syntax-declaration-expected.txt:
     9        * js/class-syntax-expression-expected.txt:
     10        * js/class-syntax-super-expected.txt:
     11        * js/script-tests/class-syntax-declaration.js:
     12        * js/script-tests/class-syntax-expression.js:
     13        * js/script-tests/class-syntax-super.js:
     14
    1152015-03-21  Brent Fulgham  <bfulgham@apple.com>
    216
  • trunk/LayoutTests/js/class-syntax-declaration-expected.txt

    r181618 r181831  
    1818PASS class threw exception SyntaxError: Unexpected end of script.
    1919PASS class X { threw exception SyntaxError: Unexpected end of script.
    20 PASS class X { ( } threw exception SyntaxError: Unexpected token '('. Expected an indentifier..
     20PASS class X { ( } threw exception SyntaxError: Unexpected token '('. Expected an identifier..
    2121PASS class X {} did not throw exception.
    2222PASS class X { constructor() {} constructor() {} } threw exception SyntaxError: Cannot declare multiple constructors in a single class..
  • trunk/LayoutTests/js/class-syntax-expression-expected.txt

    r181618 r181831  
    1818PASS x = class threw exception SyntaxError: Unexpected end of script.
    1919PASS x = class { threw exception SyntaxError: Unexpected end of script.
    20 PASS x = class { ( } threw exception SyntaxError: Unexpected token '('. Expected an indentifier..
     20PASS x = class { ( } threw exception SyntaxError: Unexpected token '('. Expected an identifier..
    2121PASS x = class {} did not throw exception.
    2222PASS x = class { constructor() {} constructor() {} } threw exception SyntaxError: Cannot declare multiple constructors in a single class..
  • trunk/LayoutTests/js/class-syntax-super-expected.txt

    r181618 r181831  
    1414PASS Derived.staticMethod() is "base3"
    1515PASS (new SecondDerived).chainMethod() is ["base", "derived", "secondDerived"]
    16 PASS x = class extends Base { constructor() { super(); } super() {} } threw exception SyntaxError: Unexpected keyword 'super'. Expected an indentifier..
     16PASS x = class extends Base { constructor() { super(); } super() {} } threw exception SyntaxError: Unexpected keyword 'super'. Expected an identifier..
    1717PASS x = class extends Base { constructor() { super(); } method() { super() } } threw exception SyntaxError: Cannot call super() outside of a class constructor..
    1818PASS x = class extends Base { constructor() { super(); } method() { super } } threw exception SyntaxError: Cannot reference super..
  • trunk/LayoutTests/js/script-tests/class-syntax-declaration.js

    r181618 r181831  
    3030shouldThrow("class", "'SyntaxError: Unexpected end of script'");
    3131shouldThrow("class X {", "'SyntaxError: Unexpected end of script'");
    32 shouldThrow("class X { ( }", "'SyntaxError: Unexpected token \\'(\\'. Expected an indentifier.'");
     32shouldThrow("class X { ( }", "'SyntaxError: Unexpected token \\'(\\'. Expected an identifier.'");
    3333shouldNotThrow("class X {}");
    3434shouldThrow("class X { constructor() {} constructor() {} }", "'SyntaxError: Cannot declare multiple constructors in a single class.'");
  • trunk/LayoutTests/js/script-tests/class-syntax-expression.js

    r181618 r181831  
    3030shouldThrow("x = class", "'SyntaxError: Unexpected end of script'");
    3131shouldThrow("x = class {", "'SyntaxError: Unexpected end of script'");
    32 shouldThrow("x = class { ( }", "'SyntaxError: Unexpected token \\'(\\'. Expected an indentifier.'");
     32shouldThrow("x = class { ( }", "'SyntaxError: Unexpected token \\'(\\'. Expected an identifier.'");
    3333shouldNotThrow("x = class {}");
    3434shouldThrow("x = class { constructor() {} constructor() {} }", "'SyntaxError: Cannot declare multiple constructors in a single class.'");
  • trunk/LayoutTests/js/script-tests/class-syntax-super.js

    r181618 r181831  
    3838shouldBe('Derived.staticMethod()', '"base3"');
    3939shouldBe('(new SecondDerived).chainMethod()', '["base", "derived", "secondDerived"]');
    40 shouldThrow('x = class extends Base { constructor() { super(); } super() {} }', '"SyntaxError: Unexpected keyword \'super\'. Expected an indentifier."');
     40shouldThrow('x = class extends Base { constructor() { super(); } super() {} }', '"SyntaxError: Unexpected keyword \'super\'. Expected an identifier."');
    4141shouldThrow('x = class extends Base { constructor() { super(); } method() { super() } }',
    4242    '"SyntaxError: Cannot call super() outside of a class constructor."');
  • trunk/Source/JavaScriptCore/ChangeLog

    r181829 r181831  
     12015-03-21  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Fix a typo in Parser error message
     4        https://bugs.webkit.org/show_bug.cgi?id=142942
     5
     6        Reviewed by Alexey Proskuryakov.
     7
     8        * jit/JITPropertyAccess.cpp:
     9        (JSC::JIT::emitSlow_op_resolve_scope):
     10        * jit/JITPropertyAccess32_64.cpp:
     11        (JSC::JIT::emitSlow_op_resolve_scope):
     12        * parser/Parser.cpp:
     13        (JSC::Parser<LexerType>::parseClass):
     14        Fix a common identifier typo.
     15
    1162015-03-21  Joseph Pecoraro  <pecoraro@apple.com>
    217
  • trunk/Source/JavaScriptCore/jit/JITPropertyAccess.cpp

    r177667 r181831  
    638638    linkSlowCase(iter);
    639639    int32_t scope = currentInstruction[2].u.operand;
    640     int32_t indentifierIndex = currentInstruction[3].u.operand;
    641     callOperation(operationResolveScope, dst, scope, indentifierIndex);
     640    int32_t identifierIndex = currentInstruction[3].u.operand;
     641    callOperation(operationResolveScope, dst, scope, identifierIndex);
    642642}
    643643
  • trunk/Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp

    r175998 r181831  
    662662    linkSlowCase(iter);
    663663    int32_t scope = currentInstruction[2].u.operand;
    664     int32_t indentifierIndex = currentInstruction[3].u.operand;
    665     callOperation(operationResolveScope, dst, scope, indentifierIndex);
     664    int32_t identifierIndex = currentInstruction[3].u.operand;
     665    callOperation(operationResolveScope, dst, scope, identifierIndex);
    666666}
    667667
  • trunk/Source/JavaScriptCore/parser/Parser.cpp

    r181829 r181831  
    15141514            next();
    15151515
    1516         matchOrFail(IDENT, "Expected an indentifier");
     1516        matchOrFail(IDENT, "Expected an identifier");
    15171517
    15181518        const CommonIdentifiers& propertyNames = *m_vm->propertyNames;
Note: See TracChangeset for help on using the changeset viewer.