Title: [188289] branches/jsc-tailcall
Revision
188289
Author
[email protected]
Date
2015-08-11 13:47:08 -0700 (Tue, 11 Aug 2015)

Log Message

jsc-tailcall: Make tail call tests run in all tiers
https://bugs.webkit.org/show_bug.cgi?id=147895

Reviewed by Michael Saboff.

Source/_javascript_Core:

Make the test checking that tail calls are correctly performed
when we have a syntaxic tail call run enough to get compiled to the
upper tiers.

Also remove a bogus file that contained a duplicate of those tests.

* tests/stress/tail-call-recognize.js:
* tests/stress/tail-call-trigger.js: Removed.

Tools:

Add a runNoInline function to jsc-stress-tests to force a test to run
globally without inlining.

* Scripts/run-jsc-stress-tests:

Modified Paths

Removed Paths

Diff

Modified: branches/jsc-tailcall/Source/_javascript_Core/ChangeLog (188288 => 188289)


--- branches/jsc-tailcall/Source/_javascript_Core/ChangeLog	2015-08-11 20:47:02 UTC (rev 188288)
+++ branches/jsc-tailcall/Source/_javascript_Core/ChangeLog	2015-08-11 20:47:08 UTC (rev 188289)
@@ -1,5 +1,21 @@
 2015-08-11  Basile Clement  <[email protected]>
 
+        jsc-tailcall: Make tail call tests run in all tiers
+        https://bugs.webkit.org/show_bug.cgi?id=147895
+
+        Reviewed by Michael Saboff.
+
+        Make the test checking that tail calls are correctly performed
+        when we have a syntaxic tail call run enough to get compiled to the
+        upper tiers.
+
+        Also remove a bogus file that contained a duplicate of those tests.
+
+        * tests/stress/tail-call-recognize.js:
+        * tests/stress/tail-call-trigger.js: Removed.
+
+2015-08-11  Basile Clement  <[email protected]>
+
         jsc-tailcall: REGRESSION: DFGByteCodeParser fails when a tail call is inside a ternary
         https://bugs.webkit.org/show_bug.cgi?id=147849
 

Modified: branches/jsc-tailcall/Source/_javascript_Core/tests/stress/tail-call-recognize.js (188288 => 188289)


--- branches/jsc-tailcall/Source/_javascript_Core/tests/stress/tail-call-recognize.js	2015-08-11 20:47:02 UTC (rev 188288)
+++ branches/jsc-tailcall/Source/_javascript_Core/tests/stress/tail-call-recognize.js	2015-08-11 20:47:08 UTC (rev 188289)
@@ -1,3 +1,5 @@
+//@ runNoInline
+
 function callerMustBeRun() {
     if (!Object.is(callerMustBeRun.caller, runTests))
         throw Error("Wrong caller, expected run but got ", callerMustBeRun.caller);
@@ -174,4 +176,5 @@
     })();
 }
 
-runTests();
+for (var i = 0; i < 10000; ++i)
+    runTests();

Deleted: branches/jsc-tailcall/Source/_javascript_Core/tests/stress/tail-call-trigger.js (188288 => 188289)


