Title: [118328] trunk
Revision
118328
Author
[email protected]
Date
2012-05-24 00:00:24 -0700 (Thu, 24 May 2012)

Log Message

DFG operationTearOffActivation should return after handling the null activation case
https://bugs.webkit.org/show_bug.cgi?id=87348
<rdar://problem/11522295>

Reviewed by Oliver Hunt.

Source/_javascript_Core: 

* dfg/DFGOperations.cpp:

LayoutTests: 

* fast/js/dfg-tear-off-arguments-not-activation-expected.txt: Added.
* fast/js/dfg-tear-off-arguments-not-activation.html: Added.
* fast/js/script-tests/dfg-tear-off-arguments-not-activation.js: Added.
(bar):

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (118327 => 118328)


--- trunk/LayoutTests/ChangeLog	2012-05-24 06:58:52 UTC (rev 118327)
+++ trunk/LayoutTests/ChangeLog	2012-05-24 07:00:24 UTC (rev 118328)
@@ -1,3 +1,16 @@
+2012-05-23  Filip Pizlo  <[email protected]>
+
+        DFG operationTearOffActivation should return after handling the null activation case
+        https://bugs.webkit.org/show_bug.cgi?id=87348
+        <rdar://problem/11522295>
+
+        Reviewed by Oliver Hunt.
+
+        * fast/js/dfg-tear-off-arguments-not-activation-expected.txt: Added.
+        * fast/js/dfg-tear-off-arguments-not-activation.html: Added.
+        * fast/js/script-tests/dfg-tear-off-arguments-not-activation.js: Added.
+        (bar):
+
 2012-05-17  Filip Pizlo  <[email protected]>
 
         DFG should optimize aliased uses of the Arguments object of the current call frame

Added: trunk/LayoutTests/fast/js/dfg-tear-off-arguments-not-activation-expected.txt (0 => 118328)


--- trunk/LayoutTests/fast/js/dfg-tear-off-arguments-not-activation-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/js/dfg-tear-off-arguments-not-activation-expected.txt	2012-05-24 07:00:24 UTC (rev 118328)
@@ -0,0 +1,409 @@
+Tests the case that a function that might create an activation has not actually created one, but has created its arguments.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS thingy.length is 1
+PASS thingy[0] is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/fast/js/dfg-tear-off-arguments-not-activation.html (0 => 118328)


--- trunk/LayoutTests/fast/js/dfg-tear-off-arguments-not-activation.html	                        (rev 0)
+++ trunk/LayoutTests/fast/js/dfg-tear-off-arguments-not-activation.html	2012-05-24 07:00:24 UTC (rev 118328)
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+</head>
+<body>
+<script src=""
+<script src=""
+</body>
+</html>

Added: trunk/LayoutTests/fast/js/script-tests/dfg-tear-off-arguments-not-activation.js (0 => 118328)


--- trunk/LayoutTests/fast/js/script-tests/dfg-tear-off-arguments-not-activation.js	                        (rev 0)
+++ trunk/LayoutTests/fast/js/script-tests/dfg-tear-off-arguments-not-activation.js	2012-05-24 07:00:24 UTC (rev 118328)
@@ -0,0 +1,22 @@
+description(
+"Tests the case that a function that might create an activation has not actually created one, but has created its arguments."
+);
+
+function bar() {
+    return foo.arguments;
+}
+
+function foo(p) {
+    var x = 42;
+    if (p)
+        return (function() { return x; });
+    else
+        return bar();
+}
+
+for (var i = 0; i < 200; ++i) {
+    var thingy = foo(false);
+    shouldBe("thingy.length", "1");
+    shouldBe("thingy[0]", "false");
+}
+

Modified: trunk/Source/_javascript_Core/ChangeLog (118327 => 118328)


--- trunk/Source/_javascript_Core/ChangeLog	2012-05-24 06:58:52 UTC (rev 118327)
+++ trunk/Source/_javascript_Core/ChangeLog	2012-05-24 07:00:24 UTC (rev 118328)
@@ -1,5 +1,15 @@
 2012-05-23  Filip Pizlo  <[email protected]>
 
+        DFG operationTearOffActivation should return after handling the null activation case
+        https://bugs.webkit.org/show_bug.cgi?id=87348
+        <rdar://problem/11522295>
+
+        Reviewed by Oliver Hunt.
+
+        * dfg/DFGOperations.cpp:
+
+2012-05-23  Filip Pizlo  <[email protected]>
+
         Unreviewed, merge the arguments fix in r118138 to get bots green.
 
         * dfg/DFGArgumentsSimplificationPhase.cpp:

Modified: trunk/Source/_javascript_Core/dfg/DFGOperations.cpp (118327 => 118328)


--- trunk/Source/_javascript_Core/dfg/DFGOperations.cpp	2012-05-24 06:58:52 UTC (rev 118327)
+++ trunk/Source/_javascript_Core/dfg/DFGOperations.cpp	2012-05-24 07:00:24 UTC (rev 118328)
@@ -1066,6 +1066,7 @@
             if (!exec->codeBlock()->isStrictMode())
                 asArguments(v)->tearOff(exec);
         }
+        return;
     }
     JSActivation* activation = jsCast<JSActivation*>(activationCell);
     activation->tearOff(exec->globalData());
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to