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

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

Issue 975693002: Revert of Implement subclassing Arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
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/mips/code-stubs-mips.cc ('k') | src/runtime/runtime.h » ('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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_MIPS64 7 #if V8_TARGET_ARCH_MIPS64
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 4826 matching lines...) Expand 10 before | Expand all | Expand 10 after
4837 } 4837 }
4838 } 4838 }
4839 4839
4840 4840
4841 void ArrayConstructorStub::Generate(MacroAssembler* masm) { 4841 void ArrayConstructorStub::Generate(MacroAssembler* masm) {
4842 // ----------- S t a t e ------------- 4842 // ----------- S t a t e -------------
4843 // -- a0 : argc (only if argument_count() == ANY) 4843 // -- a0 : argc (only if argument_count() == ANY)
4844 // -- a1 : constructor 4844 // -- a1 : constructor
4845 // -- a2 : AllocationSite or undefined 4845 // -- a2 : AllocationSite or undefined
4846 // -- a3 : original constructor 4846 // -- a3 : original constructor
4847 // -- sp[0] : last argument 4847 // -- sp[0] : return address
4848 // -- sp[4] : last argument
4848 // ----------------------------------- 4849 // -----------------------------------
4849 4850
4850 if (FLAG_debug_code) { 4851 if (FLAG_debug_code) {
4851 // The array construct code is only set for the global and natives 4852 // The array construct code is only set for the global and natives
4852 // builtin Array functions which always have maps. 4853 // builtin Array functions which always have maps.
4853 4854
4854 // Initial map for the builtin Array function should be a map. 4855 // Initial map for the builtin Array function should be a map.
4855 __ ld(a4, FieldMemOperand(a1, JSFunction::kPrototypeOrInitialMapOffset)); 4856 __ ld(a4, FieldMemOperand(a1, JSFunction::kPrototypeOrInitialMapOffset));
4856 // Will both indicate a NULL and a Smi. 4857 // Will both indicate a NULL and a Smi.
4857 __ SmiTst(a4, at); 4858 __ SmiTst(a4, at);
(...skipping 17 matching lines...) Expand all
4875 4876
4876 __ ld(a3, FieldMemOperand(a2, AllocationSite::kTransitionInfoOffset)); 4877 __ ld(a3, FieldMemOperand(a2, AllocationSite::kTransitionInfoOffset));
4877 __ SmiUntag(a3); 4878 __ SmiUntag(a3);
4878 STATIC_ASSERT(AllocationSite::ElementsKindBits::kShift == 0); 4879 STATIC_ASSERT(AllocationSite::ElementsKindBits::kShift == 0);
4879 __ And(a3, a3, Operand(AllocationSite::ElementsKindBits::kMask)); 4880 __ And(a3, a3, Operand(AllocationSite::ElementsKindBits::kMask));
4880 GenerateDispatchToArrayStub(masm, DONT_OVERRIDE); 4881 GenerateDispatchToArrayStub(masm, DONT_OVERRIDE);
4881 4882
4882 __ bind(&no_info); 4883 __ bind(&no_info);
4883 GenerateDispatchToArrayStub(masm, DISABLE_ALLOCATION_SITES); 4884 GenerateDispatchToArrayStub(masm, DISABLE_ALLOCATION_SITES);
4884 4885
4885 // Subclassing.
4886 __ bind(&subclassing); 4886 __ bind(&subclassing);
4887 __ Push(a1); 4887 __ TailCallRuntime(Runtime::kThrowArrayNotSubclassableError, 0, 1);
4888 __ Push(a3);
4889
4890 // Adjust argc.
4891 switch (argument_count()) {
4892 case ANY:
4893 case MORE_THAN_ONE:
4894 __ li(at, Operand(2));
4895 __ addu(a0, a0, at);
4896 break;
4897 case NONE:
4898 __ li(a0, Operand(2));
4899 break;
4900 case ONE:
4901 __ li(a0, Operand(3));
4902 break;
4903 }
4904
4905 __ JumpToExternalReference(
4906 ExternalReference(Runtime::kArrayConstructorWithSubclassing, isolate()));
4907 } 4888 }
4908 4889
4909 4890
4910 void InternalArrayConstructorStub::GenerateCase( 4891 void InternalArrayConstructorStub::GenerateCase(
4911 MacroAssembler* masm, ElementsKind kind) { 4892 MacroAssembler* masm, ElementsKind kind) {
4912 4893
4913 InternalArrayNoArgumentConstructorStub stub0(isolate(), kind); 4894 InternalArrayNoArgumentConstructorStub stub0(isolate(), kind);
4914 __ TailCallStub(&stub0, lo, a0, Operand(1)); 4895 __ TailCallStub(&stub0, lo, a0, Operand(1));
4915 4896
4916 InternalArrayNArgumentsConstructorStub stubN(isolate(), kind); 4897 InternalArrayNArgumentsConstructorStub stubN(isolate(), kind);
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
5284 kStackUnwindSpace, kInvalidStackOffset, 5265 kStackUnwindSpace, kInvalidStackOffset,
5285 MemOperand(fp, 6 * kPointerSize), NULL); 5266 MemOperand(fp, 6 * kPointerSize), NULL);
5286 } 5267 }
5287 5268
5288 5269
5289 #undef __ 5270 #undef __
5290 5271
5291 } } // namespace v8::internal 5272 } } // namespace v8::internal
5292 5273
5293 #endif // V8_TARGET_ARCH_MIPS64 5274 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698