summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/parser/Parser.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-09-10 19:10:20 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-09-10 19:10:20 +0200
commit284837daa07b29d6a63a748544a90b1f5842ac5c (patch)
treeecd258180bde91fe741e0cfd2638beb3c6da7e8e /Source/JavaScriptCore/parser/Parser.cpp
parent2e2ba8ff45915f40ed3e014101269c175f2a89a0 (diff)
downloadqtwebkit-284837daa07b29d6a63a748544a90b1f5842ac5c.tar.gz
Imported WebKit commit 68645295d2e3e09af2c942f092556f06aa5f8b0d (http://svn.webkit.org/repository/webkit/trunk@128073)
New snapshot
Diffstat (limited to 'Source/JavaScriptCore/parser/Parser.cpp')
-rw-r--r--Source/JavaScriptCore/parser/Parser.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/JavaScriptCore/parser/Parser.cpp b/Source/JavaScriptCore/parser/Parser.cpp
index 4fd671fb7..3555f07cd 100644
--- a/Source/JavaScriptCore/parser/Parser.cpp
+++ b/Source/JavaScriptCore/parser/Parser.cpp
@@ -40,7 +40,7 @@ using namespace std;
namespace JSC {
template <typename LexerType>
-Parser<LexerType>::Parser(JSGlobalData* globalData, const SourceCode& source, FunctionParameters* parameters, JSParserStrictness strictness, JSParserMode parserMode)
+Parser<LexerType>::Parser(JSGlobalData* globalData, const SourceCode& source, FunctionParameters* parameters, const Identifier& name, JSParserStrictness strictness, JSParserMode parserMode)
: m_globalData(globalData)
, m_source(&source)
, m_stack(wtfThreadData().stack())
@@ -71,6 +71,8 @@ Parser<LexerType>::Parser(JSGlobalData* globalData, const SourceCode& source, Fu
for (unsigned i = 0; i < parameters->size(); i++)
scope->declareParameter(&parameters->at(i));
}
+ if (!name.isNull())
+ scope->declareCallee(&name);
next();
m_lexer->setLastLineNumber(tokenLine());
}
@@ -81,9 +83,9 @@ Parser<LexerType>::~Parser()
}
template <typename LexerType>
-UString Parser<LexerType>::parseInner()
+String Parser<LexerType>::parseInner()
{
- UString parseError = UString();
+ String parseError = String();
unsigned oldFunctionCacheSize = m_functionCache ? m_functionCache->byteSize() : 0;
ASTBuilder context(const_cast<JSGlobalData*>(m_globalData), const_cast<SourceCode*>(m_source));
@@ -1507,7 +1509,7 @@ template <class TreeBuilder> TreeExpression Parser<LexerType>::parsePrimaryExpre
next();
TreeExpression re = context.createRegExp(location, *pattern, *flags, start);
if (!re) {
- const char* yarrErrorMsg = Yarr::checkSyntax(pattern->ustring());
+ const char* yarrErrorMsg = Yarr::checkSyntax(pattern->string());
ASSERT(!m_errorMessage.isNull());
failWithMessage(yarrErrorMsg);
}