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

Side by Side Diff: src/x87/code-stubs-x87.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/macro-assembler-x64.cc ('k') | src/x87/macro-assembler-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_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/api-arguments.h" 8 #include "src/api-arguments.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 4340 matching lines...) Expand 10 before | Expand all | Expand 10 after
4351 isolate()->factory()->empty_fixed_array()); 4351 isolate()->factory()->empty_fixed_array());
4352 __ mov(FieldOperand(edi, JSArray::kElementsOffset), edx); 4352 __ mov(FieldOperand(edi, JSArray::kElementsOffset), edx);
4353 __ mov(FieldOperand(edi, JSArray::kLengthOffset), eax); 4353 __ mov(FieldOperand(edi, JSArray::kLengthOffset), eax);
4354 STATIC_ASSERT(JSArray::kSize == 4 * kPointerSize); 4354 STATIC_ASSERT(JSArray::kSize == 4 * kPointerSize);
4355 __ mov(eax, edi); 4355 __ mov(eax, edi);
4356 __ Ret(); 4356 __ Ret();
4357 4357
4358 // Fall back to %AllocateInNewSpace (if not too big). 4358 // Fall back to %AllocateInNewSpace (if not too big).
4359 Label too_big_for_new_space; 4359 Label too_big_for_new_space;
4360 __ bind(&allocate); 4360 __ bind(&allocate);
4361 __ cmp(ecx, Immediate(Page::kMaxRegularHeapObjectSize)); 4361 __ cmp(ecx, Immediate(kMaxRegularHeapObjectSize));
4362 __ j(greater, &too_big_for_new_space); 4362 __ j(greater, &too_big_for_new_space);
4363 { 4363 {
4364 FrameScope scope(masm, StackFrame::INTERNAL); 4364 FrameScope scope(masm, StackFrame::INTERNAL);
4365 __ SmiTag(ecx); 4365 __ SmiTag(ecx);
4366 __ Push(eax); 4366 __ Push(eax);
4367 __ Push(ebx); 4367 __ Push(ebx);
4368 __ Push(ecx); 4368 __ Push(ecx);
4369 __ CallRuntime(Runtime::kAllocateInNewSpace); 4369 __ CallRuntime(Runtime::kAllocateInNewSpace);
4370 __ mov(edx, eax); 4370 __ mov(edx, eax);
4371 __ Pop(ebx); 4371 __ Pop(ebx);
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
4738 isolate()->factory()->empty_fixed_array()); 4738 isolate()->factory()->empty_fixed_array());
4739 __ mov(FieldOperand(edi, JSStrictArgumentsObject::kElementsOffset), edx); 4739 __ mov(FieldOperand(edi, JSStrictArgumentsObject::kElementsOffset), edx);
4740 __ mov(FieldOperand(edi, JSStrictArgumentsObject::kLengthOffset), eax); 4740 __ mov(FieldOperand(edi, JSStrictArgumentsObject::kLengthOffset), eax);
4741 STATIC_ASSERT(JSStrictArgumentsObject::kSize == 4 * kPointerSize); 4741 STATIC_ASSERT(JSStrictArgumentsObject::kSize == 4 * kPointerSize);
4742 __ mov(eax, edi); 4742 __ mov(eax, edi);
4743 __ Ret(); 4743 __ Ret();
4744 4744
4745 // Fall back to %AllocateInNewSpace (if not too big). 4745 // Fall back to %AllocateInNewSpace (if not too big).
4746 Label too_big_for_new_space; 4746 Label too_big_for_new_space;
4747 __ bind(&allocate); 4747 __ bind(&allocate);
4748 __ cmp(ecx, Immediate(Page::kMaxRegularHeapObjectSize)); 4748 __ cmp(ecx, Immediate(kMaxRegularHeapObjectSize));
4749 __ j(greater, &too_big_for_new_space); 4749 __ j(greater, &too_big_for_new_space);
4750 { 4750 {
4751 FrameScope scope(masm, StackFrame::INTERNAL); 4751 FrameScope scope(masm, StackFrame::INTERNAL);
4752 __ SmiTag(ecx); 4752 __ SmiTag(ecx);
4753 __ Push(eax); 4753 __ Push(eax);
4754 __ Push(ebx); 4754 __ Push(ebx);
4755 __ Push(ecx); 4755 __ Push(ecx);
4756 __ CallRuntime(Runtime::kAllocateInNewSpace); 4756 __ CallRuntime(Runtime::kAllocateInNewSpace);
4757 __ mov(edx, eax); 4757 __ mov(edx, eax);
4758 __ Pop(ebx); 4758 __ Pop(ebx);
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
5277 kStackUnwindSpace, nullptr, return_value_operand, 5277 kStackUnwindSpace, nullptr, return_value_operand,
5278 NULL); 5278 NULL);
5279 } 5279 }
5280 5280
5281 #undef __ 5281 #undef __
5282 5282
5283 } // namespace internal 5283 } // namespace internal
5284 } // namespace v8 5284 } // namespace v8
5285 5285
5286 #endif // V8_TARGET_ARCH_X87 5286 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.cc ('k') | src/x87/macro-assembler-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698