Changeset 127958 in webkit for trunk/Source/JavaScriptCore/parser
- Timestamp:
- Sep 7, 2012, 10:46:29 PM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore/parser
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/parser/ASTBuilder.h
r127939 r127958 221 221 ExpressionNode* createRegExp(const JSTokenLocation& location, const Identifier& pattern, const Identifier& flags, int start) 222 222 { 223 if (Yarr::checkSyntax(pattern. ustring()))223 if (Yarr::checkSyntax(pattern.string())) 224 224 return 0; 225 225 RegExpNode* node = new (m_globalData) RegExpNode(location, pattern, flags); -
trunk/Source/JavaScriptCore/parser/Parser.cpp
r127810 r127958 1510 1510 TreeExpression re = context.createRegExp(location, *pattern, *flags, start); 1511 1511 if (!re) { 1512 const char* yarrErrorMsg = Yarr::checkSyntax(pattern-> ustring());1512 const char* yarrErrorMsg = Yarr::checkSyntax(pattern->string()); 1513 1513 ASSERT(!m_errorMessage.isNull()); 1514 1514 failWithMessage(yarrErrorMsg); -
trunk/Source/JavaScriptCore/parser/Parser.h
r127810 r127958 211 211 void declareCallee(const Identifier* ident) 212 212 { 213 m_declaredVariables.add(ident-> ustring().impl());213 m_declaredVariables.add(ident->string().impl()); 214 214 } 215 215 … … 218 218 bool isValidStrictMode = m_globalData->propertyNames->eval != *ident && m_globalData->propertyNames->arguments != *ident; 219 219 m_isValidStrictMode = m_isValidStrictMode && isValidStrictMode; 220 m_declaredVariables.add(ident-> ustring().impl());220 m_declaredVariables.add(ident->string().impl()); 221 221 return isValidStrictMode; 222 222 } … … 234 234 { 235 235 bool isArguments = m_globalData->propertyNames->arguments == *ident; 236 bool isValidStrictMode = m_declaredVariables.add(ident-> ustring().impl()).isNewEntry && m_globalData->propertyNames->eval != *ident && !isArguments;236 bool isValidStrictMode = m_declaredVariables.add(ident->string().impl()).isNewEntry && m_globalData->propertyNames->eval != *ident && !isArguments; 237 237 m_isValidStrictMode = m_isValidStrictMode && isValidStrictMode; 238 238 if (isArguments) … … 244 244 { 245 245 m_usesEval |= isEval; 246 m_usedVariables.add(ident-> ustring().impl());246 m_usedVariables.add(ident->string().impl()); 247 247 } 248 248 -
trunk/Source/JavaScriptCore/parser/SyntaxChecker.h
r124729 r127958 145 145 ExpressionType createBracketAccess(const JSTokenLocation&, ExpressionType, ExpressionType, bool, int, int, int) { return BracketExpr; } 146 146 ExpressionType createDotAccess(const JSTokenLocation&, ExpressionType, const Identifier*, int, int, int) { return DotExpr; } 147 ExpressionType createRegExp(const JSTokenLocation&, const Identifier& pattern, const Identifier&, int) { return Yarr::checkSyntax(pattern. ustring()) ? 0 : RegExpExpr; }147 ExpressionType createRegExp(const JSTokenLocation&, const Identifier& pattern, const Identifier&, int) { return Yarr::checkSyntax(pattern.string()) ? 0 : RegExpExpr; } 148 148 ExpressionType createNewExpr(const JSTokenLocation&, ExpressionType, int, int, int, int) { return NewExpr; } 149 149 ExpressionType createNewExpr(const JSTokenLocation&, ExpressionType, int, int) { return NewExpr; }
Note:
See TracChangeset
for help on using the changeset viewer.