| 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 #ifndef V8_CALL_INTERFACE_DESCRIPTOR_H_ | 5 #ifndef V8_CALL_INTERFACE_DESCRIPTOR_H_ |
| 6 #define V8_CALL_INTERFACE_DESCRIPTOR_H_ | 6 #define V8_CALL_INTERFACE_DESCRIPTOR_H_ |
| 7 | 7 |
| 8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
| 9 #include "src/macro-assembler.h" | 9 #include "src/macro-assembler.h" |
| 10 | 10 |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 Isolate* isolate, int register_param_count) { | 209 Isolate* isolate, int register_param_count) { |
| 210 return BuildDefaultFunctionType(isolate, register_param_count); | 210 return BuildDefaultFunctionType(isolate, register_param_count); |
| 211 } | 211 } |
| 212 | 212 |
| 213 virtual void InitializePlatformSpecific(CallInterfaceDescriptorData* data) { | 213 virtual void InitializePlatformSpecific(CallInterfaceDescriptorData* data) { |
| 214 UNREACHABLE(); | 214 UNREACHABLE(); |
| 215 } | 215 } |
| 216 | 216 |
| 217 void Initialize(Isolate* isolate, CallDescriptors::Key key) { | 217 void Initialize(Isolate* isolate, CallDescriptors::Key key) { |
| 218 if (!data()->IsInitialized()) { | 218 if (!data()->IsInitialized()) { |
| 219 // We should only initialize descriptors on the isolate's main thread. |
| 220 DCHECK(ThreadId::Current().Equals(isolate->thread_id())); |
| 219 CallInterfaceDescriptorData* d = isolate->call_descriptor_data(key); | 221 CallInterfaceDescriptorData* d = isolate->call_descriptor_data(key); |
| 220 DCHECK(d == data()); // d should be a modifiable pointer to data(). | 222 DCHECK(d == data()); // d should be a modifiable pointer to data(). |
| 221 InitializePlatformSpecific(d); | 223 InitializePlatformSpecific(d); |
| 222 FunctionType* function_type = BuildCallInterfaceDescriptorFunctionType( | 224 FunctionType* function_type = BuildCallInterfaceDescriptorFunctionType( |
| 223 isolate, d->register_param_count()); | 225 isolate, d->register_param_count()); |
| 224 d->InitializePlatformIndependent(function_type); | 226 d->InitializePlatformIndependent(function_type); |
| 225 } | 227 } |
| 226 } | 228 } |
| 227 | 229 |
| 228 // Initializes |data| using the platform dependent default set of registers. | 230 // Initializes |data| using the platform dependent default set of registers. |
| (...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 932 } // namespace v8 | 934 } // namespace v8 |
| 933 | 935 |
| 934 | 936 |
| 935 #if V8_TARGET_ARCH_ARM64 | 937 #if V8_TARGET_ARCH_ARM64 |
| 936 #include "src/arm64/interface-descriptors-arm64.h" | 938 #include "src/arm64/interface-descriptors-arm64.h" |
| 937 #elif V8_TARGET_ARCH_ARM | 939 #elif V8_TARGET_ARCH_ARM |
| 938 #include "src/arm/interface-descriptors-arm.h" | 940 #include "src/arm/interface-descriptors-arm.h" |
| 939 #endif | 941 #endif |
| 940 | 942 |
| 941 #endif // V8_CALL_INTERFACE_DESCRIPTOR_H_ | 943 #endif // V8_CALL_INTERFACE_DESCRIPTOR_H_ |
| OLD | NEW |