Title: [188934] branches/jsc-tailcall/Source/_javascript_Core
Revision
188934
Author
[email protected]
Date
2015-08-25 15:09:26 -0700 (Tue, 25 Aug 2015)

Log Message

jsc-tailcall: Add an option to disable tail calls
https://bugs.webkit.org/show_bug.cgi?id=148447

Reviewed by Michael Saboff.

* bytecompiler/NodesCodegen.cpp:
(JSC::FunctionNode::emitBytecode):
* runtime/Options.h:

Modified Paths

Diff

Modified: branches/jsc-tailcall/Source/_javascript_Core/ChangeLog (188933 => 188934)


--- branches/jsc-tailcall/Source/_javascript_Core/ChangeLog	2015-08-25 22:01:18 UTC (rev 188933)
+++ branches/jsc-tailcall/Source/_javascript_Core/ChangeLog	2015-08-25 22:09:26 UTC (rev 188934)
@@ -1,3 +1,14 @@
+2015-08-25  Basile Clement  <[email protected]>
+
+        jsc-tailcall: Add an option to disable tail calls
+        https://bugs.webkit.org/show_bug.cgi?id=148447
+
+        Reviewed by Michael Saboff.
+
+        * bytecompiler/NodesCodegen.cpp:
+        (JSC::FunctionNode::emitBytecode):
+        * runtime/Options.h:
+
 2015-08-24  Michael Saboff  <[email protected]>
 
         jsc-tailcall: Specialized thunks need to save / restore callee save "tag" registers

Modified: branches/jsc-tailcall/Source/_javascript_Core/bytecompiler/NodesCodegen.cpp (188933 => 188934)


--- branches/jsc-tailcall/Source/_javascript_Core/bytecompiler/NodesCodegen.cpp	2015-08-25 22:01:18 UTC (rev 188933)
+++ branches/jsc-tailcall/Source/_javascript_Core/bytecompiler/NodesCodegen.cpp	2015-08-25 22:09:26 UTC (rev 188934)
@@ -3044,7 +3044,7 @@
 
     generator.emitProfileControlFlow(startStartOffset());
     generator.emitDebugHook(DidEnterCallFrame, startLine(), startStartOffset(), startLineStartOffset());
-    if (isStrictMode() && generator.constructorKind() == ConstructorKind::None)
+    if (Options::enableTailCalls() && isStrictMode() && generator.constructorKind() == ConstructorKind::None)
         emitStatementsBytecode(generator, generator.ignoredResult(), CanHaveTailCalls);
     else
         emitStatementsBytecode(generator, generator.ignoredResult());

Modified: branches/jsc-tailcall/Source/_javascript_Core/runtime/Options.h (188933 => 188934)


--- branches/jsc-tailcall/Source/_javascript_Core/runtime/Options.h	2015-08-25 22:01:18 UTC (rev 188933)
+++ branches/jsc-tailcall/Source/_javascript_Core/runtime/Options.h	2015-08-25 22:09:26 UTC (rev 188934)
@@ -117,6 +117,7 @@
     v(bool, forceProfilerBytecodeGeneration, false, nullptr) \
     \
     v(bool, enableFunctionDotArguments, true, nullptr) \
+    v(bool, enableTailCalls, true, nullptr) \
     \
     /* showDisassembly implies showDFGDisassembly. */ \
     v(bool, showDisassembly, false, "dumps disassembly of all JIT compiled code upon compilation") \
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to