| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/hydrogen.h" | 5 #include "src/hydrogen.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #include "src/v8.h" | 9 #include "src/v8.h" |
| 10 | 10 |
| (...skipping 5603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5614 if (property->IsCompileTimeValue()) continue; | 5614 if (property->IsCompileTimeValue()) continue; |
| 5615 | 5615 |
| 5616 Literal* key = property->key(); | 5616 Literal* key = property->key(); |
| 5617 Expression* value = property->value(); | 5617 Expression* value = property->value(); |
| 5618 | 5618 |
| 5619 switch (property->kind()) { | 5619 switch (property->kind()) { |
| 5620 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 5620 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
| 5621 DCHECK(!CompileTimeValue::IsCompileTimeValue(value)); | 5621 DCHECK(!CompileTimeValue::IsCompileTimeValue(value)); |
| 5622 // Fall through. | 5622 // Fall through. |
| 5623 case ObjectLiteral::Property::COMPUTED: | 5623 case ObjectLiteral::Property::COMPUTED: |
| 5624 // It is safe to use [[Put]] here because the boilerplate already |
| 5625 // contains computed properties with an uninitialized value. |
| 5624 if (key->value()->IsInternalizedString()) { | 5626 if (key->value()->IsInternalizedString()) { |
| 5625 if (property->emit_store()) { | 5627 if (property->emit_store()) { |
| 5626 CHECK_ALIVE(VisitForValue(value)); | 5628 CHECK_ALIVE(VisitForValue(value)); |
| 5627 HValue* value = Pop(); | 5629 HValue* value = Pop(); |
| 5628 Handle<Map> map = property->GetReceiverType(); | 5630 Handle<Map> map = property->GetReceiverType(); |
| 5629 Handle<String> name = property->key()->AsPropertyName(); | 5631 Handle<String> name = property->key()->AsPropertyName(); |
| 5630 HInstruction* store; | 5632 HInstruction* store; |
| 5631 if (map.is_null()) { | 5633 if (map.is_null()) { |
| 5632 // If we don't know the monomorphic type, do a generic store. | 5634 // If we don't know the monomorphic type, do a generic store. |
| 5633 CHECK_ALIVE(store = BuildNamedGeneric( | 5635 CHECK_ALIVE(store = BuildNamedGeneric( |
| (...skipping 7035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12669 if (ShouldProduceTraceOutput()) { | 12671 if (ShouldProduceTraceOutput()) { |
| 12670 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 12672 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 12671 } | 12673 } |
| 12672 | 12674 |
| 12673 #ifdef DEBUG | 12675 #ifdef DEBUG |
| 12674 graph_->Verify(false); // No full verify. | 12676 graph_->Verify(false); // No full verify. |
| 12675 #endif | 12677 #endif |
| 12676 } | 12678 } |
| 12677 | 12679 |
| 12678 } } // namespace v8::internal | 12680 } } // namespace v8::internal |
| OLD | NEW |