Commit 93963fe0 authored by oliver@apple.com's avatar oliver@apple.com

Make checkSyntax take a VM instead of an ExecState

RS=Tim

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149130 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 43b873d6
2013-04-25 Oliver Hunt <oliver@apple.com>
Make checkSyntax take a VM instead of an ExecState
RS=Tim
* jsc.cpp:
(runInteractive):
* runtime/Completion.cpp:
(JSC::checkSyntax):
* runtime/Completion.h:
(JSC):
2013-04-25 Michael Saboff <msaboff@apple.com>
32 Bit: Crash due to RegExpTest nodes not setting result type to Boolean
......
......@@ -626,7 +626,7 @@ static void runInteractive(GlobalObject* globalObject)
break;
source = source + line;
source = source + '\n';
checkSyntax(globalObject->globalExec(), makeSource(source, interpreterName), error);
checkSyntax(globalObject->vm(), makeSource(source, interpreterName), error);
if (!line[0])
break;
add_history(line);
......
......@@ -52,12 +52,11 @@ bool checkSyntax(ExecState* exec, const SourceCode& source, JSValue* returnedExc
return true;
}
bool checkSyntax(ExecState* exec, const SourceCode& source, ParserError& error)
bool checkSyntax(VM& vm, const SourceCode& source, ParserError& error)
{
JSLockHolder lock(exec);
RELEASE_ASSERT(exec->vm().identifierTable == wtfThreadData().currentIdentifierTable());
VM* vm = &exec->vm();
RefPtr<ProgramNode> programNode = parse<ProgramNode>(vm, source, 0, Identifier(), JSParseNormal, JSParseProgramCode, error);
JSLockHolder lock(vm);
RELEASE_ASSERT(vm.identifierTable == wtfThreadData().currentIdentifierTable());
RefPtr<ProgramNode> programNode = parse<ProgramNode>(&vm, source, 0, Identifier(), JSParseNormal, JSParseProgramCode, error);
return programNode;
}
......
......@@ -31,8 +31,9 @@ namespace JSC {
class ExecState;
class JSScope;
class SourceCode;
class VM;
JS_EXPORT_PRIVATE bool checkSyntax(ExecState*, const SourceCode&, ParserError&);
JS_EXPORT_PRIVATE bool checkSyntax(VM&, const SourceCode&, ParserError&);
JS_EXPORT_PRIVATE bool checkSyntax(ExecState*, const SourceCode&, JSValue* exception = 0);
JS_EXPORT_PRIVATE JSValue evaluate(ExecState*, const SourceCode&, JSValue thisValue = JSValue(), JSValue* exception = 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment