Index: test/mjsunit/load_poly_effect.js |
diff --git a/test/mjsunit/array-non-smi-length.js b/test/mjsunit/load_poly_effect.js |
similarity index 82% |
copy from test/mjsunit/array-non-smi-length.js |
copy to test/mjsunit/load_poly_effect.js |
index 23a25ee797bd68690ad2a7ce26a9135e23b486e2..7663d86ad0fba67afabc751af8254d92542c00b3 100644 |
--- a/test/mjsunit/array-non-smi-length.js |
+++ b/test/mjsunit/load_poly_effect.js |
@@ -27,20 +27,21 @@ |
// Flags: --allow-natives-syntax |
-function TestNonSmiArrayLength() { |
- function f(a) { |
- return a.length+1; |
- } |
+var o = {}; |
+var count = 0; |
+Object.defineProperty(o, "x", {get:function(){count++;return 100}}); |
- var a = []; |
- a.length = 0xFFFF; |
- assertSame(0x10000, f(a)); |
- assertSame(0x10000, f(a)); |
- |
- %OptimizeFunctionOnNextCall(f); |
- a.length = 0xFFFFFFFF; |
- assertSame(0x100000000, f(a)); |
+function load(o, o2) { |
+ return 1 + (o.x, o2.x_tagged); |
} |
-TestNonSmiArrayLength(); |
+var deopt = false; |
+var o2 = {x_tagged:{}}; |
+o2.x_tagged = 1; |
+load({x:1}, o2); |
+load({x:1}, o2); |
+print(load(o, o2)); |
+%OptimizeFunctionOnNextCall(load); |
+o2.x_tagged = true; |
+print(load(o, o2)); |