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

Side by Side Diff: src/x87/code-stubs-x87.cc

Issue 1462283003: X87: [runtime] Introduce a proper %NewArray runtime entry. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | no next file » | 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/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/bootstrapper.h" 8 #include "src/bootstrapper.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 4683 matching lines...) Expand 10 before | Expand all | Expand 10 after
4694 __ SmiUntag(edx); 4694 __ SmiUntag(edx);
4695 STATIC_ASSERT(AllocationSite::ElementsKindBits::kShift == 0); 4695 STATIC_ASSERT(AllocationSite::ElementsKindBits::kShift == 0);
4696 __ and_(edx, Immediate(AllocationSite::ElementsKindBits::kMask)); 4696 __ and_(edx, Immediate(AllocationSite::ElementsKindBits::kMask));
4697 GenerateDispatchToArrayStub(masm, DONT_OVERRIDE); 4697 GenerateDispatchToArrayStub(masm, DONT_OVERRIDE);
4698 4698
4699 __ bind(&no_info); 4699 __ bind(&no_info);
4700 GenerateDispatchToArrayStub(masm, DISABLE_ALLOCATION_SITES); 4700 GenerateDispatchToArrayStub(masm, DISABLE_ALLOCATION_SITES);
4701 4701
4702 // Subclassing. 4702 // Subclassing.
4703 __ bind(&subclassing); 4703 __ bind(&subclassing);
4704 __ pop(ecx); // return address.
4705 __ push(edi);
4706 __ push(edx);
4707
4708 // Adjust argc.
4709 switch (argument_count()) { 4704 switch (argument_count()) {
4710 case ANY: 4705 case ANY:
4711 case MORE_THAN_ONE: 4706 case MORE_THAN_ONE:
4712 __ add(eax, Immediate(2)); 4707 __ mov(Operand(esp, eax, times_pointer_size, kPointerSize), edi);
4708 __ add(eax, Immediate(3));
4713 break; 4709 break;
4714 case NONE: 4710 case NONE:
4715 __ mov(eax, Immediate(2)); 4711 __ mov(Operand(esp, 1 * kPointerSize), edi);
4712 __ mov(eax, Immediate(3));
4716 break; 4713 break;
4717 case ONE: 4714 case ONE:
4718 __ mov(eax, Immediate(3)); 4715 __ mov(Operand(esp, 2 * kPointerSize), edi);
4716 __ mov(eax, Immediate(4));
4719 break; 4717 break;
4720 } 4718 }
4721 4719 __ PopReturnAddressTo(ecx);
4722 __ push(ecx); 4720 __ Push(edx);
4723 __ JumpToExternalReference( 4721 __ Push(ebx);
4724 ExternalReference(Runtime::kArrayConstructorWithSubclassing, isolate())); 4722 __ PushReturnAddressFrom(ecx);
4723 __ JumpToExternalReference(ExternalReference(Runtime::kNewArray, isolate()));
4725 } 4724 }
4726 4725
4727 4726
4728 void InternalArrayConstructorStub::GenerateCase( 4727 void InternalArrayConstructorStub::GenerateCase(
4729 MacroAssembler* masm, ElementsKind kind) { 4728 MacroAssembler* masm, ElementsKind kind) {
4730 Label not_zero_case, not_one_case; 4729 Label not_zero_case, not_one_case;
4731 Label normal_sequence; 4730 Label normal_sequence;
4732 4731
4733 __ test(eax, eax); 4732 __ test(eax, eax);
4734 __ j(not_zero, &not_zero_case); 4733 __ j(not_zero, &not_zero_case);
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
5349 Operand(ebp, 7 * kPointerSize), NULL); 5348 Operand(ebp, 7 * kPointerSize), NULL);
5350 } 5349 }
5351 5350
5352 5351
5353 #undef __ 5352 #undef __
5354 5353
5355 } // namespace internal 5354 } // namespace internal
5356 } // namespace v8 5355 } // namespace v8
5357 5356
5358 #endif // V8_TARGET_ARCH_X87 5357 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698