Towards 8 Bit Strings: Templatize JSC::Parser class by Lexer type
authorbarraclough@apple.com <barraclough@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Nov 2011 23:45:05 +0000 (23:45 +0000)
committerbarraclough@apple.com <barraclough@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Nov 2011 23:45:05 +0000 (23:45 +0000)
commit13ddcac29e40941167115bc8b3614c70d860a244
tree4c80f399663c89524e2d88a6f78af1cdd871f267
parent66c75b8fb64c8a939a9ed47f7f7f5ee4718ec61a
Towards 8 Bit Strings: Templatize JSC::Parser class by Lexer type
https://bugs.webkit.org/show_bug.cgi?id=71761

Templatized Parser based on Lexer<T>. Moved two enums,
SourceElementsMode and FunctionRequirements out of Parser definition
to work around a clang compiler defect.

Cleaned up SourceCode data() to return StringImpl* and eliminated
the recently added stringData() virtual method.

To keep code in Parser.cpp and keep Parser.h small, the two flavors
of Parser are explicitly instantiated at the end of Parser.cpp.

Patch by Michael Saboff <msaboff@apple.com> on 2011-11-08
Reviewed by Gavin Barraclough.

* interpreter/Interpreter.cpp:
(JSC::appendSourceToError):
* parser/Lexer.cpp:
(JSC::::setCode):
(JSC::::sourceCode):
* parser/Parser.cpp:
(JSC::::Parser):
(JSC::::~Parser):
(JSC::::parseInner):
(JSC::::didFinishParsing):
(JSC::::allowAutomaticSemicolon):
(JSC::::parseSourceElements):
(JSC::::parseVarDeclaration):
(JSC::::parseConstDeclaration):
(JSC::::parseDoWhileStatement):
(JSC::::parseWhileStatement):
(JSC::::parseVarDeclarationList):
(JSC::::parseConstDeclarationList):
(JSC::::parseForStatement):
(JSC::::parseBreakStatement):
(JSC::::parseContinueStatement):
(JSC::::parseReturnStatement):
(JSC::::parseThrowStatement):
(JSC::::parseWithStatement):
(JSC::::parseSwitchStatement):
(JSC::::parseSwitchClauses):
(JSC::::parseSwitchDefaultClause):
(JSC::::parseTryStatement):
(JSC::::parseDebuggerStatement):
(JSC::::parseBlockStatement):
(JSC::::parseStatement):
(JSC::::parseFormalParameters):
(JSC::::parseFunctionBody):
(JSC::::parseFunctionInfo):
(JSC::::parseFunctionDeclaration):
(JSC::::parseExpressionOrLabelStatement):
(JSC::::parseExpressionStatement):
(JSC::::parseIfStatement):
(JSC::::parseExpression):
(JSC::::parseAssignmentExpression):
(JSC::::parseConditionalExpression):
(JSC::::isBinaryOperator):
(JSC::::parseBinaryExpression):
(JSC::::parseProperty):
(JSC::::parseObjectLiteral):
(JSC::::parseStrictObjectLiteral):
(JSC::::parseArrayLiteral):
(JSC::::parsePrimaryExpression):
(JSC::::parseArguments):
(JSC::::parseMemberExpression):
(JSC::::parseUnaryExpression):
* parser/Parser.h:
(JSC::::parse):
(JSC::parse):
* parser/SourceCode.h:
(JSC::SourceCode::data):
(JSC::SourceCode::subExpression):
* parser/SourceProvider.h:
(JSC::UStringSourceProvider::data):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99622 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/assembler/AbstractMacroAssembler.h
Source/JavaScriptCore/assembler/LinkBuffer.h
Source/JavaScriptCore/dfg/DFGJITCodeGenerator32_64.cpp
Source/JavaScriptCore/dfg/DFGJITCodeGenerator64.cpp
Source/JavaScriptCore/dfg/DFGJITCompiler.cpp
Source/JavaScriptCore/dfg/DFGJITCompiler.h