Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1347)

Unified Diff: test/mjsunit/compiler/deopt-during-eval-lookup.js

Issue 1570623007: [Interpreter] Add support for CallRuntimeForPair to Bytecode Graph Builder. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_eval
Patch Set: Fix test flags Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/compiler/test-run-bytecode-graph-builder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « test/cctest/compiler/test-run-bytecode-graph-builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698