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

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

Issue 1456423003: [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 | « src/arm64/code-stubs-arm64.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/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 5001 matching lines...) Expand 10 before | Expand all | Expand 10 after
5012 __ SmiUntag(edx); 5012 __ SmiUntag(edx);
5013 STATIC_ASSERT(AllocationSite::ElementsKindBits::kShift == 0); 5013 STATIC_ASSERT(AllocationSite::ElementsKindBits::kShift == 0);
5014 __ and_(edx, Immediate(AllocationSite::ElementsKindBits::kMask)); 5014 __ and_(edx, Immediate(AllocationSite::ElementsKindBits::kMask));
5015 GenerateDispatchToArrayStub(masm, DONT_OVERRIDE); 5015 GenerateDispatchToArrayStub(masm, DONT_OVERRIDE);
5016 5016
5017 __ bind(&no_info); 5017 __ bind(&no_info);
5018 GenerateDispatchToArrayStub(masm, DISABLE_ALLOCATION_SITES); 5018 GenerateDispatchToArrayStub(masm, DISABLE_ALLOCATION_SITES);
5019 5019
5020 // Subclassing. 5020 // Subclassing.
5021 __ bind(&subclassing); 5021 __ bind(&subclassing);
5022 __ pop(ecx); // return address.
5023 __ push(edi);
5024 __ push(edx);
5025
5026 // Adjust argc.
5027 switch (argument_count()) { 5022 switch (argument_count()) {
5028 case ANY: 5023 case ANY:
5029 case MORE_THAN_ONE: 5024 case MORE_THAN_ONE:
5030 __ add(eax, Immediate(2)); 5025 __ mov(Operand(esp, eax, times_pointer_size, kPointerSize), edi);
5026 __ add(eax, Immediate(3));
5031 break; 5027 break;
5032 case NONE: 5028 case NONE:
5033 __ mov(eax, Immediate(2)); 5029 __ mov(Operand(esp, 1 * kPointerSize), edi);
5030 __ mov(eax, Immediate(3));
5034 break; 5031 break;
5035 case ONE: 5032 case ONE:
5036 __ mov(eax, Immediate(3)); 5033 __ mov(Operand(esp, 2 * kPointerSize), edi);
5034 __ mov(eax, Immediate(4));
5037 break; 5035 break;
5038 } 5036 }
5039 5037 __ PopReturnAddressTo(ecx);
5040 __ push(ecx); 5038 __ Push(edx);
5041 __ JumpToExternalReference( 5039 __ Push(ebx);
5042 ExternalReference(Runtime::kArrayConstructorWithSubclassing, isolate())); 5040 __ PushReturnAddressFrom(ecx);
5041 __ JumpToExternalReference(ExternalReference(Runtime::kNewArray, isolate()));
5043 } 5042 }
5044 5043
5045 5044
5046 void InternalArrayConstructorStub::GenerateCase( 5045 void InternalArrayConstructorStub::GenerateCase(
5047 MacroAssembler* masm, ElementsKind kind) { 5046 MacroAssembler* masm, ElementsKind kind) {
5048 Label not_zero_case, not_one_case; 5047 Label not_zero_case, not_one_case;
5049 Label normal_sequence; 5048 Label normal_sequence;
5050 5049
5051 __ test(eax, eax); 5050 __ test(eax, eax);
5052 __ j(not_zero, &not_zero_case); 5051 __ j(not_zero, &not_zero_case);
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
5667 Operand(ebp, 7 * kPointerSize), NULL); 5666 Operand(ebp, 7 * kPointerSize), NULL);
5668 } 5667 }
5669 5668
5670 5669
5671 #undef __ 5670 #undef __
5672 5671
5673 } // namespace internal 5672 } // namespace internal
5674 } // namespace v8 5673 } // namespace v8
5675 5674
5676 #endif // V8_TARGET_ARCH_IA32 5675 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698