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

Unified Diff: test/mjsunit/regress/binop-in-effect-context-deopt.js

Issue 149403003: A64: Synchronize with r19234. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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/mjsunit/recursive-store-opt.js ('k') | test/mjsunit/regress/call-function-in-effect-context-deopt.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/binop-in-effect-context-deopt.js
diff --git a/test/mjsunit/compiler/alloc-number-debug.js b/test/mjsunit/regress/binop-in-effect-context-deopt.js
similarity index 70%
copy from test/mjsunit/compiler/alloc-number-debug.js
copy to test/mjsunit/regress/binop-in-effect-context-deopt.js
index ccfcc0c185a6d29c0acfc3c217276434b71f130a..fb7280a0d1128c6baad81e759aad6b6bec3c6528 100644
--- a/test/mjsunit/compiler/alloc-number-debug.js
+++ b/test/mjsunit/regress/binop-in-effect-context-deopt.js
@@ -27,18 +27,39 @@
// Flags: --allow-natives-syntax
-// Try to get a GC because of a heap number allocation while we
-// have live values (o) in a register.
-function f(o) {
- var x = 1.5;
- var y = 2.5;
- for (var i = 1; i < 3; i += 1) {
- %SetAllocationTimeout(1, 0, false);
- o.val = x + y + i;
- %SetAllocationTimeout(-1, -1, true);
+(function BinopInEffectContextDeoptAndOsr() {
+ function f(a, deopt, osr) {
+ var result = (a + 10, "result");
+ var dummy = deopt + 0;
+ if (osr) while (%GetOptimizationStatus(f) == 2) {}
+ return result;
}
- return o;
-}
-var o = { val: 0 };
-f(o);
+ assertEquals("result", f(true, 3, false));
+ assertEquals("result", f(true, 3, false));
+ %OptimizeFunctionOnNextCall(f);
+ assertEquals("result", f(true, "foo", true));
+})();
+
+
+(function BinopInEffectContextLazyDeopt() {
+ function deopt_f() {
+ %DeoptimizeFunction(f);
+ return "dummy";
+ }
+
+ function h() {
+ return { toString : deopt_f };
+ }
+
+ function g(x) {
+ }
+
+ function f() {
+ return g(void(h() + ""));
+ };
+
+ f();
+ %OptimizeFunctionOnNextCall(f);
+ f();
+})();
« no previous file with comments | « test/mjsunit/recursive-store-opt.js ('k') | test/mjsunit/regress/call-function-in-effect-context-deopt.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698