| 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 1742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1753 Literal* key = property->key()->AsLiteral(); | 1753 Literal* key = property->key()->AsLiteral(); |
| 1754 switch (property->kind()) { | 1754 switch (property->kind()) { |
| 1755 case ObjectLiteral::Property::CONSTANT: | 1755 case ObjectLiteral::Property::CONSTANT: |
| 1756 UNREACHABLE(); | 1756 UNREACHABLE(); |
| 1757 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 1757 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
| 1758 DCHECK(!CompileTimeValue::IsCompileTimeValue(property->value())); | 1758 DCHECK(!CompileTimeValue::IsCompileTimeValue(property->value())); |
| 1759 // Fall through. | 1759 // Fall through. |
| 1760 case ObjectLiteral::Property::COMPUTED: { | 1760 case ObjectLiteral::Property::COMPUTED: { |
| 1761 // It is safe to use [[Put]] here because the boilerplate already | 1761 // It is safe to use [[Put]] here because the boilerplate already |
| 1762 // contains computed properties with an uninitialized value. | 1762 // contains computed properties with an uninitialized value. |
| 1763 if (key->IsPropertyName()) { | 1763 if (key->IsStringLiteral()) { |
| 1764 DCHECK(key->IsPropertyName()); |
| 1764 if (property->emit_store()) { | 1765 if (property->emit_store()) { |
| 1765 VisitForValue(property->value()); | 1766 VisitForValue(property->value()); |
| 1766 Node* value = environment()->Pop(); | 1767 Node* value = environment()->Pop(); |
| 1767 Node* literal = environment()->Top(); | 1768 Node* literal = environment()->Top(); |
| 1768 Handle<Name> name = key->AsPropertyName(); | 1769 Handle<Name> name = key->AsPropertyName(); |
| 1769 VectorSlotPair feedback = | 1770 VectorSlotPair feedback = |
| 1770 CreateVectorSlotPair(property->GetSlot(0)); | 1771 CreateVectorSlotPair(property->GetSlot(0)); |
| 1771 Node* store = BuildNamedStore(literal, name, value, feedback); | 1772 Node* store = BuildNamedStore(literal, name, value, feedback); |
| 1772 PrepareFrameState(store, key->id(), | 1773 PrepareFrameState(store, key->id(), |
| 1773 OutputFrameStateCombine::Ignore()); | 1774 OutputFrameStateCombine::Ignore()); |
| (...skipping 2544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4318 // Phi does not exist yet, introduce one. | 4319 // Phi does not exist yet, introduce one. |
| 4319 value = NewPhi(inputs, value, control); | 4320 value = NewPhi(inputs, value, control); |
| 4320 value->ReplaceInput(inputs - 1, other); | 4321 value->ReplaceInput(inputs - 1, other); |
| 4321 } | 4322 } |
| 4322 return value; | 4323 return value; |
| 4323 } | 4324 } |
| 4324 | 4325 |
| 4325 } // namespace compiler | 4326 } // namespace compiler |
| 4326 } // namespace internal | 4327 } // namespace internal |
| 4327 } // namespace v8 | 4328 } // namespace v8 |
| OLD | NEW |