Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: src/arm64/assembler-arm64.cc

Issue 2097023002: Reland [heap] Avoid the use of cells to point from code to new-space objects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/arm64/assembler-arm64-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/arm64/assembler-arm64-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698