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

Side by Side Diff: src/arm/macro-assembler-arm.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/assembler-arm-inl.h ('k') | src/arm64/assembler-arm64.cc » ('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 #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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 } 233 }
234 234
235 235
236 void MacroAssembler::Push(Handle<Object> handle) { 236 void MacroAssembler::Push(Handle<Object> handle) {
237 mov(ip, Operand(handle)); 237 mov(ip, Operand(handle));
238 push(ip); 238 push(ip);
239 } 239 }
240 240
241 241
242 void MacroAssembler::Move(Register dst, Handle<Object> value) { 242 void MacroAssembler::Move(Register dst, Handle<Object> value) {
243 AllowDeferredHandleDereference smi_check; 243 mov(dst, Operand(value));
244 if (value->IsSmi()) {
245 mov(dst, Operand(value));
246 } else {
247 DCHECK(value->IsHeapObject());
248 if (isolate()->heap()->InNewSpace(*value)) {
249 Handle<Cell> cell = isolate()->factory()->NewCell(value);
250 mov(dst, Operand(cell));
251 ldr(dst, FieldMemOperand(dst, Cell::kValueOffset));
252 } else {
253 mov(dst, Operand(value));
254 }
255 }
256 } 244 }
257 245
258 246
259 void MacroAssembler::Move(Register dst, Register src, Condition cond) { 247 void MacroAssembler::Move(Register dst, Register src, Condition cond) {
260 if (!dst.is(src)) { 248 if (!dst.is(src)) {
261 mov(dst, src, LeaveCC, cond); 249 mov(dst, src, LeaveCC, cond);
262 } 250 }
263 } 251 }
264 252
265 void MacroAssembler::Move(SwVfpRegister dst, SwVfpRegister src) { 253 void MacroAssembler::Move(SwVfpRegister dst, SwVfpRegister src) {
(...skipping 3768 matching lines...) Expand 10 before | Expand all | Expand 10 after
4034 } 4022 }
4035 } 4023 }
4036 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); 4024 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift));
4037 add(result, result, Operand(dividend, LSR, 31)); 4025 add(result, result, Operand(dividend, LSR, 31));
4038 } 4026 }
4039 4027
4040 } // namespace internal 4028 } // namespace internal
4041 } // namespace v8 4029 } // namespace v8
4042 4030
4043 #endif // V8_TARGET_ARCH_ARM 4031 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/assembler-arm-inl.h ('k') | src/arm64/assembler-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698