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

Unified Diff: test/mjsunit/compiler/deopt-tonumber-shift.js

Issue 1140883003: [turbofan] Use frame state before for shift operations as well. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add test case. Created 5 years, 7 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 | « src/compiler/js-typed-lowering.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-tonumber-shift.js
diff --git a/test/mjsunit/compiler/deopt-tonumber-binop.js b/test/mjsunit/compiler/deopt-tonumber-shift.js
similarity index 84%
copy from test/mjsunit/compiler/deopt-tonumber-binop.js
copy to test/mjsunit/compiler/deopt-tonumber-shift.js
index c93ef9dfd5ae011dccf117710689a92cb1494493..bb4d1d5c1cd5213edc26b3be2953e511668c1863 100644
--- a/test/mjsunit/compiler/deopt-tonumber-binop.js
+++ b/test/mjsunit/compiler/deopt-tonumber-shift.js
@@ -3,11 +3,11 @@
// found in the LICENSE file.
// Flags: --allow-natives-syntax
-//
+
var f = (function() {
"use asm";
function f(x, y) {
- return x - y;
+ return x << y;
}
return f;
})();
@@ -26,15 +26,15 @@ var o = { toString : function() {
} };
counter = 0;
-assertEquals(1, f(deopt, o));
+assertEquals(4, f(deopt, o));
assertEquals(2, counter);
%OptimizeFunctionOnNextCall(f);
counter = 0;
-assertEquals(-1, f(o, deopt));
+assertEquals(4, f(o, deopt));
assertEquals(2, counter);
%OptimizeFunctionOnNextCall(f);
counter = 0;
-assertEquals(0, f(deopt, deopt));
+assertEquals(8, f(deopt, deopt));
assertEquals(2, counter);
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698