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

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

Issue 2045263002: [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: The IsSmi check in mov(HeapObject) lets some tests fail. Created 4 years, 6 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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
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