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

Unified Diff: src/x64/macro-assembler-x64.cc

Issue 2087463004: Revert of [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: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | src/x87/assembler-x87-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/macro-assembler-x64.cc
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc
index 852e0788604f45c851adfa551c0d3ae0e58361ba..d095b3ae9b6f5b83596dd6b0f364b47e21c8f80a 100644
--- a/src/x64/macro-assembler-x64.cc
+++ b/src/x64/macro-assembler-x64.cc
@@ -2966,8 +2966,15 @@
void MacroAssembler::MoveHeapObject(Register result,
Handle<Object> object) {
+ AllowDeferredHandleDereference using_raw_address;
DCHECK(object->IsHeapObject());
- Move(result, object, RelocInfo::EMBEDDED_OBJECT);
+ if (isolate()->heap()->InNewSpace(*object)) {
+ Handle<Cell> cell = isolate()->factory()->NewCell(object);
+ Move(result, cell, RelocInfo::CELL);
+ movp(result, Operand(result, 0));
+ } else {
+ Move(result, object, RelocInfo::EMBEDDED_OBJECT);
+ }
}
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | src/x87/assembler-x87-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698