Chromium Code Reviews| 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 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 909 // a later occurrence of the same key. For the marked expressions, no store | 909 // a later occurrence of the same key. For the marked expressions, no store |
| 910 // code is emitted. | 910 // code is emitted. |
| 911 expr->CalculateEmitStore(zone()); | 911 expr->CalculateEmitStore(zone()); |
| 912 | 912 |
| 913 // Create nodes to store computed values into the literal. | 913 // Create nodes to store computed values into the literal. |
| 914 AccessorTable accessor_table(zone()); | 914 AccessorTable accessor_table(zone()); |
| 915 for (int i = 0; i < expr->properties()->length(); i++) { | 915 for (int i = 0; i < expr->properties()->length(); i++) { |
| 916 ObjectLiteral::Property* property = expr->properties()->at(i); | 916 ObjectLiteral::Property* property = expr->properties()->at(i); |
| 917 if (property->IsCompileTimeValue()) continue; | 917 if (property->IsCompileTimeValue()) continue; |
| 918 | 918 |
| 919 Literal* key = property->key(); | 919 Literal* key = property->key()->AsLiteral(); |
|
arv (Not doing code reviews)
2014/12/10 23:38:13
This is not going to work. I disabled the tests fo
Dmitry Lomov (no reviews)
2014/12/11 12:34:35
Probably should be a DontOptimize reason for Turbo
arv (Not doing code reviews)
2014/12/11 23:10:33
Do you mean mark all ObjectLiteral as not optimiza
| |
| 920 switch (property->kind()) { | 920 switch (property->kind()) { |
| 921 case ObjectLiteral::Property::CONSTANT: | 921 case ObjectLiteral::Property::CONSTANT: |
| 922 UNREACHABLE(); | 922 UNREACHABLE(); |
| 923 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 923 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
| 924 DCHECK(!CompileTimeValue::IsCompileTimeValue(property->value())); | 924 DCHECK(!CompileTimeValue::IsCompileTimeValue(property->value())); |
| 925 // Fall through. | 925 // Fall through. |
| 926 case ObjectLiteral::Property::COMPUTED: { | 926 case ObjectLiteral::Property::COMPUTED: { |
| 927 // It is safe to use [[Put]] here because the boilerplate already | 927 // It is safe to use [[Put]] here because the boilerplate already |
| 928 // contains computed properties with an uninitialized value. | 928 // contains computed properties with an uninitialized value. |
| 929 if (key->value()->IsInternalizedString()) { | 929 if (key->value()->IsInternalizedString()) { |
| (...skipping 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2228 | 2228 |
| 2229 BitVector* AstGraphBuilder::GetVariablesAssignedInLoop( | 2229 BitVector* AstGraphBuilder::GetVariablesAssignedInLoop( |
| 2230 IterationStatement* stmt) { | 2230 IterationStatement* stmt) { |
| 2231 if (loop_assignment_analysis_ == NULL) return NULL; | 2231 if (loop_assignment_analysis_ == NULL) return NULL; |
| 2232 return loop_assignment_analysis_->GetVariablesAssignedInLoop(stmt); | 2232 return loop_assignment_analysis_->GetVariablesAssignedInLoop(stmt); |
| 2233 } | 2233 } |
| 2234 | 2234 |
| 2235 } // namespace compiler | 2235 } // namespace compiler |
| 2236 } // namespace internal | 2236 } // namespace internal |
| 2237 } // namespace v8 | 2237 } // namespace v8 |
| OLD | NEW |