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 892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
903 // a later occurrence of the same key. For the marked expressions, no store | 903 // a later occurrence of the same key. For the marked expressions, no store |
904 // code is emitted. | 904 // code is emitted. |
905 expr->CalculateEmitStore(zone()); | 905 expr->CalculateEmitStore(zone()); |
906 | 906 |
907 // Create nodes to store computed values into the literal. | 907 // Create nodes to store computed values into the literal. |
908 AccessorTable accessor_table(zone()); | 908 AccessorTable accessor_table(zone()); |
909 for (int i = 0; i < expr->properties()->length(); i++) { | 909 for (int i = 0; i < expr->properties()->length(); i++) { |
910 ObjectLiteral::Property* property = expr->properties()->at(i); | 910 ObjectLiteral::Property* property = expr->properties()->at(i); |
911 if (property->IsCompileTimeValue()) continue; | 911 if (property->IsCompileTimeValue()) continue; |
912 | 912 |
913 Literal* key = property->key()->AsLiteral(); | 913 Literal* key = property->key(); |
914 switch (property->kind()) { | 914 switch (property->kind()) { |
915 case ObjectLiteral::Property::CONSTANT: | 915 case ObjectLiteral::Property::CONSTANT: |
916 UNREACHABLE(); | 916 UNREACHABLE(); |
917 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 917 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
918 DCHECK(!CompileTimeValue::IsCompileTimeValue(property->value())); | 918 DCHECK(!CompileTimeValue::IsCompileTimeValue(property->value())); |
919 // Fall through. | 919 // Fall through. |
920 case ObjectLiteral::Property::COMPUTED: { | 920 case ObjectLiteral::Property::COMPUTED: { |
921 // It is safe to use [[Put]] here because the boilerplate already | 921 // It is safe to use [[Put]] here because the boilerplate already |
922 // contains computed properties with an uninitialized value. | 922 // contains computed properties with an uninitialized value. |
923 if (key->value()->IsInternalizedString()) { | 923 if (key->value()->IsInternalizedString()) { |
(...skipping 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2222 | 2222 |
2223 BitVector* AstGraphBuilder::GetVariablesAssignedInLoop( | 2223 BitVector* AstGraphBuilder::GetVariablesAssignedInLoop( |
2224 IterationStatement* stmt) { | 2224 IterationStatement* stmt) { |
2225 if (loop_assignment_analysis_ == NULL) return NULL; | 2225 if (loop_assignment_analysis_ == NULL) return NULL; |
2226 return loop_assignment_analysis_->GetVariablesAssignedInLoop(stmt); | 2226 return loop_assignment_analysis_->GetVariablesAssignedInLoop(stmt); |
2227 } | 2227 } |
2228 | 2228 |
2229 } // namespace compiler | 2229 } // namespace compiler |
2230 } // namespace internal | 2230 } // namespace internal |
2231 } // namespace v8 | 2231 } // namespace v8 |
OLD | NEW |