--- branches/jsc-tailcall/Source/_javascript_Core/tests/stress/tail-call-trigger.js	2015-08-11 20:47:02 UTC (rev 188288)
+++ branches/jsc-tailcall/Source/_javascript_Core/tests/stress/tail-call-trigger.js	2015-08-11 20:47:08 UTC (rev 188289)
@@ -1,177 +0,0 @@
-function callerMustBeRun() {
-    if (!Object.is(callerMustBeRun.caller, runTests))
-        throw Error("Wrong caller, expected run but got ", callerMustBeRun.caller);
-}
-
-function callerMustBeStrict() {
-    var errorThrown = false;
-    try {
-        callerMustBeStrict.caller;
-    } catch (e) {
-        errorThrown = true;
-    }
-    if (!errorThrown)
-        throw Error("Wrong caller, expected strict caller but got ", callerMustBeStrict.caller);
-}
-
-function runTests() {
-    // Statement tests
-    (function simpleTailCall() {
-        "use strict";
-        return callerMustBeRun();
-    })();
-
-    (function noTailCallInTry() {
-        "use strict";
-        try {
-            return callerMustBeStrict();
-        } catch (e) {
-            throw e;
-        }
-    })();
-
-    (function tailCallInCatch() {
-        "use strict";
-        try { } catch (e) { return callerMustBeRun(); }
-    })();
-
-    (function tailCallInFinally() {
-        "use strict";
-        try { } finally { return callerMustBeRun(); }
-    })();
-
-    (function tailCallInFinallyWithCatch() {
-        "use strict";
-        try { } catch (e) { } finally { return callerMustBeRun(); }
-    })();
-
-    (function tailCallInFinallyWithCatchTaken() {
-        "use strict";
-        try { throw null; } catch (e) { } finally { return callerMustBeRun(); }
-    })();
-
-    (function noTailCallInCatchIfFinally() {
-        "use strict";
-        try { throw null; } catch (e) { return callerMustBeStrict(); } finally { }
-    })();
-
-    (function tailCallInFor() {
-        "use strict";
-        for (var i = 0; i < 10; ++i)
-            return callerMustBeRun();
-    })();
-
-    (function tailCallInWhile() {
-        "use strict";
-        while (true)
-            return callerMustBeRun();
-    })();
-
-    (function tailCallInDoWhile() {
-        "use strict";
-        do
-            return callerMustBeRun();
-        while (true);
-    })();
-
-    (function noTailCallInForIn() {
-        "use strict";
-        for (var x in [1, 2])
-            return callerMustBeStrict();
-    })();
-
-    (function noTailCallInForOf() {
-        "use strict";
-        for (var x of [1, 2])
-            return callerMustBeStrict();
-    })();
-
-    (function tailCallInIf() {
-        "use strict";
-        if (true)
-            return callerMustBeRun();
-    })();
-
-    (function tailCallInElse() {
-        "use strict";
-        if (false) throw new Error("WTF");
-        else return callerMustBeRun();
-    })();
-
-    (function tailCallInSwitchCase() {
-        "use strict";
-        switch (0) {
-        case 0: return callerMustBeRun();
-        }
-    })();
-
-    (function tailCallInSwitchDefault() {
-        "use strict";
-        switch (0) {
-        default: return callerMustBeRun();
-        }
-    })();
-
-    (function tailCallWithLabel() {
-        "use strict";
-        dummy: return callerMustBeRun();
-    })();
-
-    // _expression_ tests, we don't enumerate all the cases where there
-    // *shouldn't* be a tail call
-
-    (function tailCallComma() {
-        "use strict";
-        return callerMustBeStrict(), callerMustBeRun();
-    })();
-
-    (function tailCallTernaryLeft() {
-        "use strict";
-        return true ? callerMustBeRun() : unreachable();
-    })();
-
-    (function tailCallTernaryRight() {
-        "use strict";
-        return false ? unreachable() : callerMustBeRun();
-    })();
-
-    (function tailCallLogicalAnd() {
-        "use strict";
-        return true && callerMustBeRun();
-    })();
-
-    (function tailCallLogicalOr() {
-        "use strict";
-        return false || callerMustBeRun();
-    })();
-
-    (function memberTailCall() {
-        "use strict";
-        return { f: callerMustBeRun }.f();
-    })();
-
-    (function bindTailCall() {
-        "use strict";
-        return callerMustBeRun.bind()();
-    })();
-
-    // Function.prototype tests
-
-    (function applyTailCall() {
-        "use strict";
-        return callerMustBeRun.apply();
-    })();
-
-    (function callTailCall() {
-        "use strict";
-        return callerMustBeRun.call();
-    })();
-
-    // No tail call for constructors
-    (function noTailConstruct() {
-        "use strict";
-        return new callerMustBeStrict();
-    })();
-}
-
-runTests();

Modified: branches/jsc-tailcall/Tools/ChangeLog (188288 => 188289)


--- branches/jsc-tailcall/Tools/ChangeLog	2015-08-11 20:47:02 UTC (rev 188288)
+++ branches/jsc-tailcall/Tools/ChangeLog	2015-08-11 20:47:08 UTC (rev 188289)
@@ -1,3 +1,15 @@
+2015-08-11  Basile Clement  <[email protected]>
+
+        jsc-tailcall: Make tail call tests run in all tiers
+        https://bugs.webkit.org/show_bug.cgi?id=147895
+
+        Reviewed by Michael Saboff.
+
+        Add a runNoInline function to jsc-stress-tests to force a test to run
+        globally without inlining.
+
+        * Scripts/run-jsc-stress-tests:
+
 2015-07-09  Devin Rousso  <[email protected]>
 
         Unreviewed.  Added myself as a committer.

Modified: branches/jsc-tailcall/Tools/Scripts/run-jsc-stress-tests (188288 => 188289)


--- branches/jsc-tailcall/Tools/Scripts/run-jsc-stress-tests	2015-08-11 20:47:02 UTC (rev 188288)
+++ branches/jsc-tailcall/Tools/Scripts/run-jsc-stress-tests	2015-08-11 20:47:08 UTC (rev 188289)
@@ -1043,6 +1043,11 @@
     puts "Skipping #{$collectionName}/#{$benchmark}"
 end
 
+def runNoInline
+    $didAddRunCommand = true
+    run("-no-inline", "--maximumInliningDepth=1")
+end
+
 def largeHeap
     if $memoryLimited
         $didAddRunCommand = true
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to