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->value()->IsInternalizedString()) { | 1763 if (key->IsPropertyName()) { |
1764 if (property->emit_store()) { | 1764 if (property->emit_store()) { |
1765 VisitForValue(property->value()); | 1765 VisitForValue(property->value()); |
1766 Node* value = environment()->Pop(); | 1766 Node* value = environment()->Pop(); |
1767 Node* literal = environment()->Top(); | 1767 Node* literal = environment()->Top(); |
1768 Handle<Name> name = key->AsPropertyName(); | 1768 Handle<Name> name = key->AsPropertyName(); |
1769 VectorSlotPair feedback = | 1769 VectorSlotPair feedback = |
1770 CreateVectorSlotPair(property->GetSlot(0)); | 1770 CreateVectorSlotPair(property->GetSlot(0)); |
1771 Node* store = BuildNamedStore(literal, name, value, feedback); | 1771 Node* store = BuildNamedStore(literal, name, value, feedback); |
1772 PrepareFrameState(store, key->id(), | 1772 PrepareFrameState(store, key->id(), |
1773 OutputFrameStateCombine::Ignore()); | 1773 OutputFrameStateCombine::Ignore()); |
(...skipping 2546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4320 // Phi does not exist yet, introduce one. | 4320 // Phi does not exist yet, introduce one. |
4321 value = NewPhi(inputs, value, control); | 4321 value = NewPhi(inputs, value, control); |
4322 value->ReplaceInput(inputs - 1, other); | 4322 value->ReplaceInput(inputs - 1, other); |
4323 } | 4323 } |
4324 return value; | 4324 return value; |
4325 } | 4325 } |
4326 | 4326 |
4327 } // namespace compiler | 4327 } // namespace compiler |
4328 } // namespace internal | 4328 } // namespace internal |
4329 } // namespace v8 | 4329 } // namespace v8 |
OLD | NEW |