Index: test/mjsunit/regress/regress-omit-checks.js |
diff --git a/test/mjsunit/compiler/phi-representations.js b/test/mjsunit/regress/regress-omit-checks.js |
similarity index 79% |
copy from test/mjsunit/compiler/phi-representations.js |
copy to test/mjsunit/regress/regress-omit-checks.js |
index 6d11bb0d8ea714daae5e5942b750fa9d3601439b..e5d50749888078e77259863534964da50bd2abab 100644 |
--- a/test/mjsunit/compiler/phi-representations.js |
+++ b/test/mjsunit/regress/regress-omit-checks.js |
@@ -27,30 +27,29 @@ |
// Flags: --allow-natives-syntax |
-function ar() { |
- var r = undefined; |
- var f = 1; |
- while (f--) { |
- r = (typeof r === 'undefined') ? 0.1 : r; |
- }; |
- return (r - r); |
+var a = {x:1}; |
+var a_deprecate = {x:1}; |
+a_deprecate.x = 1.5; |
+function create() { |
+ return {__proto__:a, y:1}; |
} |
+var b1 = create(); |
+var b2 = create(); |
+var b3 = create(); |
+var b4 = create(); |
-assertEquals(0, ar()); |
-assertEquals(0, ar()); |
-%OptimizeFunctionOnNextCall(ar); |
-assertEquals(0, ar()); |
- |
-function ar2() { |
- var r = undefined; |
- var f = 1; |
- while (f--) { |
- r = r === undefined ? 0.1 : r; |
- }; |
- return (r - r); |
+function set(b) { |
+ b.x = 5; |
+ b.z = 10; |
} |
-assertEquals(0, ar2()); |
-assertEquals(0, ar2()); |
-%OptimizeFunctionOnNextCall(ar2); |
-assertEquals(0, ar2()); |
+set(b1); |
+set(b2); |
+%OptimizeFunctionOnNextCall(set); |
+set(b3); |
+var called = false; |
+a.x = 1.5; |
+Object.defineProperty(a, "z", {set:function(v) { called = true; }}); |
+set(b4); |
+assertTrue(called); |
+assertEquals(undefined, b4.z); |