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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/division-by-constant.h" 8 #include "src/base/division-by-constant.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 2948 matching lines...) Expand 10 before | Expand all | Expand 10 after
2959 Push(Smi::cast(*source)); 2959 Push(Smi::cast(*source));
2960 } else { 2960 } else {
2961 MoveHeapObject(kScratchRegister, source); 2961 MoveHeapObject(kScratchRegister, source);
2962 Push(kScratchRegister); 2962 Push(kScratchRegister);
2963 } 2963 }
2964 } 2964 }
2965 2965
2966 2966
2967 void MacroAssembler::MoveHeapObject(Register result, 2967 void MacroAssembler::MoveHeapObject(Register result,
2968 Handle<Object> object) { 2968 Handle<Object> object) {
2969 AllowDeferredHandleDereference using_raw_address;
2969 DCHECK(object->IsHeapObject()); 2970 DCHECK(object->IsHeapObject());
2970 Move(result, object, RelocInfo::EMBEDDED_OBJECT); 2971 if (isolate()->heap()->InNewSpace(*object)) {
2972 Handle<Cell> cell = isolate()->factory()->NewCell(object);
2973 Move(result, cell, RelocInfo::CELL);
2974 movp(result, Operand(result, 0));
2975 } else {
2976 Move(result, object, RelocInfo::EMBEDDED_OBJECT);
2977 }
2971 } 2978 }
2972 2979
2973 2980
2974 void MacroAssembler::LoadGlobalCell(Register dst, Handle<Cell> cell) { 2981 void MacroAssembler::LoadGlobalCell(Register dst, Handle<Cell> cell) {
2975 if (dst.is(rax)) { 2982 if (dst.is(rax)) {
2976 AllowDeferredHandleDereference embedding_raw_address; 2983 AllowDeferredHandleDereference embedding_raw_address;
2977 load_rax(cell.location(), RelocInfo::CELL); 2984 load_rax(cell.location(), RelocInfo::CELL);
2978 } else { 2985 } else {
2979 Move(dst, cell, RelocInfo::CELL); 2986 Move(dst, cell, RelocInfo::CELL);
2980 movp(dst, Operand(dst, 0)); 2987 movp(dst, Operand(dst, 0));
(...skipping 2734 matching lines...) Expand 10 before | Expand all | Expand 10 after
5715 movl(rax, dividend); 5722 movl(rax, dividend);
5716 shrl(rax, Immediate(31)); 5723 shrl(rax, Immediate(31));
5717 addl(rdx, rax); 5724 addl(rdx, rax);
5718 } 5725 }
5719 5726
5720 5727
5721 } // namespace internal 5728 } // namespace internal
5722 } // namespace v8 5729 } // namespace v8
5723 5730
5724 #endif // V8_TARGET_ARCH_X64 5731 #endif // V8_TARGET_ARCH_X64
OLDNEW
« 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