Ignore:
Timestamp:
Jul 8, 2010, 2:54:08 PM (15 years ago)
Author:
[email protected]
Message:

2010-07-08 Oliver Hunt <[email protected]>

Reviewed by Gavin Barraclough.

Make object-literal parsing conformant with the spec.
https://bugs.webkit.org/show_bug.cgi?id=41892

Bring our parsing of object literals into conformance with the ES5 spec.
Basically disallow conflicting accessor vs. normal property definitions
The bulk of this patch is just fiddling to maintain performance.

  • parser/ASTBuilder.h: (JSC::ASTBuilder::createGetterOrSetterProperty): (JSC::ASTBuilder::createProperty): (JSC::ASTBuilder::getName): (JSC::ASTBuilder::getType):
  • parser/JSParser.cpp: (JSC::jsParse): (JSC::JSParser::JSParser): (JSC::JSParser::parseProperty): (JSC::JSParser::parseObjectLiteral): (JSC::JSParser::parseStrictObjectLiteral):
  • parser/JSParser.h:
  • parser/Lexer.cpp: (JSC::Lexer::clear):
  • parser/Lexer.h: (JSC::Lexer::currentOffset): (JSC::Lexer::setOffset): Add logic to allow us to roll the lexer back in the input stream.
  • parser/Nodes.h: (JSC::PropertyNode::): (JSC::PropertyNode::type):
  • parser/Parser.cpp: (JSC::Parser::parse):
  • parser/SourceProvider.h: (JSC::SourceProvider::SourceProvider): (JSC::SourceProvider::isValid): (JSC::SourceProvider::setValid): SourceProvider now records whether the input text has already been validated.
  • parser/SyntaxChecker.h: (JSC::SyntaxChecker::SyntaxChecker): (JSC::SyntaxChecker::Property::Property): (JSC::SyntaxChecker::Property::operator!): (JSC::SyntaxChecker::createProperty): (JSC::SyntaxChecker::createPropertyList): (JSC::SyntaxChecker::createGetterOrSetterProperty): The SyntaxChecker mode now needs to maintain a bit more information to ensure that we can validate object literals correctly.

2010-07-08 Oliver Hunt <[email protected]>

Reviewed by Gavin Barraclough.

Need a short description and bug URL (OOPS!)

  • fast/js/object-literal-syntax-expected.txt: Added.
  • fast/js/object-literal-syntax.html: Added.
  • fast/js/parser-syntax-check-expected.txt:
  • fast/js/script-tests/object-literal-syntax.js: Added.
  • fast/js/script-tests/parser-syntax-check.js:
  • ietestcenter/Javascript/11.1.5_4-4-b-1-expected.txt:
  • ietestcenter/Javascript/11.1.5_4-4-b-2-expected.txt:
  • ietestcenter/Javascript/11.1.5_4-4-c-1-expected.txt:
  • ietestcenter/Javascript/11.1.5_4-4-c-2-expected.txt:
  • ietestcenter/Javascript/11.1.5_4-4-d-1-expected.txt:
  • ietestcenter/Javascript/11.1.5_4-4-d-2-expected.txt:
  • ietestcenter/Javascript/11.1.5_4-4-d-3-expected.txt:
  • ietestcenter/Javascript/11.1.5_4-4-d-4-expected.txt:
  • platform/chromium/test_expectations.txt:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/parser/JSParser.h

    r61878 r62848  
    3131class Identifier;
    3232class JSGlobalData;
     33class SourceCode;
    3334
    3435enum JSTokenType {
     
    119120};
    120121
    121 int jsParse(JSGlobalData*);
     122int jsParse(JSGlobalData*, const SourceCode*);
    122123}
    123124#endif // JSParser_h
Note: See TracChangeset for help on using the changeset viewer.