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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 return match; | 284 return match; |
285 } | 285 } |
286 | 286 |
287 | 287 |
288 void Immediate::InitializeHandle(Handle<Object> handle) { | 288 void Immediate::InitializeHandle(Handle<Object> handle) { |
289 AllowDeferredHandleDereference using_raw_address; | 289 AllowDeferredHandleDereference using_raw_address; |
290 | 290 |
291 // Verify all Objects referred by code are NOT in new space. | 291 // Verify all Objects referred by code are NOT in new space. |
292 Object* obj = *handle; | 292 Object* obj = *handle; |
293 if (obj->IsHeapObject()) { | 293 if (obj->IsHeapObject()) { |
294 DCHECK(!HeapObject::cast(obj)->GetHeap()->InNewSpace(obj)); | |
295 value_ = reinterpret_cast<intptr_t>(handle.location()); | 294 value_ = reinterpret_cast<intptr_t>(handle.location()); |
296 rmode_ = RelocInfo::EMBEDDED_OBJECT; | 295 rmode_ = RelocInfo::EMBEDDED_OBJECT; |
297 } else { | 296 } else { |
298 STATIC_ASSERT(sizeof(intptr_t) == sizeof(int64_t)); | 297 STATIC_ASSERT(sizeof(intptr_t) == sizeof(int64_t)); |
299 value_ = reinterpret_cast<intptr_t>(obj); | 298 value_ = reinterpret_cast<intptr_t>(obj); |
300 rmode_ = RelocInfo::NONE64; | 299 rmode_ = RelocInfo::NONE64; |
301 } | 300 } |
302 } | 301 } |
303 | 302 |
304 | 303 |
(...skipping 2934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3239 movk(scratch, (target_offset >> 32) & 0xFFFF, 32); | 3238 movk(scratch, (target_offset >> 32) & 0xFFFF, 32); |
3240 DCHECK((target_offset >> 48) == 0); | 3239 DCHECK((target_offset >> 48) == 0); |
3241 add(rd, rd, scratch); | 3240 add(rd, rd, scratch); |
3242 } | 3241 } |
3243 | 3242 |
3244 | 3243 |
3245 } // namespace internal | 3244 } // namespace internal |
3246 } // namespace v8 | 3245 } // namespace v8 |
3247 | 3246 |
3248 #endif // V8_TARGET_ARCH_ARM64 | 3247 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |