OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // | 2 // |
3 // Redistribution and use in source and binary forms, with or without | 3 // Redistribution and use in source and binary forms, with or without |
4 // modification, are permitted provided that the following conditions are | 4 // modification, are permitted provided that the following conditions are |
5 // met: | 5 // met: |
6 // | 6 // |
7 // * Redistributions of source code must retain the above copyright | 7 // * Redistributions of source code must retain the above copyright |
8 // notice, this list of conditions and the following disclaimer. | 8 // notice, this list of conditions and the following disclaimer. |
9 // * Redistributions in binary form must reproduce the above | 9 // * Redistributions in binary form must reproduce the above |
10 // copyright notice, this list of conditions and the following | 10 // copyright notice, this list of conditions and the following |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 return match; | 273 return match; |
274 } | 274 } |
275 | 275 |
276 | 276 |
277 void Immediate::InitializeHandle(Handle<Object> handle) { | 277 void Immediate::InitializeHandle(Handle<Object> handle) { |
278 AllowDeferredHandleDereference using_raw_address; | 278 AllowDeferredHandleDereference using_raw_address; |
279 | 279 |
280 // Verify all Objects referred by code are NOT in new space. | 280 // Verify all Objects referred by code are NOT in new space. |
281 Object* obj = *handle; | 281 Object* obj = *handle; |
282 if (obj->IsHeapObject()) { | 282 if (obj->IsHeapObject()) { |
283 DCHECK(!HeapObject::cast(obj)->GetHeap()->InNewSpace(obj)); | |
284 value_ = reinterpret_cast<intptr_t>(handle.location()); | 283 value_ = reinterpret_cast<intptr_t>(handle.location()); |
285 rmode_ = RelocInfo::EMBEDDED_OBJECT; | 284 rmode_ = RelocInfo::EMBEDDED_OBJECT; |
286 } else { | 285 } else { |
287 STATIC_ASSERT(sizeof(intptr_t) == sizeof(int64_t)); | 286 STATIC_ASSERT(sizeof(intptr_t) == sizeof(int64_t)); |
288 value_ = reinterpret_cast<intptr_t>(obj); | 287 value_ = reinterpret_cast<intptr_t>(obj); |
289 rmode_ = RelocInfo::NONE64; | 288 rmode_ = RelocInfo::NONE64; |
290 } | 289 } |
291 } | 290 } |
292 | 291 |
293 | 292 |
(...skipping 2919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3213 movk(scratch, (target_offset >> 32) & 0xFFFF, 32); | 3212 movk(scratch, (target_offset >> 32) & 0xFFFF, 32); |
3214 DCHECK((target_offset >> 48) == 0); | 3213 DCHECK((target_offset >> 48) == 0); |
3215 add(rd, rd, scratch); | 3214 add(rd, rd, scratch); |
3216 } | 3215 } |
3217 | 3216 |
3218 | 3217 |
3219 } // namespace internal | 3218 } // namespace internal |
3220 } // namespace v8 | 3219 } // namespace v8 |
3221 | 3220 |
3222 #endif // V8_TARGET_ARCH_ARM64 | 3221 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |