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

Side by Side Diff: src/x64/macro-assembler-x64.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/x64/code-stubs-x64.cc ('k') | src/x87/code-stubs-x87.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 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
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 4955 matching lines...) Expand 10 before | Expand all | Expand 10 after
4966 } 4966 }
4967 4967
4968 4968
4969 void MacroAssembler::Allocate(int object_size, 4969 void MacroAssembler::Allocate(int object_size,
4970 Register result, 4970 Register result,
4971 Register result_end, 4971 Register result_end,
4972 Register scratch, 4972 Register scratch,
4973 Label* gc_required, 4973 Label* gc_required,
4974 AllocationFlags flags) { 4974 AllocationFlags flags) {
4975 DCHECK((flags & (RESULT_CONTAINS_TOP | SIZE_IN_WORDS)) == 0); 4975 DCHECK((flags & (RESULT_CONTAINS_TOP | SIZE_IN_WORDS)) == 0);
4976 DCHECK(object_size <= Page::kMaxRegularHeapObjectSize); 4976 DCHECK(object_size <= kMaxRegularHeapObjectSize);
4977 DCHECK((flags & ALLOCATION_FOLDED) == 0); 4977 DCHECK((flags & ALLOCATION_FOLDED) == 0);
4978 if (!FLAG_inline_new) { 4978 if (!FLAG_inline_new) {
4979 if (emit_debug_code()) { 4979 if (emit_debug_code()) {
4980 // Trash the registers to simulate an allocation failure. 4980 // Trash the registers to simulate an allocation failure.
4981 movl(result, Immediate(0x7091)); 4981 movl(result, Immediate(0x7091));
4982 if (result_end.is_valid()) { 4982 if (result_end.is_valid()) {
4983 movl(result_end, Immediate(0x7191)); 4983 movl(result_end, Immediate(0x7191));
4984 } 4984 }
4985 if (scratch.is_valid()) { 4985 if (scratch.is_valid()) {
4986 movl(scratch, Immediate(0x7291)); 4986 movl(scratch, Immediate(0x7291));
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
5822 movl(rax, dividend); 5822 movl(rax, dividend);
5823 shrl(rax, Immediate(31)); 5823 shrl(rax, Immediate(31));
5824 addl(rdx, rax); 5824 addl(rdx, rax);
5825 } 5825 }
5826 5826
5827 5827
5828 } // namespace internal 5828 } // namespace internal
5829 } // namespace v8 5829 } // namespace v8
5830 5830
5831 #endif // V8_TARGET_ARCH_X64 5831 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | src/x87/code-stubs-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698