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/machine-operator.h" | 10 #include "src/compiler/machine-operator.h" |
(...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
898 | 898 |
899 VisitForValue(property->key()); | 899 VisitForValue(property->key()); |
900 environment()->Push(BuildToName(environment()->Pop())); | 900 environment()->Push(BuildToName(environment()->Pop())); |
901 VisitForValue(property->value()); | 901 VisitForValue(property->value()); |
902 Node* value = environment()->Pop(); | 902 Node* value = environment()->Pop(); |
903 Node* key = environment()->Pop(); | 903 Node* key = environment()->Pop(); |
904 Node* receiver = environment()->Pop(); | 904 Node* receiver = environment()->Pop(); |
905 switch (property->kind()) { | 905 switch (property->kind()) { |
906 case ObjectLiteral::Property::CONSTANT: | 906 case ObjectLiteral::Property::CONSTANT: |
907 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 907 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
| 908 case ObjectLiteral::Property::PROTOTYPE: |
908 UNREACHABLE(); | 909 UNREACHABLE(); |
909 case ObjectLiteral::Property::COMPUTED: | 910 case ObjectLiteral::Property::COMPUTED: { |
910 case ObjectLiteral::Property::PROTOTYPE: { | |
911 const Operator* op = | 911 const Operator* op = |
912 javascript()->CallRuntime(Runtime::kDefineClassMethod, 3); | 912 javascript()->CallRuntime(Runtime::kDefineClassMethod, 3); |
913 NewNode(op, receiver, key, value); | 913 NewNode(op, receiver, key, value); |
914 break; | 914 break; |
915 } | 915 } |
916 case ObjectLiteral::Property::GETTER: { | 916 case ObjectLiteral::Property::GETTER: { |
917 const Operator* op = javascript()->CallRuntime( | 917 const Operator* op = javascript()->CallRuntime( |
918 Runtime::kDefineGetterPropertyUnchecked, 3); | 918 Runtime::kDefineGetterPropertyUnchecked, 3); |
919 NewNode(op, receiver, key, value); | 919 NewNode(op, receiver, key, value); |
920 break; | 920 break; |
(...skipping 1446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2367 | 2367 |
2368 BitVector* AstGraphBuilder::GetVariablesAssignedInLoop( | 2368 BitVector* AstGraphBuilder::GetVariablesAssignedInLoop( |
2369 IterationStatement* stmt) { | 2369 IterationStatement* stmt) { |
2370 if (loop_assignment_analysis_ == NULL) return NULL; | 2370 if (loop_assignment_analysis_ == NULL) return NULL; |
2371 return loop_assignment_analysis_->GetVariablesAssignedInLoop(stmt); | 2371 return loop_assignment_analysis_->GetVariablesAssignedInLoop(stmt); |
2372 } | 2372 } |
2373 | 2373 |
2374 } // namespace compiler | 2374 } // namespace compiler |
2375 } // namespace internal | 2375 } // namespace internal |
2376 } // namespace v8 | 2376 } // namespace v8 |
OLD | NEW |