diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-10-05 04:12:21 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-10-05 04:12:21 (GMT) |
commit | ff93f4ef4a0effef760964e32cdb77049f19f8ad (patch) | |
tree | 75080e79db2af9fcee71fa4c213544d691630c7d /src/3rdparty | |
parent | b2c1ddf00ba2c3395dbfca417540153ea173a870 (diff) | |
download | Qt-ff93f4ef4a0effef760964e32cdb77049f19f8ad.zip Qt-ff93f4ef4a0effef760964e32cdb77049f19f8ad.tar.gz Qt-ff93f4ef4a0effef760964e32cdb77049f19f8ad.tar.bz2 |
Compile against updated JSC
Diffstat (limited to 'src/3rdparty')
-rw-r--r-- | src/3rdparty/javascriptcore/JavaScriptCore/runtime/Executable.cpp | 20 | ||||
-rw-r--r-- | src/3rdparty/javascriptcore/JavaScriptCore/runtime/Executable.h | 1 |
2 files changed, 14 insertions, 7 deletions
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Executable.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Executable.cpp index 5e79794..3df5a84 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Executable.cpp +++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Executable.cpp @@ -59,13 +59,8 @@ FunctionExecutable::~FunctionExecutable() delete m_codeBlock; } -JSObject* EvalExecutable::compile(ExecState* exec, ScopeChainNode* scopeChainNode) +void EvalExecutable::compile(ExecState*exec, RefPtr<EvalNode> &evalNode, ScopeChainNode* scopeChainNode) { - int errLine; - UString errMsg; - RefPtr<EvalNode> evalNode = exec->globalData().parser->parse<EvalNode>(&exec->globalData(), exec->lexicalGlobalObject()->debugger(), exec, m_source, &errLine, &errMsg); - if (!evalNode) - return Error::create(exec, SyntaxError, errMsg, errLine, m_source.provider()->asID(), m_source.provider()->url()); recordParse(evalNode->features(), evalNode->lineNo(), evalNode->lastLine()); ScopeChain scopeChain(scopeChainNode); @@ -75,7 +70,18 @@ JSObject* EvalExecutable::compile(ExecState* exec, ScopeChainNode* scopeChainNod m_evalCodeBlock = new EvalCodeBlock(this, globalObject, source().provider(), scopeChain.localDepth()); OwnPtr<BytecodeGenerator> generator(new BytecodeGenerator(evalNode.get(), globalObject->debugger(), scopeChain, m_evalCodeBlock->symbolTable(), m_evalCodeBlock)); generator->generate(); - +} + +JSObject* EvalExecutable::compile(ExecState* exec, ScopeChainNode* scopeChainNode) +{ + int errLine; + UString errMsg; + RefPtr<EvalNode> evalNode = exec->globalData().parser->parse<EvalNode>(&exec->globalData(), exec->lexicalGlobalObject()->debugger(), exec, m_source, &errLine, &errMsg); + if (!evalNode) + return Error::create(exec, SyntaxError, errMsg, errLine, m_source.provider()->asID(), m_source.provider()->url()); + + compile(exec, evalNode, scopeChainNode); + evalNode->destroyData(); return 0; } diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Executable.h b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Executable.h index f3003dd..8d6a668 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Executable.h +++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Executable.h @@ -155,6 +155,7 @@ namespace JSC { } JSObject* compile(ExecState*, ScopeChainNode*); + void compile(ExecState*, RefPtr<EvalNode> &, ScopeChainNode*); ExceptionInfo* reparseExceptionInfo(JSGlobalData*, ScopeChainNode*, CodeBlock*); static PassRefPtr<EvalExecutable> create(const SourceCode& source) { return adoptRef(new EvalExecutable(source)); } |