| 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_ARM | 7 #if V8_TARGET_ARCH_ARM |
| 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 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 697 Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal( | 697 Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal( |
| 698 Handle<PropertyCell> cell, Handle<Name> name, bool is_configurable) { | 698 Handle<PropertyCell> cell, Handle<Name> name, bool is_configurable) { |
| 699 Label miss; | 699 Label miss; |
| 700 if (IC::ICUseVector(kind())) { | 700 if (IC::ICUseVector(kind())) { |
| 701 PushVectorAndSlot(); | 701 PushVectorAndSlot(); |
| 702 } | 702 } |
| 703 FrontendHeader(receiver(), name, &miss); | 703 FrontendHeader(receiver(), name, &miss); |
| 704 | 704 |
| 705 // Get the value from the cell. | 705 // Get the value from the cell. |
| 706 Register result = StoreDescriptor::ValueRegister(); | 706 Register result = StoreDescriptor::ValueRegister(); |
| 707 __ mov(result, Operand(cell)); | 707 Handle<WeakCell> weak_cell = factory()->NewWeakCell(cell); |
| 708 __ LoadWeakValue(result, weak_cell, &miss); |
| 708 __ ldr(result, FieldMemOperand(result, Cell::kValueOffset)); | 709 __ ldr(result, FieldMemOperand(result, Cell::kValueOffset)); |
| 709 | 710 |
| 710 // Check for deleted property if property can actually be deleted. | 711 // Check for deleted property if property can actually be deleted. |
| 711 if (is_configurable) { | 712 if (is_configurable) { |
| 712 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); | 713 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); |
| 713 __ cmp(result, ip); | 714 __ cmp(result, ip); |
| 714 __ b(eq, &miss); | 715 __ b(eq, &miss); |
| 715 } | 716 } |
| 716 | 717 |
| 717 Counters* counters = isolate()->counters(); | 718 Counters* counters = isolate()->counters(); |
| 718 __ IncrementCounter(counters->named_load_global_stub(), 1, r1, r3); | 719 __ IncrementCounter(counters->named_load_global_stub(), 1, r1, r3); |
| 719 if (IC::ICUseVector(kind())) { | 720 if (IC::ICUseVector(kind())) { |
| 720 DiscardVectorAndSlot(); | 721 DiscardVectorAndSlot(); |
| 721 } | 722 } |
| 722 __ Ret(); | 723 __ Ret(); |
| 723 | 724 |
| 724 FrontendFooter(name, &miss); | 725 FrontendFooter(name, &miss); |
| 725 | 726 |
| 726 // Return the generated code. | 727 // Return the generated code. |
| 727 return GetCode(kind(), Code::NORMAL, name); | 728 return GetCode(kind(), Code::NORMAL, name); |
| 728 } | 729 } |
| 729 | 730 |
| 730 | 731 |
| 731 #undef __ | 732 #undef __ |
| 732 } | 733 } |
| 733 } // namespace v8::internal | 734 } // namespace v8::internal |
| 734 | 735 |
| 735 #endif // V8_TARGET_ARCH_ARM | 736 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |