OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #ifndef VM_OBJECT_H_ | 5 #ifndef VM_OBJECT_H_ |
6 #define VM_OBJECT_H_ | 6 #define VM_OBJECT_H_ |
7 | 7 |
8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
10 #include "platform/utils.h" | 10 #include "platform/utils.h" |
(...skipping 4111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4122 return CheckedEntryPoint(raw()); | 4122 return CheckedEntryPoint(raw()); |
4123 } | 4123 } |
4124 static uword PayloadStart(RawInstructions* instr) { | 4124 static uword PayloadStart(RawInstructions* instr) { |
4125 return reinterpret_cast<uword>(instr->ptr()) + HeaderSize(); | 4125 return reinterpret_cast<uword>(instr->ptr()) + HeaderSize(); |
4126 } | 4126 } |
4127 | 4127 |
4128 #if defined(TARGET_ARCH_IA32) | 4128 #if defined(TARGET_ARCH_IA32) |
4129 static const intptr_t kCheckedEntryOffset = 0; | 4129 static const intptr_t kCheckedEntryOffset = 0; |
4130 static const intptr_t kUncheckedEntryOffset = 0; | 4130 static const intptr_t kUncheckedEntryOffset = 0; |
4131 #elif defined(TARGET_ARCH_X64) | 4131 #elif defined(TARGET_ARCH_X64) |
4132 static const intptr_t kCheckedEntryOffset = 23; | 4132 static const intptr_t kCheckedEntryOffset = 16; |
4133 static const intptr_t kUncheckedEntryOffset = 44; | 4133 static const intptr_t kUncheckedEntryOffset = 38; |
4134 #elif defined(TARGET_ARCH_ARM) | 4134 #elif defined(TARGET_ARCH_ARM) |
| 4135 static const intptr_t kCheckedEntryOffset = 8; |
| 4136 static const intptr_t kUncheckedEntryOffset = 32; |
| 4137 #elif defined(TARGET_ARCH_ARM64) |
| 4138 static const intptr_t kCheckedEntryOffset = 16; |
| 4139 static const intptr_t kUncheckedEntryOffset = 40; |
| 4140 #elif defined(TARGET_ARCH_MIPS) |
4135 static const intptr_t kCheckedEntryOffset = 12; | 4141 static const intptr_t kCheckedEntryOffset = 12; |
4136 static const intptr_t kUncheckedEntryOffset = 36; | 4142 static const intptr_t kUncheckedEntryOffset = 52; |
4137 #elif defined(TARGET_ARCH_ARM64) | |
4138 static const intptr_t kCheckedEntryOffset = 24; | |
4139 static const intptr_t kUncheckedEntryOffset = 48; | |
4140 #elif defined(TARGET_ARCH_MIPS) | |
4141 static const intptr_t kCheckedEntryOffset = 16; | |
4142 static const intptr_t kUncheckedEntryOffset = 56; | |
4143 #elif defined(TARGET_ARCH_DBC) | 4143 #elif defined(TARGET_ARCH_DBC) |
4144 static const intptr_t kCheckedEntryOffset = 0; | 4144 static const intptr_t kCheckedEntryOffset = 0; |
4145 static const intptr_t kUncheckedEntryOffset = 0; | 4145 static const intptr_t kUncheckedEntryOffset = 0; |
4146 #else | 4146 #else |
4147 #error Missing entry offsets for current architecture | 4147 #error Missing entry offsets for current architecture |
4148 #endif | 4148 #endif |
4149 | 4149 |
4150 static uword UncheckedEntryPoint(RawInstructions* instr) { | 4150 static uword UncheckedEntryPoint(RawInstructions* instr) { |
4151 return PayloadStart(instr) + kUncheckedEntryOffset; | 4151 return PayloadStart(instr) + kUncheckedEntryOffset; |
4152 } | 4152 } |
(...skipping 4825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8978 | 8978 |
8979 inline void TypeArguments::SetHash(intptr_t value) const { | 8979 inline void TypeArguments::SetHash(intptr_t value) const { |
8980 // This is only safe because we create a new Smi, which does not cause | 8980 // This is only safe because we create a new Smi, which does not cause |
8981 // heap allocation. | 8981 // heap allocation. |
8982 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); | 8982 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); |
8983 } | 8983 } |
8984 | 8984 |
8985 } // namespace dart | 8985 } // namespace dart |
8986 | 8986 |
8987 #endif // VM_OBJECT_H_ | 8987 #endif // VM_OBJECT_H_ |
OLD | NEW |