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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
8 | 8 |
9 #include "src/ic/call-optimization.h" | 9 #include "src/ic/call-optimization.h" |
10 #include "src/ic/handler-compiler.h" | 10 #include "src/ic/handler-compiler.h" |
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
705 Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal( | 705 Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal( |
706 Handle<PropertyCell> cell, Handle<Name> name, bool is_configurable) { | 706 Handle<PropertyCell> cell, Handle<Name> name, bool is_configurable) { |
707 Label miss; | 707 Label miss; |
708 if (IC::ICUseVector(kind())) { | 708 if (IC::ICUseVector(kind())) { |
709 PushVectorAndSlot(); | 709 PushVectorAndSlot(); |
710 } | 710 } |
711 FrontendHeader(receiver(), name, &miss); | 711 FrontendHeader(receiver(), name, &miss); |
712 | 712 |
713 // Get the value from the cell. | 713 // Get the value from the cell. |
714 Register result = StoreDescriptor::ValueRegister(); | 714 Register result = StoreDescriptor::ValueRegister(); |
715 __ Move(result, cell); | 715 Handle<WeakCell> weak_cell = factory()->NewWeakCell(cell); |
| 716 __ LoadWeakValue(result, weak_cell, &miss); |
716 __ movp(result, FieldOperand(result, PropertyCell::kValueOffset)); | 717 __ movp(result, FieldOperand(result, PropertyCell::kValueOffset)); |
717 | 718 |
718 // Check for deleted property if property can actually be deleted. | 719 // Check for deleted property if property can actually be deleted. |
719 if (is_configurable) { | 720 if (is_configurable) { |
720 __ CompareRoot(result, Heap::kTheHoleValueRootIndex); | 721 __ CompareRoot(result, Heap::kTheHoleValueRootIndex); |
721 __ j(equal, &miss); | 722 __ j(equal, &miss); |
722 } else if (FLAG_debug_code) { | 723 } else if (FLAG_debug_code) { |
723 __ CompareRoot(result, Heap::kTheHoleValueRootIndex); | 724 __ CompareRoot(result, Heap::kTheHoleValueRootIndex); |
724 __ Check(not_equal, kDontDeleteCellsCannotContainTheHole); | 725 __ Check(not_equal, kDontDeleteCellsCannotContainTheHole); |
725 } | 726 } |
(...skipping 10 matching lines...) Expand all Loading... |
736 // Return the generated code. | 737 // Return the generated code. |
737 return GetCode(kind(), Code::NORMAL, name); | 738 return GetCode(kind(), Code::NORMAL, name); |
738 } | 739 } |
739 | 740 |
740 | 741 |
741 #undef __ | 742 #undef __ |
742 } | 743 } |
743 } // namespace v8::internal | 744 } // namespace v8::internal |
744 | 745 |
745 #endif // V8_TARGET_ARCH_X64 | 746 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |