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

Side by Side Diff: src/arm/macro-assembler-arm.cc

Issue 2090983002: Revert of 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: 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/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 mov(dst, Operand(value)); 243 AllowDeferredHandleDereference smi_check;
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 }
244 } 256 }
245 257
246 258
247 void MacroAssembler::Move(Register dst, Register src, Condition cond) { 259 void MacroAssembler::Move(Register dst, Register src, Condition cond) {
248 if (!dst.is(src)) { 260 if (!dst.is(src)) {
249 mov(dst, src, LeaveCC, cond); 261 mov(dst, src, LeaveCC, cond);
250 } 262 }
251 } 263 }
252 264
253 void MacroAssembler::Move(SwVfpRegister dst, SwVfpRegister src) { 265 void MacroAssembler::Move(SwVfpRegister dst, SwVfpRegister src) {
(...skipping 3770 matching lines...) Expand 10 before | Expand all | Expand 10 after
4024 } 4036 }
4025 } 4037 }
4026 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); 4038 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift));
4027 add(result, result, Operand(dividend, LSR, 31)); 4039 add(result, result, Operand(dividend, LSR, 31));
4028 } 4040 }
4029 4041
4030 } // namespace internal 4042 } // namespace internal
4031 } // namespace v8 4043 } // namespace v8
4032 4044
4033 #endif // V8_TARGET_ARCH_ARM 4045 #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