OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/compiler/ast-graph-builder.h" | 5 #include "src/compiler/ast-graph-builder.h" |
6 | 6 |
7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/compiler.h" | 8 #include "src/compiler.h" |
9 #include "src/compiler/ast-loop-assignment-analyzer.h" | 9 #include "src/compiler/ast-loop-assignment-analyzer.h" |
10 #include "src/compiler/control-builders.h" | 10 #include "src/compiler/control-builders.h" |
(...skipping 2708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2719 environment()->Push(old_value); | 2719 environment()->Push(old_value); |
2720 } | 2720 } |
2721 } | 2721 } |
2722 | 2722 |
2723 // Create node to perform +1/-1 operation. | 2723 // Create node to perform +1/-1 operation. |
2724 Node* value; | 2724 Node* value; |
2725 { | 2725 { |
2726 // TODO(bmeurer): Cleanup this feedback/bailout mess! | 2726 // TODO(bmeurer): Cleanup this feedback/bailout mess! |
2727 FrameStateBeforeAndAfter states(this, BailoutId::None()); | 2727 FrameStateBeforeAndAfter states(this, BailoutId::None()); |
2728 value = BuildBinaryOp(old_value, jsgraph()->OneConstant(), | 2728 value = BuildBinaryOp(old_value, jsgraph()->OneConstant(), |
2729 expr->binary_op(), TypeFeedbackId::None()); | 2729 expr->binary_op(), expr->CountBinOpFeedbackId()); |
2730 // This should never deoptimize outside strong mode because otherwise we | 2730 // This should never deoptimize outside strong mode because otherwise we |
2731 // have converted to number before. | 2731 // have converted to number before. |
2732 states.AddToNode(value, is_strong(language_mode()) ? expr->ToNumberId() | 2732 states.AddToNode(value, is_strong(language_mode()) ? expr->ToNumberId() |
2733 : BailoutId::None(), | 2733 : BailoutId::None(), |
2734 OutputFrameStateCombine::Ignore()); | 2734 OutputFrameStateCombine::Ignore()); |
2735 } | 2735 } |
2736 | 2736 |
2737 // Store the value. | 2737 // Store the value. |
2738 VectorSlotPair feedback = CreateVectorSlotPair(expr->CountSlot()); | 2738 VectorSlotPair feedback = CreateVectorSlotPair(expr->CountSlot()); |
2739 switch (assign_type) { | 2739 switch (assign_type) { |
(...skipping 1600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4340 // Phi does not exist yet, introduce one. | 4340 // Phi does not exist yet, introduce one. |
4341 value = NewPhi(inputs, value, control); | 4341 value = NewPhi(inputs, value, control); |
4342 value->ReplaceInput(inputs - 1, other); | 4342 value->ReplaceInput(inputs - 1, other); |
4343 } | 4343 } |
4344 return value; | 4344 return value; |
4345 } | 4345 } |
4346 | 4346 |
4347 } // namespace compiler | 4347 } // namespace compiler |
4348 } // namespace internal | 4348 } // namespace internal |
4349 } // namespace v8 | 4349 } // namespace v8 |
OLD | NEW |