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

Unified Diff: test/mjsunit/regress/regress-crbug-554831.js

Issue 1455883004: [crankshaft] only compile string index access with element key. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-crbug-554831.js
diff --git a/test/mjsunit/compiler/regress-491578.js b/test/mjsunit/regress/regress-crbug-554831.js
similarity index 54%
copy from test/mjsunit/compiler/regress-491578.js
copy to test/mjsunit/regress/regress-crbug-554831.js
index c27570456c31e9a191fe1f4f1ea17b80f29de98e..f7343e08b90a1a484179907c34d7a469e93aeec1 100644
--- a/test/mjsunit/compiler/regress-491578.js
+++ b/test/mjsunit/regress/regress-crbug-554831.js
@@ -4,12 +4,12 @@
// Flags: --allow-natives-syntax
-function foo(x) {
- if (x === undefined) return;
- while (true) {
- while (1 || 2) { }
- f();
- }
-}
-%OptimizeFunctionOnNextCall(foo);
-foo();
+(function() {
+ var key = "s";
+ function f(object) { return object[key]; };
+ f("");
+ f("");
+ %OptimizeFunctionOnNextCall(f);
+ f("");
+ assertOptimized(f);
+})();
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698