Index: test/mjsunit/compiler/deopt-during-eval-lookup.js |
diff --git a/test/mjsunit/compiler/smi-stores-opt.js b/test/mjsunit/compiler/deopt-during-eval-lookup.js |
similarity index 83% |
copy from test/mjsunit/compiler/smi-stores-opt.js |
copy to test/mjsunit/compiler/deopt-during-eval-lookup.js |
index ca0923abc99501096d182bcdcd05f6f4020de9c9..1df04bbad8aa95abe2362ef100f86d6a2a19f8ae 100644 |
--- a/test/mjsunit/compiler/smi-stores-opt.js |
+++ b/test/mjsunit/compiler/deopt-during-eval-lookup.js |
@@ -1,4 +1,4 @@ |
-// Copyright 2014 the V8 project authors. All rights reserved. |
+// Copyright 2015 the V8 project authors. All rights reserved. |
// Redistribution and use in source and binary forms, with or without |
// modification, are permitted provided that the following conditions are |
// met: |
@@ -27,23 +27,21 @@ |
// Flags: --allow-natives-syntax |
-var o = {a:1.5}; |
-o.a = 0; |
-var a = o.a; |
- |
function g() { |
- return 1; |
+ return 100; |
+} |
+ |
+function getter() { |
+ // Test that we can deopt during the CallRuntimeForPair call to LoadLookupSlot |
+ %DeoptimizeFunction(f); |
+ return g; |
} |
-var o2 = {a:{}}; |
+Object.defineProperty(this, "eval", {get: getter }); |
function f() { |
- var result = {a: a}; |
- var literal = {x:g()}; |
- return [result, literal]; |
+ return eval("200"); |
} |
-f(); |
-f(); |
%OptimizeFunctionOnNextCall(f); |
-assertEquals(1, f()[1].x); |
+assertEquals(100, f()); |