Title: [233854] trunk/Source/_javascript_Core
Revision
233854
Author
mark....@apple.com
Date
2018-07-16 11:42:07 -0700 (Mon, 16 Jul 2018)

Log Message

jsc shell's noFTL utility test function should be more robust.
https://bugs.webkit.org/show_bug.cgi?id=187704
<rdar://problem/42231988>

Reviewed by Michael Saboff and Keith Miller.

* jsc.cpp:
(functionNoFTL):
- only setNeverFTLOptimize() if the function is actually a JS function.

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (233853 => 233854)


--- trunk/Source/_javascript_Core/ChangeLog	2018-07-16 18:35:50 UTC (rev 233853)
+++ trunk/Source/_javascript_Core/ChangeLog	2018-07-16 18:42:07 UTC (rev 233854)
@@ -1,3 +1,15 @@
+2018-07-16  Mark Lam  <mark....@apple.com>
+
+        jsc shell's noFTL utility test function should be more robust.
+        https://bugs.webkit.org/show_bug.cgi?id=187704
+        <rdar://problem/42231988>
+
+        Reviewed by Michael Saboff and Keith Miller.
+
+        * jsc.cpp:
+        (functionNoFTL):
+        - only setNeverFTLOptimize() if the function is actually a JS function.
+
 2018-07-15  Carlos Garcia Campos  <cgar...@igalia.com>
 
         [GLIB] Add API to evaluate code using a given object to store global symbols

Modified: trunk/Source/_javascript_Core/jsc.cpp (233853 => 233854)


--- trunk/Source/_javascript_Core/jsc.cpp	2018-07-16 18:35:50 UTC (rev 233853)
+++ trunk/Source/_javascript_Core/jsc.cpp	2018-07-16 18:42:07 UTC (rev 233854)
@@ -1440,12 +1440,11 @@
 
 EncodedJSValue JSC_HOST_CALL functionNoFTL(ExecState* exec)
 {
-    VM& vm = exec->vm();
-    if (JSFunction* function = jsDynamicCast<JSFunction*>(vm, exec->argument(0))) {
-        FunctionExecutable* executable = function->jsExecutable();
-        executable->setNeverFTLOptimize(true);
+    if (exec->argumentCount()) {
+        FunctionExecutable* executable = getExecutableForFunction(exec->argument(0));
+        if (executable)
+            executable->setNeverFTLOptimize(true);
     }
-
     return JSValue::encode(jsUndefined());
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to