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

Side by Side Diff: src/ia32/macro-assembler-ia32.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/ia32/code-stubs-ia32.cc ('k') | src/mips/code-stubs-mips.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_IA32 5 #if V8_TARGET_ARCH_IA32
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 1526 matching lines...) Expand 10 before | Expand all | Expand 10 after
1537 } 1537 }
1538 1538
1539 1539
1540 void MacroAssembler::Allocate(int object_size, 1540 void MacroAssembler::Allocate(int object_size,
1541 Register result, 1541 Register result,
1542 Register result_end, 1542 Register result_end,
1543 Register scratch, 1543 Register scratch,
1544 Label* gc_required, 1544 Label* gc_required,
1545 AllocationFlags flags) { 1545 AllocationFlags flags) {
1546 DCHECK((flags & (RESULT_CONTAINS_TOP | SIZE_IN_WORDS)) == 0); 1546 DCHECK((flags & (RESULT_CONTAINS_TOP | SIZE_IN_WORDS)) == 0);
1547 DCHECK(object_size <= Page::kMaxRegularHeapObjectSize); 1547 DCHECK(object_size <= kMaxRegularHeapObjectSize);
1548 DCHECK((flags & ALLOCATION_FOLDED) == 0); 1548 DCHECK((flags & ALLOCATION_FOLDED) == 0);
1549 if (!FLAG_inline_new) { 1549 if (!FLAG_inline_new) {
1550 if (emit_debug_code()) { 1550 if (emit_debug_code()) {
1551 // Trash the registers to simulate an allocation failure. 1551 // Trash the registers to simulate an allocation failure.
1552 mov(result, Immediate(0x7091)); 1552 mov(result, Immediate(0x7091));
1553 if (result_end.is_valid()) { 1553 if (result_end.is_valid()) {
1554 mov(result_end, Immediate(0x7191)); 1554 mov(result_end, Immediate(0x7191));
1555 } 1555 }
1556 if (scratch.is_valid()) { 1556 if (scratch.is_valid()) {
1557 mov(scratch, Immediate(0x7291)); 1557 mov(scratch, Immediate(0x7291));
(...skipping 1899 matching lines...) Expand 10 before | Expand all | Expand 10 after
3457 mov(eax, dividend); 3457 mov(eax, dividend);
3458 shr(eax, 31); 3458 shr(eax, 31);
3459 add(edx, eax); 3459 add(edx, eax);
3460 } 3460 }
3461 3461
3462 3462
3463 } // namespace internal 3463 } // namespace internal
3464 } // namespace v8 3464 } // namespace v8
3465 3465
3466 #endif // V8_TARGET_ARCH_IA32 3466 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698