Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(323)

Unified Diff: test/mjsunit/harmony/block-scoping.js

Issue 307593002: Preliminary support for block contexts in hydrogen. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: test/mjsunit/harmony/block-scoping.js
diff --git a/test/mjsunit/harmony/block-scoping.js b/test/mjsunit/harmony/block-scoping.js
index 31194d99fde758083c79b8e9b16174df9efe262b..336de23c5d863b43fde870eec2da7b4ddca8bbc0 100644
--- a/test/mjsunit/harmony/block-scoping.js
+++ b/test/mjsunit/harmony/block-scoping.js
@@ -40,8 +40,10 @@ function f1() {
assertEquals(1, x)
assertEquals(undefined, y)
}
+for (var j = 0; j < 5; ++j) f1();
+%OptimizeFunctionOnNextCall(f1);
f1();
-
+assertTrue(%GetOptimizationStatus(f1) != 2);
// Dynamic lookup in and through block contexts.
function f2(one) {
@@ -59,6 +61,8 @@ function f2(one) {
assertEquals(6, eval('v'));
}
}
+for (var j = 0; j < 5; ++j) f2(1);
+%OptimizeFunctionOnNextCall(f2);
f2(1);
rossberg 2014/06/04 12:54:53 Why not assert optimization status here as well (a
ulan 2014/06/04 14:02:05 Did it for the function below. This function doesn
@@ -76,9 +80,10 @@ function f3(one) {
assertEquals(4, z);
assertEquals(5, u);
assertEquals(6, v);
-
}
}
+for (var j = 0; j < 5; ++j) f3(1);
+%OptimizeFunctionOnNextCall(f3);
f3(1);
« test/mjsunit/harmony/block-let-crankshaft.js ('K') | « test/mjsunit/harmony/block-let-crankshaft.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698