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

Side by Side Diff: src/arm64/macro-assembler-arm64.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/arm64/code-stubs-arm64.cc ('k') | src/code-stub-assembler.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 5 #if V8_TARGET_ARCH_ARM64
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 3018 matching lines...) Expand 10 before | Expand all | Expand 10 after
3029 Str(x10, MemOperand(x11)); 3029 Str(x10, MemOperand(x11));
3030 } 3030 }
3031 3031
3032 3032
3033 void MacroAssembler::Allocate(int object_size, 3033 void MacroAssembler::Allocate(int object_size,
3034 Register result, 3034 Register result,
3035 Register scratch1, 3035 Register scratch1,
3036 Register scratch2, 3036 Register scratch2,
3037 Label* gc_required, 3037 Label* gc_required,
3038 AllocationFlags flags) { 3038 AllocationFlags flags) {
3039 DCHECK(object_size <= Page::kMaxRegularHeapObjectSize); 3039 DCHECK(object_size <= kMaxRegularHeapObjectSize);
3040 DCHECK((flags & ALLOCATION_FOLDED) == 0); 3040 DCHECK((flags & ALLOCATION_FOLDED) == 0);
3041 if (!FLAG_inline_new) { 3041 if (!FLAG_inline_new) {
3042 if (emit_debug_code()) { 3042 if (emit_debug_code()) {
3043 // Trash the registers to simulate an allocation failure. 3043 // Trash the registers to simulate an allocation failure.
3044 // We apply salt to the original zap value to easily spot the values. 3044 // We apply salt to the original zap value to easily spot the values.
3045 Mov(result, (kDebugZapValue & ~0xffL) | 0x11L); 3045 Mov(result, (kDebugZapValue & ~0xffL) | 0x11L);
3046 Mov(scratch1, (kDebugZapValue & ~0xffL) | 0x21L); 3046 Mov(scratch1, (kDebugZapValue & ~0xffL) | 0x21L);
3047 Mov(scratch2, (kDebugZapValue & ~0xffL) | 0x21L); 3047 Mov(scratch2, (kDebugZapValue & ~0xffL) | 0x21L);
3048 } 3048 }
3049 B(gc_required); 3049 B(gc_required);
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
3188 Str(result_end, MemOperand(top_address)); 3188 Str(result_end, MemOperand(top_address));
3189 } 3189 }
3190 3190
3191 // Tag the object. 3191 // Tag the object.
3192 ObjectTag(result, result); 3192 ObjectTag(result, result);
3193 } 3193 }
3194 3194
3195 void MacroAssembler::FastAllocate(int object_size, Register result, 3195 void MacroAssembler::FastAllocate(int object_size, Register result,
3196 Register scratch1, Register scratch2, 3196 Register scratch1, Register scratch2,
3197 AllocationFlags flags) { 3197 AllocationFlags flags) {
3198 DCHECK(object_size <= Page::kMaxRegularHeapObjectSize); 3198 DCHECK(object_size <= kMaxRegularHeapObjectSize);
3199 3199
3200 DCHECK(!AreAliased(result, scratch1, scratch2)); 3200 DCHECK(!AreAliased(result, scratch1, scratch2));
3201 DCHECK(result.Is64Bits() && scratch1.Is64Bits() && scratch2.Is64Bits()); 3201 DCHECK(result.Is64Bits() && scratch1.Is64Bits() && scratch2.Is64Bits());
3202 3202
3203 // Make object size into bytes. 3203 // Make object size into bytes.
3204 if ((flags & SIZE_IN_WORDS) != 0) { 3204 if ((flags & SIZE_IN_WORDS) != 0) {
3205 object_size *= kPointerSize; 3205 object_size *= kPointerSize;
3206 } 3206 }
3207 DCHECK(0 == (object_size & kObjectAlignmentMask)); 3207 DCHECK(0 == (object_size & kObjectAlignmentMask));
3208 3208
(...skipping 1943 matching lines...) Expand 10 before | Expand all | Expand 10 after
5152 } 5152 }
5153 5153
5154 5154
5155 #undef __ 5155 #undef __
5156 5156
5157 5157
5158 } // namespace internal 5158 } // namespace internal
5159 } // namespace v8 5159 } // namespace v8
5160 5160
5161 #endif // V8_TARGET_ARCH_ARM64 5161 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/code-stub-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698