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

Side by Side Diff: src/ppc/macro-assembler-ppc.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/ppc/code-stubs-ppc.cc ('k') | src/runtime/runtime-internal.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 <assert.h> // For assert 5 #include <assert.h> // For assert
6 #include <limits.h> // For LONG_MIN, LONG_MAX. 6 #include <limits.h> // For LONG_MIN, LONG_MAX.
7 7
8 #if V8_TARGET_ARCH_PPC 8 #if V8_TARGET_ARCH_PPC
9 9
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 1794 matching lines...) Expand 10 before | Expand all | Expand 10 after
1805 // Get the value at the masked, scaled index and return. 1805 // Get the value at the masked, scaled index and return.
1806 const int kValueOffset = 1806 const int kValueOffset =
1807 SeededNumberDictionary::kElementsStartOffset + kPointerSize; 1807 SeededNumberDictionary::kElementsStartOffset + kPointerSize;
1808 LoadP(result, FieldMemOperand(t2, kValueOffset)); 1808 LoadP(result, FieldMemOperand(t2, kValueOffset));
1809 } 1809 }
1810 1810
1811 1811
1812 void MacroAssembler::Allocate(int object_size, Register result, 1812 void MacroAssembler::Allocate(int object_size, Register result,
1813 Register scratch1, Register scratch2, 1813 Register scratch1, Register scratch2,
1814 Label* gc_required, AllocationFlags flags) { 1814 Label* gc_required, AllocationFlags flags) {
1815 DCHECK(object_size <= Page::kMaxRegularHeapObjectSize); 1815 DCHECK(object_size <= kMaxRegularHeapObjectSize);
1816 DCHECK((flags & ALLOCATION_FOLDED) == 0); 1816 DCHECK((flags & ALLOCATION_FOLDED) == 0);
1817 if (!FLAG_inline_new) { 1817 if (!FLAG_inline_new) {
1818 if (emit_debug_code()) { 1818 if (emit_debug_code()) {
1819 // Trash the registers to simulate an allocation failure. 1819 // Trash the registers to simulate an allocation failure.
1820 li(result, Operand(0x7091)); 1820 li(result, Operand(0x7091));
1821 li(scratch1, Operand(0x7191)); 1821 li(scratch1, Operand(0x7191));
1822 li(scratch2, Operand(0x7291)); 1822 li(scratch2, Operand(0x7291));
1823 } 1823 }
1824 b(gc_required); 1824 b(gc_required);
1825 return; 1825 return;
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
2061 } 2061 }
2062 StoreP(result_end, MemOperand(top_address)); 2062 StoreP(result_end, MemOperand(top_address));
2063 2063
2064 // Tag object. 2064 // Tag object.
2065 addi(result, result, Operand(kHeapObjectTag)); 2065 addi(result, result, Operand(kHeapObjectTag));
2066 } 2066 }
2067 2067
2068 void MacroAssembler::FastAllocate(int object_size, Register result, 2068 void MacroAssembler::FastAllocate(int object_size, Register result,
2069 Register scratch1, Register scratch2, 2069 Register scratch1, Register scratch2,
2070 AllocationFlags flags) { 2070 AllocationFlags flags) {
2071 DCHECK(object_size <= Page::kMaxRegularHeapObjectSize); 2071 DCHECK(object_size <= kMaxRegularHeapObjectSize);
2072 DCHECK(!AreAliased(result, scratch1, scratch2, ip)); 2072 DCHECK(!AreAliased(result, scratch1, scratch2, ip));
2073 2073
2074 // Make object size into bytes. 2074 // Make object size into bytes.
2075 if ((flags & SIZE_IN_WORDS) != 0) { 2075 if ((flags & SIZE_IN_WORDS) != 0) {
2076 object_size *= kPointerSize; 2076 object_size *= kPointerSize;
2077 } 2077 }
2078 DCHECK_EQ(0, object_size & kObjectAlignmentMask); 2078 DCHECK_EQ(0, object_size & kObjectAlignmentMask);
2079 2079
2080 ExternalReference allocation_top = 2080 ExternalReference allocation_top =
2081 AllocationUtils::GetAllocationTopReference(isolate(), flags); 2081 AllocationUtils::GetAllocationTopReference(isolate(), flags);
(...skipping 2793 matching lines...) Expand 10 before | Expand all | Expand 10 after
4875 } 4875 }
4876 if (mag.shift > 0) srawi(result, result, mag.shift); 4876 if (mag.shift > 0) srawi(result, result, mag.shift);
4877 ExtractBit(r0, dividend, 31); 4877 ExtractBit(r0, dividend, 31);
4878 add(result, result, r0); 4878 add(result, result, r0);
4879 } 4879 }
4880 4880
4881 } // namespace internal 4881 } // namespace internal
4882 } // namespace v8 4882 } // namespace v8
4883 4883
4884 #endif // V8_TARGET_ARCH_PPC 4884 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/ppc/code-stubs-ppc.cc ('k') | src/runtime/runtime-internal.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698