| 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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 return match; | 272 return match; |
| 273 } | 273 } |
| 274 | 274 |
| 275 | 275 |
| 276 void Immediate::InitializeHandle(Handle<Object> handle) { | 276 void Immediate::InitializeHandle(Handle<Object> handle) { |
| 277 AllowDeferredHandleDereference using_raw_address; | 277 AllowDeferredHandleDereference using_raw_address; |
| 278 | 278 |
| 279 // Verify all Objects referred by code are NOT in new space. | 279 // Verify all Objects referred by code are NOT in new space. |
| 280 Object* obj = *handle; | 280 Object* obj = *handle; |
| 281 if (obj->IsHeapObject()) { | 281 if (obj->IsHeapObject()) { |
| 282 DCHECK(!HeapObject::cast(obj)->GetHeap()->InNewSpace(obj)); | |
| 283 value_ = reinterpret_cast<intptr_t>(handle.location()); | 282 value_ = reinterpret_cast<intptr_t>(handle.location()); |
| 284 rmode_ = RelocInfo::EMBEDDED_OBJECT; | 283 rmode_ = RelocInfo::EMBEDDED_OBJECT; |
| 285 } else { | 284 } else { |
| 286 STATIC_ASSERT(sizeof(intptr_t) == sizeof(int64_t)); | 285 STATIC_ASSERT(sizeof(intptr_t) == sizeof(int64_t)); |
| 287 value_ = reinterpret_cast<intptr_t>(obj); | 286 value_ = reinterpret_cast<intptr_t>(obj); |
| 288 rmode_ = RelocInfo::NONE64; | 287 rmode_ = RelocInfo::NONE64; |
| 289 } | 288 } |
| 290 } | 289 } |
| 291 | 290 |
| 292 | 291 |
| (...skipping 2921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3214 movk(scratch, (target_offset >> 32) & 0xFFFF, 32); | 3213 movk(scratch, (target_offset >> 32) & 0xFFFF, 32); |
| 3215 DCHECK((target_offset >> 48) == 0); | 3214 DCHECK((target_offset >> 48) == 0); |
| 3216 add(rd, rd, scratch); | 3215 add(rd, rd, scratch); |
| 3217 } | 3216 } |
| 3218 | 3217 |
| 3219 | 3218 |
| 3220 } // namespace internal | 3219 } // namespace internal |
| 3221 } // namespace v8 | 3220 } // namespace v8 |
| 3222 | 3221 |
| 3223 #endif // V8_TARGET_ARCH_ARM64 | 3222 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |