Title: [157543] trunk/Source/_javascript_Core
Revision
157543
Author
[email protected]
Date
2013-10-16 17:15:59 -0700 (Wed, 16 Oct 2013)

Log Message

Add a useLLInt option to jsc
https://bugs.webkit.org/show_bug.cgi?id=122930

Reviewed by Geoffrey Garen.

* runtime/Executable.cpp:
(JSC::setupLLInt):
(JSC::setupJIT):
(JSC::ScriptExecutable::prepareForExecutionImpl):
* runtime/Options.h:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (157542 => 157543)


--- trunk/Source/_javascript_Core/ChangeLog	2013-10-16 23:57:02 UTC (rev 157542)
+++ trunk/Source/_javascript_Core/ChangeLog	2013-10-17 00:15:59 UTC (rev 157543)
@@ -1,3 +1,16 @@
+2013-10-16  Filip Pizlo  <[email protected]>
+
+        Add a useLLInt option to jsc
+        https://bugs.webkit.org/show_bug.cgi?id=122930
+
+        Reviewed by Geoffrey Garen.
+
+        * runtime/Executable.cpp:
+        (JSC::setupLLInt):
+        (JSC::setupJIT):
+        (JSC::ScriptExecutable::prepareForExecutionImpl):
+        * runtime/Options.h:
+
 2013-10-16  Mark Hahnenberg  <[email protected]>
 
         Build fix.

Modified: trunk/Source/_javascript_Core/runtime/Executable.cpp (157542 => 157543)


--- trunk/Source/_javascript_Core/runtime/Executable.cpp	2013-10-16 23:57:02 UTC (rev 157542)
+++ trunk/Source/_javascript_Core/runtime/Executable.cpp	2013-10-17 00:15:59 UTC (rev 157543)
@@ -260,6 +260,25 @@
     return result;
 }
 
+static void setupLLInt(VM& vm, CodeBlock* codeBlock)
+{
+#if ENABLE(LLINT)
+    LLInt::setEntrypoint(vm, codeBlock);
+#else
+    UNREACHABLE_FOR_PLATFORM();
+#endif
+}
+
+static void setupJIT(VM& vm, CodeBlock* codeBlock)
+{
+#if ENABLE(JIT)
+    CompilationResult result = JIT::compile(&vm, codeBlock, JITCompilationMustSucceed);
+    RELEASE_ASSERT(result == CompilationSuccessful);
+#else
+    UNREACHABLE_FOR_PLATFORM();
+#endif
+}
+
 JSObject* ScriptExecutable::prepareForExecutionImpl(
     ExecState* exec, JSScope* scope, CodeSpecializationKind kind)
 {
@@ -273,13 +292,18 @@
         return exception;
     }
     
+    bool shouldUseLLInt;
 #if ENABLE(LLINT)
-    LLInt::setEntrypoint(vm, codeBlock.get());
+    shouldUseLLInt = Options::useLLInt();
 #else
-    CompilationResult result = JIT::compile(&vm, codeBlock.get(), JITCompilationMustSucceed);
-    RELEASE_ASSERT(result == CompilationSuccessful);
+    shouldUseLLInt = false;
 #endif
-
+    
+    if (shouldUseLLInt)
+        setupLLInt(vm, codeBlock.get());
+    else
+        setupJIT(vm, codeBlock.get());
+    
     installCode(codeBlock.get());
     return 0;
 }

Modified: trunk/Source/_javascript_Core/runtime/Options.h (157542 => 157543)


--- trunk/Source/_javascript_Core/runtime/Options.h	2013-10-16 23:57:02 UTC (rev 157542)
+++ trunk/Source/_javascript_Core/runtime/Options.h	2013-10-17 00:15:59 UTC (rev 157543)
@@ -89,6 +89,7 @@
 typedef OptionRange optionRange;
 
 #define JSC_OPTIONS(v) \
+    v(bool, useLLInt,  true) \
     v(bool, useJIT,    true) \
     v(bool, useDFGJIT, true) \
     v(bool, useRegExpJIT, true) \
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to