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_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 __ Ret(); | 102 __ Ret(); |
103 } | 103 } |
104 | 104 |
105 | 105 |
106 // Generate code to check that a global property cell is empty. Create | 106 // Generate code to check that a global property cell is empty. Create |
107 // the property cell at compilation time if no cell exists for the | 107 // the property cell at compilation time if no cell exists for the |
108 // property. | 108 // property. |
109 void PropertyHandlerCompiler::GenerateCheckPropertyCell( | 109 void PropertyHandlerCompiler::GenerateCheckPropertyCell( |
110 MacroAssembler* masm, Handle<JSGlobalObject> global, Handle<Name> name, | 110 MacroAssembler* masm, Handle<JSGlobalObject> global, Handle<Name> name, |
111 Register scratch, Label* miss) { | 111 Register scratch, Label* miss) { |
112 Handle<Cell> cell = JSGlobalObject::EnsurePropertyCell(global, name); | 112 Handle<PropertyCell> cell = JSGlobalObject::EnsurePropertyCell(global, name); |
113 DCHECK(cell->value()->IsTheHole()); | 113 DCHECK(cell->value()->IsTheHole()); |
114 Handle<WeakCell> weak_cell = masm->isolate()->factory()->NewWeakCell(cell); | 114 Handle<WeakCell> weak_cell = masm->isolate()->factory()->NewWeakCell(cell); |
115 __ LoadWeakValue(scratch, weak_cell, miss); | 115 __ LoadWeakValue(scratch, weak_cell, miss); |
116 __ Ldr(scratch, FieldMemOperand(scratch, Cell::kValueOffset)); | 116 __ Ldr(scratch, FieldMemOperand(scratch, PropertyCell::kValueOffset)); |
117 __ JumpIfNotRoot(scratch, Heap::kTheHoleValueRootIndex, miss); | 117 __ JumpIfNotRoot(scratch, Heap::kTheHoleValueRootIndex, miss); |
118 } | 118 } |
119 | 119 |
120 | 120 |
121 static void PushInterceptorArguments(MacroAssembler* masm, Register receiver, | 121 static void PushInterceptorArguments(MacroAssembler* masm, Register receiver, |
122 Register holder, Register name, | 122 Register holder, Register name, |
123 Handle<JSObject> holder_obj) { | 123 Handle<JSObject> holder_obj) { |
124 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsNameIndex == 0); | 124 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsNameIndex == 0); |
125 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsThisIndex == 1); | 125 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsThisIndex == 1); |
126 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsHolderIndex == 2); | 126 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsHolderIndex == 2); |
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
761 // Return the generated code. | 761 // Return the generated code. |
762 return GetCode(kind(), Code::FAST, name); | 762 return GetCode(kind(), Code::FAST, name); |
763 } | 763 } |
764 | 764 |
765 | 765 |
766 #undef __ | 766 #undef __ |
767 } | 767 } |
768 } // namespace v8::internal | 768 } // namespace v8::internal |
769 | 769 |
770 #endif // V8_TARGET_ARCH_IA32 | 770 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |