| 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 Register data = x4; | 171 Register data = x4; |
| 172 Register holder = x2; | 172 Register holder = x2; |
| 173 Register api_function_address = x1; | 173 Register api_function_address = x1; |
| 174 | 174 |
| 175 // Put callee in place. | 175 // Put callee in place. |
| 176 __ LoadAccessor(callee, accessor_holder, accessor_index, | 176 __ LoadAccessor(callee, accessor_holder, accessor_index, |
| 177 is_store ? ACCESSOR_SETTER : ACCESSOR_GETTER); | 177 is_store ? ACCESSOR_SETTER : ACCESSOR_GETTER); |
| 178 | 178 |
| 179 // Put holder in place. | 179 // Put holder in place. |
| 180 CallOptimization::HolderLookup holder_lookup; | 180 CallOptimization::HolderLookup holder_lookup; |
| 181 Handle<JSObject> api_holder = | 181 int holder_depth = 0; |
| 182 optimization.LookupHolderOfExpectedType(receiver_map, &holder_lookup); | 182 optimization.LookupHolderOfExpectedType(receiver_map, &holder_lookup, |
| 183 &holder_depth); |
| 183 switch (holder_lookup) { | 184 switch (holder_lookup) { |
| 184 case CallOptimization::kHolderIsReceiver: | 185 case CallOptimization::kHolderIsReceiver: |
| 185 __ Mov(holder, receiver); | 186 __ Mov(holder, receiver); |
| 186 break; | 187 break; |
| 187 case CallOptimization::kHolderFound: | 188 case CallOptimization::kHolderFound: |
| 188 __ LoadObject(holder, api_holder); | 189 __ Ldr(holder, FieldMemOperand(receiver, HeapObject::kMapOffset)); |
| 190 __ Ldr(holder, FieldMemOperand(holder, Map::kPrototypeOffset)); |
| 191 for (int i = 1; i < holder_depth; i++) { |
| 192 __ Ldr(holder, FieldMemOperand(holder, HeapObject::kMapOffset)); |
| 193 __ Ldr(holder, FieldMemOperand(holder, Map::kPrototypeOffset)); |
| 194 } |
| 189 break; | 195 break; |
| 190 case CallOptimization::kHolderNotFound: | 196 case CallOptimization::kHolderNotFound: |
| 191 UNREACHABLE(); | 197 UNREACHABLE(); |
| 192 break; | 198 break; |
| 193 } | 199 } |
| 194 | 200 |
| 195 Isolate* isolate = masm->isolate(); | 201 Isolate* isolate = masm->isolate(); |
| 196 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info(); | 202 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info(); |
| 197 bool call_data_undefined = false; | 203 bool call_data_undefined = false; |
| 198 // Put call data in place. | 204 // Put call data in place. |
| (...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 756 // Return the generated code. | 762 // Return the generated code. |
| 757 return GetCode(kind(), Code::FAST, name); | 763 return GetCode(kind(), Code::FAST, name); |
| 758 } | 764 } |
| 759 | 765 |
| 760 | 766 |
| 761 #undef __ | 767 #undef __ |
| 762 } | 768 } |
| 763 } // namespace v8::internal | 769 } // namespace v8::internal |
| 764 | 770 |
| 765 #endif // V8_TARGET_ARCH_IA32 | 771 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |