]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - runtime/Completion.h
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / runtime / Completion.h
index 3d3b86fe44dc5f3573cfc6d86bf64dd147e77004..089911e0fd78eb5d1f98a0e23a3eef19a533ad7d 100644 (file)
 #ifndef Completion_h
 #define Completion_h
 
-#include "JSValue.h"
+#include "JSCJSValue.h"
+#include <wtf/NakedPtr.h>
 
 namespace JSC {
 
-    class ExecState;
-    class ScopeChainNode;
-    class SourceCode;
+class Exception;
+class ExecState;
+class JSScope;
+class ParserError;
+class SourceCode;
+class VM;
 
-    JS_EXPORT_PRIVATE bool checkSyntax(ExecState*, const SourceCode&, JSValue* exception = 0);
-    JS_EXPORT_PRIVATE JSValue evaluate(ExecState*, ScopeChainNode*, const SourceCode&, JSValue thisValue = JSValue(), JSValue* exception = 0);
+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, NakedPtr<Exception>& returnedException);
+inline JSValue evaluate(ExecState* exec, const SourceCode& sourceCode, JSValue thisValue = JSValue())
+{
+    NakedPtr<Exception> unused;
+    return evaluate(exec, sourceCode, thisValue, unused);
+}
 
 } // namespace JSC