| 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 1625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1636 NewNode(op, receiver, key, value, attr); | 1636 NewNode(op, receiver, key, value, attr); |
| 1637 break; | 1637 break; |
| 1638 } | 1638 } |
| 1639 } | 1639 } |
| 1640 } | 1640 } |
| 1641 | 1641 |
| 1642 // Set both the prototype and constructor to have fast properties, and also | 1642 // Set both the prototype and constructor to have fast properties, and also |
| 1643 // freeze them in strong mode. | 1643 // freeze them in strong mode. |
| 1644 environment()->Pop(); // proto | 1644 environment()->Pop(); // proto |
| 1645 environment()->Pop(); // literal | 1645 environment()->Pop(); // literal |
| 1646 const Operator* op = javascript()->CallRuntime( | 1646 const Operator* op = |
| 1647 is_strong(language_mode()) ? Runtime::kFinalizeClassDefinitionStrong | 1647 javascript()->CallRuntime(Runtime::kFinalizeClassDefinition, 2); |
| 1648 : Runtime::kFinalizeClassDefinition, | |
| 1649 2); | |
| 1650 literal = NewNode(op, literal, proto); | 1648 literal = NewNode(op, literal, proto); |
| 1651 | 1649 |
| 1652 // Assign to class variable. | 1650 // Assign to class variable. |
| 1653 if (expr->scope() != NULL) { | 1651 if (expr->scope() != NULL) { |
| 1654 DCHECK_NOT_NULL(expr->class_variable_proxy()); | 1652 DCHECK_NOT_NULL(expr->class_variable_proxy()); |
| 1655 Variable* var = expr->class_variable_proxy()->var(); | 1653 Variable* var = expr->class_variable_proxy()->var(); |
| 1656 FrameStateBeforeAndAfter states(this, BailoutId::None()); | 1654 FrameStateBeforeAndAfter states(this, BailoutId::None()); |
| 1657 VectorSlotPair feedback = | 1655 VectorSlotPair feedback = |
| 1658 CreateVectorSlotPair(FLAG_vector_stores && var->IsUnallocated() | 1656 CreateVectorSlotPair(FLAG_vector_stores && var->IsUnallocated() |
| 1659 ? expr->GetNthSlot(store_slot_index++) | 1657 ? expr->GetNthSlot(store_slot_index++) |
| (...skipping 2645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4305 // Phi does not exist yet, introduce one. | 4303 // Phi does not exist yet, introduce one. |
| 4306 value = NewPhi(inputs, value, control); | 4304 value = NewPhi(inputs, value, control); |
| 4307 value->ReplaceInput(inputs - 1, other); | 4305 value->ReplaceInput(inputs - 1, other); |
| 4308 } | 4306 } |
| 4309 return value; | 4307 return value; |
| 4310 } | 4308 } |
| 4311 | 4309 |
| 4312 } // namespace compiler | 4310 } // namespace compiler |
| 4313 } // namespace internal | 4311 } // namespace internal |
| 4314 } // namespace v8 | 4312 } // namespace v8 |
| OLD | NEW |