Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (149129 => 149130)
--- trunk/Source/_javascript_Core/ChangeLog 2013-04-25 18:50:46 UTC (rev 149129)
+++ trunk/Source/_javascript_Core/ChangeLog 2013-04-25 18:59:50 UTC (rev 149130)
@@ -1,3 +1,16 @@
+2013-04-25 Oliver Hunt <[email protected]>
+
+ 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 <[email protected]>
32 Bit: Crash due to RegExpTest nodes not setting result type to Boolean
Modified: trunk/Source/_javascript_Core/jsc.cpp (149129 => 149130)
--- trunk/Source/_javascript_Core/jsc.cpp 2013-04-25 18:50:46 UTC (rev 149129)
+++ trunk/Source/_javascript_Core/jsc.cpp 2013-04-25 18:59:50 UTC (rev 149130)
@@ -626,7 +626,7 @@
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);
Modified: trunk/Source/_javascript_Core/runtime/Completion.cpp (149129 => 149130)
--- trunk/Source/_javascript_Core/runtime/Completion.cpp 2013-04-25 18:50:46 UTC (rev 149129)
+++ trunk/Source/_javascript_Core/runtime/Completion.cpp 2013-04-25 18:59:50 UTC (rev 149130)
@@ -52,12 +52,11 @@
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;
}
Modified: trunk/Source/_javascript_Core/runtime/Completion.h (149129 => 149130)
--- trunk/Source/_javascript_Core/runtime/Completion.h 2013-04-25 18:50:46 UTC (rev 149129)
+++ trunk/Source/_javascript_Core/runtime/Completion.h 2013-04-25 18:59:50 UTC (rev 149130)
@@ -31,8 +31,9 @@
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);