OLD | NEW |
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 Loading... |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |