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 908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
919 // a later occurrence of the same key. For the marked expressions, no store | 919 // a later occurrence of the same key. For the marked expressions, no store |
920 // code is emitted. | 920 // code is emitted. |
921 expr->CalculateEmitStore(zone()); | 921 expr->CalculateEmitStore(zone()); |
922 | 922 |
923 // Create nodes to store computed values into the literal. | 923 // Create nodes to store computed values into the literal. |
924 AccessorTable accessor_table(zone()); | 924 AccessorTable accessor_table(zone()); |
925 for (int i = 0; i < expr->properties()->length(); i++) { | 925 for (int i = 0; i < expr->properties()->length(); i++) { |
926 ObjectLiteral::Property* property = expr->properties()->at(i); | 926 ObjectLiteral::Property* property = expr->properties()->at(i); |
927 if (property->IsCompileTimeValue()) continue; | 927 if (property->IsCompileTimeValue()) continue; |
928 | 928 |
929 Literal* key = property->key(); | 929 Literal* key = property->key()->AsLiteral(); |
930 switch (property->kind()) { | 930 switch (property->kind()) { |
931 case ObjectLiteral::Property::CONSTANT: | 931 case ObjectLiteral::Property::CONSTANT: |
932 UNREACHABLE(); | 932 UNREACHABLE(); |
933 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 933 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
934 DCHECK(!CompileTimeValue::IsCompileTimeValue(property->value())); | 934 DCHECK(!CompileTimeValue::IsCompileTimeValue(property->value())); |
935 // Fall through. | 935 // Fall through. |
936 case ObjectLiteral::Property::COMPUTED: { | 936 case ObjectLiteral::Property::COMPUTED: { |
937 // It is safe to use [[Put]] here because the boilerplate already | 937 // It is safe to use [[Put]] here because the boilerplate already |
938 // contains computed properties with an uninitialized value. | 938 // contains computed properties with an uninitialized value. |
939 if (key->value()->IsInternalizedString()) { | 939 if (key->value()->IsInternalizedString()) { |
(...skipping 1305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2245 | 2245 |
2246 BitVector* AstGraphBuilder::GetVariablesAssignedInLoop( | 2246 BitVector* AstGraphBuilder::GetVariablesAssignedInLoop( |
2247 IterationStatement* stmt) { | 2247 IterationStatement* stmt) { |
2248 if (loop_assignment_analysis_ == NULL) return NULL; | 2248 if (loop_assignment_analysis_ == NULL) return NULL; |
2249 return loop_assignment_analysis_->GetVariablesAssignedInLoop(stmt); | 2249 return loop_assignment_analysis_->GetVariablesAssignedInLoop(stmt); |
2250 } | 2250 } |
2251 | 2251 |
2252 } // namespace compiler | 2252 } // namespace compiler |
2253 } // namespace internal | 2253 } // namespace internal |
2254 } // namespace v8 | 2254 } // namespace v8 |
OLD | NEW |