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 1626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1637 case ObjectLiteral::Property::SETTER: { | 1637 case ObjectLiteral::Property::SETTER: { |
1638 Node* attr = jsgraph()->Constant(DONT_ENUM); | 1638 Node* attr = jsgraph()->Constant(DONT_ENUM); |
1639 const Operator* op = javascript()->CallRuntime( | 1639 const Operator* op = javascript()->CallRuntime( |
1640 Runtime::kDefineSetterPropertyUnchecked, 4); | 1640 Runtime::kDefineSetterPropertyUnchecked, 4); |
1641 NewNode(op, receiver, key, value, attr); | 1641 NewNode(op, receiver, key, value, attr); |
1642 break; | 1642 break; |
1643 } | 1643 } |
1644 } | 1644 } |
1645 } | 1645 } |
1646 | 1646 |
1647 // Set both the prototype and constructor to have fast properties, and also | 1647 // Set both the prototype and constructor to have fast properties. |
1648 // freeze them in strong mode. | |
1649 prototype = environment()->Pop(); | 1648 prototype = environment()->Pop(); |
1650 literal = environment()->Pop(); | 1649 literal = environment()->Pop(); |
1651 const Operator* op = | 1650 const Operator* op = |
1652 javascript()->CallRuntime(Runtime::kFinalizeClassDefinition); | 1651 javascript()->CallRuntime(Runtime::kFinalizeClassDefinition); |
1653 literal = NewNode(op, literal, prototype); | 1652 literal = NewNode(op, literal, prototype); |
1654 | 1653 |
1655 // Assign to class variable. | 1654 // Assign to class variable. |
1656 if (expr->class_variable_proxy() != nullptr) { | 1655 if (expr->class_variable_proxy() != nullptr) { |
1657 Variable* var = expr->class_variable_proxy()->var(); | 1656 Variable* var = expr->class_variable_proxy()->var(); |
1658 FrameStateBeforeAndAfter states(this, BailoutId::None()); | 1657 FrameStateBeforeAndAfter states(this, BailoutId::None()); |
(...skipping 2724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4383 // Phi does not exist yet, introduce one. | 4382 // Phi does not exist yet, introduce one. |
4384 value = NewPhi(inputs, value, control); | 4383 value = NewPhi(inputs, value, control); |
4385 value->ReplaceInput(inputs - 1, other); | 4384 value->ReplaceInput(inputs - 1, other); |
4386 } | 4385 } |
4387 return value; | 4386 return value; |
4388 } | 4387 } |
4389 | 4388 |
4390 } // namespace compiler | 4389 } // namespace compiler |
4391 } // namespace internal | 4390 } // namespace internal |
4392 } // namespace v8 | 4391 } // namespace v8 |
OLD | NEW |