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

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: Add tests for the checks and fix check insertion 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
Index: src/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
index bc2f0845d34e0a0a8e939af2964f2ae5482a5d70..d4586202bc8b09948f4b47546e23c23258b6d3c3 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -2729,6 +2729,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.
@@ -2741,16 +2742,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());

Powered by Google App Engine
This is Rietveld 408576698