Index: test/mjsunit/generic-monorphic-keyed-load.js |
diff --git a/test/mjsunit/regress/regress-334708.js b/test/mjsunit/generic-monorphic-keyed-load.js |
similarity index 89% |
copy from test/mjsunit/regress/regress-334708.js |
copy to test/mjsunit/generic-monorphic-keyed-load.js |
index f0291bbdab61128baad9df89457d045b66644f1b..43889460f622209a1e56a92293ce7cff25c197ab 100644 |
--- a/test/mjsunit/regress/regress-334708.js |
+++ b/test/mjsunit/generic-monorphic-keyed-load.js |
@@ -27,16 +27,20 @@ |
// Flags: --allow-natives-syntax |
-function foo(x, y) { |
- return Math.floor(x / y); |
+ |
+var o = { |
+ "foo": "bar", |
} |
-function bar(x, y) { |
- return foo(x + 1, y + 1); |
+function get(obj, key) { |
+ return obj[key]; |
} |
-foo(16, "4"); |
+get(o, "foo"); |
+get(o, "foo"); |
+get(o, "foo"); |
+ |
+%OptimizeFunctionOnNextCall(get); |
+get(o, "foo"); |
-bar(64, 2); |
-%OptimizeFunctionOnNextCall(bar); |
-bar(64, 2); |
+assertOptimized(get); |