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

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

Issue 2311203002: Move kMaxRegularHeapObjectSize into globals (Closed)
Patch Set: Saving the file helps... Created 4 years, 3 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/code-stubs-arm.cc ('k') | src/arm64/code-stubs-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 1951 matching lines...) Expand 10 before | Expand all | Expand 10 after
1962 ldr(result, FieldMemOperand(t2, kValueOffset)); 1962 ldr(result, FieldMemOperand(t2, kValueOffset));
1963 } 1963 }
1964 1964
1965 1965
1966 void MacroAssembler::Allocate(int object_size, 1966 void MacroAssembler::Allocate(int object_size,
1967 Register result, 1967 Register result,
1968 Register scratch1, 1968 Register scratch1,
1969 Register scratch2, 1969 Register scratch2,
1970 Label* gc_required, 1970 Label* gc_required,
1971 AllocationFlags flags) { 1971 AllocationFlags flags) {
1972 DCHECK(object_size <= Page::kMaxRegularHeapObjectSize); 1972 DCHECK(object_size <= kMaxRegularHeapObjectSize);
1973 DCHECK((flags & ALLOCATION_FOLDED) == 0); 1973 DCHECK((flags & ALLOCATION_FOLDED) == 0);
1974 if (!FLAG_inline_new) { 1974 if (!FLAG_inline_new) {
1975 if (emit_debug_code()) { 1975 if (emit_debug_code()) {
1976 // Trash the registers to simulate an allocation failure. 1976 // Trash the registers to simulate an allocation failure.
1977 mov(result, Operand(0x7091)); 1977 mov(result, Operand(0x7091));
1978 mov(scratch1, Operand(0x7191)); 1978 mov(scratch1, Operand(0x7191));
1979 mov(scratch2, Operand(0x7291)); 1979 mov(scratch2, Operand(0x7291));
1980 } 1980 }
1981 jmp(gc_required); 1981 jmp(gc_required);
1982 return; 1982 return;
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
2217 } 2217 }
2218 // The top pointer is not updated for allocation folding dominators. 2218 // The top pointer is not updated for allocation folding dominators.
2219 str(result_end, MemOperand(top_address)); 2219 str(result_end, MemOperand(top_address));
2220 2220
2221 add(result, result, Operand(kHeapObjectTag)); 2221 add(result, result, Operand(kHeapObjectTag));
2222 } 2222 }
2223 2223
2224 void MacroAssembler::FastAllocate(int object_size, Register result, 2224 void MacroAssembler::FastAllocate(int object_size, Register result,
2225 Register scratch1, Register scratch2, 2225 Register scratch1, Register scratch2,
2226 AllocationFlags flags) { 2226 AllocationFlags flags) {
2227 DCHECK(object_size <= Page::kMaxRegularHeapObjectSize); 2227 DCHECK(object_size <= kMaxRegularHeapObjectSize);
2228 DCHECK(!AreAliased(result, scratch1, scratch2, ip)); 2228 DCHECK(!AreAliased(result, scratch1, scratch2, ip));
2229 2229
2230 // Make object size into bytes. 2230 // Make object size into bytes.
2231 if ((flags & SIZE_IN_WORDS) != 0) { 2231 if ((flags & SIZE_IN_WORDS) != 0) {
2232 object_size *= kPointerSize; 2232 object_size *= kPointerSize;
2233 } 2233 }
2234 DCHECK_EQ(0, object_size & kObjectAlignmentMask); 2234 DCHECK_EQ(0, object_size & kObjectAlignmentMask);
2235 2235
2236 ExternalReference allocation_top = 2236 ExternalReference allocation_top =
2237 AllocationUtils::GetAllocationTopReference(isolate(), flags); 2237 AllocationUtils::GetAllocationTopReference(isolate(), flags);
(...skipping 1788 matching lines...) Expand 10 before | Expand all | Expand 10 after
4026 } 4026 }
4027 } 4027 }
4028 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); 4028 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift));
4029 add(result, result, Operand(dividend, LSR, 31)); 4029 add(result, result, Operand(dividend, LSR, 31));
4030 } 4030 }
4031 4031
4032 } // namespace internal 4032 } // namespace internal
4033 } // namespace v8 4033 } // namespace v8
4034 4034
4035 #endif // V8_TARGET_ARCH_ARM 4035 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm64/code-stubs-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698