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

Side by Side Diff: src/mips/lithium-codegen-mips.cc

Issue 133223003: MIPS: Get rid of ContextualMode for call ICs. (Closed) Base URL: https://github.com/v8/v8.git@gbl
Patch Set: Created 6 years, 11 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/full-codegen-mips.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 3896 matching lines...) Expand 10 before | Expand all | Expand 10 after
3907 isolate()->stub_cache()->ComputeKeyedCallInitialize(arity); 3907 isolate()->stub_cache()->ComputeKeyedCallInitialize(arity);
3908 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3908 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3909 } 3909 }
3910 3910
3911 3911
3912 void LCodeGen::DoCallNamed(LCallNamed* instr) { 3912 void LCodeGen::DoCallNamed(LCallNamed* instr) {
3913 ASSERT(ToRegister(instr->context()).is(cp)); 3913 ASSERT(ToRegister(instr->context()).is(cp));
3914 ASSERT(ToRegister(instr->result()).is(v0)); 3914 ASSERT(ToRegister(instr->result()).is(v0));
3915 3915
3916 int arity = instr->arity(); 3916 int arity = instr->arity();
3917 Handle<Code> ic = 3917 Handle<Code> ic = isolate()->stub_cache()->ComputeCallInitialize(arity);
3918 isolate()->stub_cache()->ComputeCallInitialize(arity, NOT_CONTEXTUAL);
3919 __ li(a2, Operand(instr->name())); 3918 __ li(a2, Operand(instr->name()));
3920 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3919 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3921 } 3920 }
3922 3921
3923 3922
3924 void LCodeGen::DoCallFunction(LCallFunction* instr) { 3923 void LCodeGen::DoCallFunction(LCallFunction* instr) {
3925 ASSERT(ToRegister(instr->context()).is(cp)); 3924 ASSERT(ToRegister(instr->context()).is(cp));
3926 ASSERT(ToRegister(instr->function()).is(a1)); 3925 ASSERT(ToRegister(instr->function()).is(a1));
3927 ASSERT(ToRegister(instr->result()).is(v0)); 3926 ASSERT(ToRegister(instr->result()).is(v0));
3928 3927
3929 int arity = instr->arity(); 3928 int arity = instr->arity();
3930 CallFunctionStub stub(arity, NO_CALL_FUNCTION_FLAGS); 3929 CallFunctionStub stub(arity, NO_CALL_FUNCTION_FLAGS);
3931 if (instr->hydrogen()->IsTailCall()) { 3930 if (instr->hydrogen()->IsTailCall()) {
3932 if (NeedsEagerFrame()) __ mov(sp, fp); 3931 if (NeedsEagerFrame()) __ mov(sp, fp);
3933 __ Jump(stub.GetCode(isolate()), RelocInfo::CODE_TARGET); 3932 __ Jump(stub.GetCode(isolate()), RelocInfo::CODE_TARGET);
3934 } else { 3933 } else {
3935 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); 3934 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
3936 } 3935 }
3937 } 3936 }
3938 3937
3939 3938
3940 void LCodeGen::DoCallGlobal(LCallGlobal* instr) { 3939 void LCodeGen::DoCallGlobal(LCallGlobal* instr) {
3941 ASSERT(ToRegister(instr->context()).is(cp)); 3940 ASSERT(ToRegister(instr->context()).is(cp));
3942 ASSERT(ToRegister(instr->result()).is(v0)); 3941 ASSERT(ToRegister(instr->result()).is(v0));
3943 3942
3944 int arity = instr->arity(); 3943 int arity = instr->arity();
3945 Handle<Code> ic = 3944 Handle<Code> ic = isolate()->stub_cache()->ComputeCallInitialize(arity);
3946 isolate()->stub_cache()->ComputeCallInitialize(arity, CONTEXTUAL);
3947 __ li(a2, Operand(instr->name())); 3945 __ li(a2, Operand(instr->name()));
3948 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3946 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3949 } 3947 }
3950 3948
3951 3949
3952 void LCodeGen::DoCallKnownGlobal(LCallKnownGlobal* instr) { 3950 void LCodeGen::DoCallKnownGlobal(LCallKnownGlobal* instr) {
3953 ASSERT(ToRegister(instr->result()).is(v0)); 3951 ASSERT(ToRegister(instr->result()).is(v0));
3954 CallKnownFunction(instr->hydrogen()->target(), 3952 CallKnownFunction(instr->hydrogen()->target(),
3955 instr->hydrogen()->formal_parameter_count(), 3953 instr->hydrogen()->formal_parameter_count(),
3956 instr->arity(), 3954 instr->arity(),
(...skipping 1859 matching lines...) Expand 10 before | Expand all | Expand 10 after
5816 __ Subu(scratch, result, scratch); 5814 __ Subu(scratch, result, scratch);
5817 __ lw(result, FieldMemOperand(scratch, 5815 __ lw(result, FieldMemOperand(scratch,
5818 FixedArray::kHeaderSize - kPointerSize)); 5816 FixedArray::kHeaderSize - kPointerSize));
5819 __ bind(&done); 5817 __ bind(&done);
5820 } 5818 }
5821 5819
5822 5820
5823 #undef __ 5821 #undef __
5824 5822
5825 } } // namespace v8::internal 5823 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698