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/compiler.h" | 7 #include "src/compiler.h" |
8 #include "src/compiler/ast-loop-assignment-analyzer.h" | 8 #include "src/compiler/ast-loop-assignment-analyzer.h" |
9 #include "src/compiler/control-builders.h" | 9 #include "src/compiler/control-builders.h" |
10 #include "src/compiler/js-type-feedback.h" | 10 #include "src/compiler/js-type-feedback.h" |
(...skipping 1645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1656 NewNode(javascript()->CallRuntime(Runtime::kObjectFreeze, 1), literal); | 1656 NewNode(javascript()->CallRuntime(Runtime::kObjectFreeze, 1), literal); |
1657 // Freezing the constructor should never deopt. | 1657 // Freezing the constructor should never deopt. |
1658 PrepareFrameState(literal, BailoutId::None()); | 1658 PrepareFrameState(literal, BailoutId::None()); |
1659 } | 1659 } |
1660 | 1660 |
1661 // Assign to class variable. | 1661 // Assign to class variable. |
1662 if (expr->scope() != NULL) { | 1662 if (expr->scope() != NULL) { |
1663 DCHECK_NOT_NULL(expr->class_variable_proxy()); | 1663 DCHECK_NOT_NULL(expr->class_variable_proxy()); |
1664 Variable* var = expr->class_variable_proxy()->var(); | 1664 Variable* var = expr->class_variable_proxy()->var(); |
1665 FrameStateBeforeAndAfter states(this, BailoutId::None()); | 1665 FrameStateBeforeAndAfter states(this, BailoutId::None()); |
1666 VectorSlotPair feedback = CreateVectorSlotPair( | 1666 VectorSlotPair feedback = |
1667 FLAG_vector_stores ? expr->GetNthSlot(store_slot_index++) | 1667 CreateVectorSlotPair(FLAG_vector_stores && var->IsUnallocated() |
1668 : FeedbackVectorICSlot::Invalid()); | 1668 ? expr->GetNthSlot(store_slot_index++) |
| 1669 : FeedbackVectorICSlot::Invalid()); |
1669 BuildVariableAssignment(var, literal, Token::INIT_CONST, feedback, | 1670 BuildVariableAssignment(var, literal, Token::INIT_CONST, feedback, |
1670 BailoutId::None(), states); | 1671 BailoutId::None(), states); |
1671 } | 1672 } |
1672 ast_context()->ProduceValue(literal); | 1673 ast_context()->ProduceValue(literal); |
1673 } | 1674 } |
1674 | 1675 |
1675 | 1676 |
1676 void AstGraphBuilder::VisitNativeFunctionLiteral(NativeFunctionLiteral* expr) { | 1677 void AstGraphBuilder::VisitNativeFunctionLiteral(NativeFunctionLiteral* expr) { |
1677 UNREACHABLE(); | 1678 UNREACHABLE(); |
1678 } | 1679 } |
(...skipping 2633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4312 // Phi does not exist yet, introduce one. | 4313 // Phi does not exist yet, introduce one. |
4313 value = NewPhi(inputs, value, control); | 4314 value = NewPhi(inputs, value, control); |
4314 value->ReplaceInput(inputs - 1, other); | 4315 value->ReplaceInput(inputs - 1, other); |
4315 } | 4316 } |
4316 return value; | 4317 return value; |
4317 } | 4318 } |
4318 | 4319 |
4319 } // namespace compiler | 4320 } // namespace compiler |
4320 } // namespace internal | 4321 } // namespace internal |
4321 } // namespace v8 | 4322 } // namespace v8 |
OLD | NEW |