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

Unified Diff: src/compiler/js-typed-lowering.cc

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 | « no previous file | test/mjsunit/compiler/deopt-tonumber-shift.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-typed-lowering.cc
diff --git a/src/compiler/js-typed-lowering.cc b/src/compiler/js-typed-lowering.cc
index 9b1d6780db188148a04f3a19825f2045745feecb..c3b723026da44cdb916cd3a667b4c41ab487f622 100644
--- a/src/compiler/js-typed-lowering.cc
+++ b/src/compiler/js-typed-lowering.cc
@@ -439,12 +439,17 @@ Reduction JSTypedLowering::ReduceUI32Shift(Node* node,
Signedness left_signedness,
const Operator* shift_op) {
JSBinopReduction r(this, node);
- Type* reduce_type = r.IsStrong() ? Type::Number() : Type::Primitive();
- if (r.BothInputsAre(reduce_type)) {
- r.ConvertInputsForShift(left_signedness);
- return r.ChangeToPureOperator(shift_op, Type::Integral32());
+ if (r.IsStrong()) {
+ if (r.BothInputsAre(Type::Number())) {
+ r.ConvertInputsForShift(left_signedness);
+ return r.ChangeToPureOperator(shift_op);
+ }
+ return NoChange();
}
- return NoChange();
+ Node* frame_state = NodeProperties::GetFrameStateInput(node, 1);
+ r.ConvertInputsToNumber(frame_state);
+ r.ConvertInputsForShift(left_signedness);
+ return r.ChangeToPureOperator(shift_op);
}
« no previous file with comments | « no previous file | test/mjsunit/compiler/deopt-tonumber-shift.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698