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

Side by Side Diff: src/arm/macro-assembler-arm.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: 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
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 #include <limits.h> // For LONG_MIN, LONG_MAX. 5 #include <limits.h> // For LONG_MIN, LONG_MAX.
6 6
7 #if V8_TARGET_ARCH_ARM 7 #if V8_TARGET_ARCH_ARM
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/division-by-constant.h" 10 #include "src/base/division-by-constant.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 } 239 }
240 240
241 241
242 void MacroAssembler::Push(Handle<Object> handle) { 242 void MacroAssembler::Push(Handle<Object> handle) {
243 mov(ip, Operand(handle)); 243 mov(ip, Operand(handle));
244 push(ip); 244 push(ip);
245 } 245 }
246 246
247 247
248 void MacroAssembler::Move(Register dst, Handle<Object> value) { 248 void MacroAssembler::Move(Register dst, Handle<Object> value) {
249 AllowDeferredHandleDereference smi_check;
250 if (value->IsSmi()) { 249 if (value->IsSmi()) {
251 mov(dst, Operand(value)); 250 mov(dst, Operand(value));
252 } else { 251 } else {
253 DCHECK(value->IsHeapObject()); 252 DCHECK(value->IsHeapObject());
254 if (isolate()->heap()->InNewSpace(*value)) { 253 mov(dst, Operand(value));
255 Handle<Cell> cell = isolate()->factory()->NewCell(value);
256 mov(dst, Operand(cell));
257 ldr(dst, FieldMemOperand(dst, Cell::kValueOffset));
258 } else {
259 mov(dst, Operand(value));
260 }
261 } 254 }
262 } 255 }
263 256
264 257
265 void MacroAssembler::Move(Register dst, Register src, Condition cond) { 258 void MacroAssembler::Move(Register dst, Register src, Condition cond) {
266 if (!dst.is(src)) { 259 if (!dst.is(src)) {
267 mov(dst, src, LeaveCC, cond); 260 mov(dst, src, LeaveCC, cond);
268 } 261 }
269 } 262 }
270 263
(...skipping 3766 matching lines...) Expand 10 before | Expand all | Expand 10 after
4037 } 4030 }
4038 } 4031 }
4039 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); 4032 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift));
4040 add(result, result, Operand(dividend, LSR, 31)); 4033 add(result, result, Operand(dividend, LSR, 31));
4041 } 4034 }
4042 4035
4043 } // namespace internal 4036 } // namespace internal
4044 } // namespace v8 4037 } // namespace v8
4045 4038
4046 #endif // V8_TARGET_ARCH_ARM 4039 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/assembler-arm.cc ('k') | src/arm64/assembler-arm64.cc » ('j') | src/compiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698