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

Unified Diff: src/compiler/ast-graph-builder.cc

Issue 1921563002: [turbofan] Initial version of number type feedback. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 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.h ('k') | src/compiler/effect-control-linearizer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
index 5c0331ed6f7a2da8dd746ba77d66dde094ea2582..ddf9b9bbcfd451f37add57cf7e396f91ae1ea6d4 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -2735,6 +2735,7 @@ void AstGraphBuilder::VisitCountOperation(CountOperation* expr) {
// Create a proper eager frame state for the stores.
environment()->Push(old_value);
FrameStateBeforeAndAfter store_states(this, expr->ToNumberId());
+ FrameStateBeforeAndAfter binop_states(this, expr->ToNumberId());
old_value = environment()->Pop();
// Save result for postfix expressions at correct stack depth.
@@ -2747,16 +2748,12 @@ void AstGraphBuilder::VisitCountOperation(CountOperation* expr) {
}
// Create node to perform +1/-1 operation.
- Node* value;
- {
- // TODO(bmeurer): Cleanup this feedback/bailout mess!
- FrameStateBeforeAndAfter states(this, BailoutId::None());
- value = BuildBinaryOp(old_value, jsgraph()->OneConstant(),
- expr->binary_op(), expr->CountBinOpFeedbackId());
- // This should never deoptimize because we have converted to number before.
- states.AddToNode(value, BailoutId::None(),
- OutputFrameStateCombine::Ignore());
- }
+ // TODO(bmeurer): Cleanup this feedback/bailout mess!
+ Node* value = BuildBinaryOp(old_value, jsgraph()->OneConstant(),
+ expr->binary_op(), expr->CountBinOpFeedbackId());
+ // This should never deoptimize because we have converted to number before.
+ binop_states.AddToNode(value, BailoutId::None(),
+ OutputFrameStateCombine::Ignore());
// Store the value.
VectorSlotPair feedback = CreateVectorSlotPair(expr->CountSlot());
« no previous file with comments | « src/compiler.h ('k') | src/compiler/effect-control-linearizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698