Index: test/mjsunit/regress/comparison-in-effect-context-deopt.js |
diff --git a/test/mjsunit/compiler/smi-stores-opt.js b/test/mjsunit/regress/comparison-in-effect-context-deopt.js |
similarity index 86% |
copy from test/mjsunit/compiler/smi-stores-opt.js |
copy to test/mjsunit/regress/comparison-in-effect-context-deopt.js |
index ca0923abc99501096d182bcdcd05f6f4020de9c9..b28dff73a745dfc7445a6c093380c56f51b3fb76 100644 |
--- a/test/mjsunit/compiler/smi-stores-opt.js |
+++ b/test/mjsunit/regress/comparison-in-effect-context-deopt.js |
@@ -27,23 +27,21 @@ |
// Flags: --allow-natives-syntax |
-var o = {a:1.5}; |
-o.a = 0; |
-var a = o.a; |
- |
-function g() { |
- return 1; |
+function lazyDeopt() { |
+ %DeoptimizeFunction(test); |
+ return "deopt"; |
} |
-var o2 = {a:{}}; |
+var x = { toString : lazyDeopt }; |
+ |
+function g(x) { |
+ return "result"; |
+} |
-function f() { |
- var result = {a: a}; |
- var literal = {x:g()}; |
- return [result, literal]; |
+function test(x) { |
+ return g(void(x == "")); |
} |
-f(); |
-f(); |
-%OptimizeFunctionOnNextCall(f); |
-assertEquals(1, f()[1].x); |
+test(x); |
+%OptimizeFunctionOnNextCall(test); |
+assertEquals("result", test(x)); |