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

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

Issue 997003003: Version 4.2.77.5 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@4.2
Patch Set: Created 5 years, 9 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/runtime/runtime-array.cc ('k') | 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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 4597 matching lines...) Expand 10 before | Expand all | Expand 10 after
4608 // Only look at the lower 16 bits of the transition info. 4608 // Only look at the lower 16 bits of the transition info.
4609 __ movp(rdx, FieldOperand(rbx, AllocationSite::kTransitionInfoOffset)); 4609 __ movp(rdx, FieldOperand(rbx, AllocationSite::kTransitionInfoOffset));
4610 __ SmiToInteger32(rdx, rdx); 4610 __ SmiToInteger32(rdx, rdx);
4611 STATIC_ASSERT(AllocationSite::ElementsKindBits::kShift == 0); 4611 STATIC_ASSERT(AllocationSite::ElementsKindBits::kShift == 0);
4612 __ andp(rdx, Immediate(AllocationSite::ElementsKindBits::kMask)); 4612 __ andp(rdx, Immediate(AllocationSite::ElementsKindBits::kMask));
4613 GenerateDispatchToArrayStub(masm, DONT_OVERRIDE); 4613 GenerateDispatchToArrayStub(masm, DONT_OVERRIDE);
4614 4614
4615 __ bind(&no_info); 4615 __ bind(&no_info);
4616 GenerateDispatchToArrayStub(masm, DISABLE_ALLOCATION_SITES); 4616 GenerateDispatchToArrayStub(masm, DISABLE_ALLOCATION_SITES);
4617 4617
4618 // Subclassing
4618 __ bind(&subclassing); 4619 __ bind(&subclassing);
4619 __ TailCallRuntime(Runtime::kThrowArrayNotSubclassableError, 0, 1); 4620 __ Pop(rcx); // return address.
4621 __ Push(rdi);
4622 __ Push(rdx);
4623
4624 // Adjust argc.
4625 switch (argument_count()) {
4626 case ANY:
4627 case MORE_THAN_ONE:
4628 __ addp(rax, Immediate(2));
4629 break;
4630 case NONE:
4631 __ movp(rax, Immediate(2));
4632 break;
4633 case ONE:
4634 __ movp(rax, Immediate(3));
4635 break;
4636 }
4637
4638 __ Push(rcx);
4639 __ JumpToExternalReference(
4640 ExternalReference(Runtime::kArrayConstructorWithSubclassing, isolate()),
4641 1);
4620 } 4642 }
4621 4643
4622 4644
4623 void InternalArrayConstructorStub::GenerateCase( 4645 void InternalArrayConstructorStub::GenerateCase(
4624 MacroAssembler* masm, ElementsKind kind) { 4646 MacroAssembler* masm, ElementsKind kind) {
4625 Label not_zero_case, not_one_case; 4647 Label not_zero_case, not_one_case;
4626 Label normal_sequence; 4648 Label normal_sequence;
4627 4649
4628 __ testp(rax, rax); 4650 __ testp(rax, rax);
4629 __ j(not_zero, &not_zero_case); 4651 __ j(not_zero, &not_zero_case);
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
5105 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, getter_arg, 5127 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, getter_arg,
5106 kStackSpace, nullptr, return_value_operand, NULL); 5128 kStackSpace, nullptr, return_value_operand, NULL);
5107 } 5129 }
5108 5130
5109 5131
5110 #undef __ 5132 #undef __
5111 5133
5112 } } // namespace v8::internal 5134 } } // namespace v8::internal
5113 5135
5114 #endif // V8_TARGET_ARCH_X64 5136 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/runtime/runtime-array.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698