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

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

Issue 126043002: MIPS: Reland v8:18458 "Load the global proxy from the context of the target function." (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/ic-mips.cc ('k') | src/mips/stub-cache-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 // 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 3352 matching lines...) Expand 10 before | Expand all | Expand 10 after
3363 // Deoptimize if the receiver is not a JS object. 3363 // Deoptimize if the receiver is not a JS object.
3364 __ SmiTst(receiver, scratch); 3364 __ SmiTst(receiver, scratch);
3365 DeoptimizeIf(eq, instr->environment(), scratch, Operand(zero_reg)); 3365 DeoptimizeIf(eq, instr->environment(), scratch, Operand(zero_reg));
3366 3366
3367 __ GetObjectType(receiver, scratch, scratch); 3367 __ GetObjectType(receiver, scratch, scratch);
3368 DeoptimizeIf(lt, instr->environment(), 3368 DeoptimizeIf(lt, instr->environment(),
3369 scratch, Operand(FIRST_SPEC_OBJECT_TYPE)); 3369 scratch, Operand(FIRST_SPEC_OBJECT_TYPE));
3370 __ Branch(&result_in_receiver); 3370 __ Branch(&result_in_receiver);
3371 3371
3372 __ bind(&global_object); 3372 __ bind(&global_object);
3373 CallStubCompiler::FetchGlobalProxy(masm(), receiver, function);
3373 3374
3374 __ lw(result, MemOperand(fp, StandardFrameConstants::kContextOffset));
3375 __ lw(result, ContextOperand(result, Context::GLOBAL_OBJECT_INDEX));
3376 __ lw(result,
3377 FieldMemOperand(result, JSGlobalObject::kGlobalReceiverOffset));
3378 if (result.is(receiver)) { 3375 if (result.is(receiver)) {
3379 __ bind(&result_in_receiver); 3376 __ bind(&result_in_receiver);
3380 } else { 3377 } else {
3381 Label result_ok; 3378 Label result_ok;
3382 __ Branch(&result_ok); 3379 __ Branch(&result_ok);
3383 __ bind(&result_in_receiver); 3380 __ bind(&result_in_receiver);
3384 __ mov(result, receiver); 3381 __ mov(result, receiver);
3385 __ bind(&result_ok); 3382 __ bind(&result_ok);
3386 } 3383 }
3387 } 3384 }
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
3910 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3907 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3911 } 3908 }
3912 3909
3913 3910
3914 void LCodeGen::DoCallFunction(LCallFunction* instr) { 3911 void LCodeGen::DoCallFunction(LCallFunction* instr) {
3915 ASSERT(ToRegister(instr->context()).is(cp)); 3912 ASSERT(ToRegister(instr->context()).is(cp));
3916 ASSERT(ToRegister(instr->function()).is(a1)); 3913 ASSERT(ToRegister(instr->function()).is(a1));
3917 ASSERT(ToRegister(instr->result()).is(v0)); 3914 ASSERT(ToRegister(instr->result()).is(v0));
3918 3915
3919 int arity = instr->arity(); 3916 int arity = instr->arity();
3920 CallFunctionStub stub(arity, NO_CALL_FUNCTION_FLAGS); 3917 CallFunctionFlags flags =
3918 instr->hydrogen()->IsContextualCall() ?
3919 RECEIVER_IS_IMPLICIT : NO_CALL_FUNCTION_FLAGS;
3920 CallFunctionStub stub(arity, flags);
3921 if (instr->hydrogen()->IsTailCall()) { 3921 if (instr->hydrogen()->IsTailCall()) {
3922 if (NeedsEagerFrame()) __ mov(sp, fp); 3922 if (NeedsEagerFrame()) __ mov(sp, fp);
3923 __ Jump(stub.GetCode(isolate()), RelocInfo::CODE_TARGET); 3923 __ Jump(stub.GetCode(isolate()), RelocInfo::CODE_TARGET);
3924 } else { 3924 } else {
3925 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); 3925 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
3926 } 3926 }
3927 } 3927 }
3928 3928
3929 3929
3930 void LCodeGen::DoCallGlobal(LCallGlobal* instr) { 3930 void LCodeGen::DoCallGlobal(LCallGlobal* instr) {
(...skipping 1877 matching lines...) Expand 10 before | Expand all | Expand 10 after
5808 __ Subu(scratch, result, scratch); 5808 __ Subu(scratch, result, scratch);
5809 __ lw(result, FieldMemOperand(scratch, 5809 __ lw(result, FieldMemOperand(scratch,
5810 FixedArray::kHeaderSize - kPointerSize)); 5810 FixedArray::kHeaderSize - kPointerSize));
5811 __ bind(&done); 5811 __ bind(&done);
5812 } 5812 }
5813 5813
5814 5814
5815 #undef __ 5815 #undef __
5816 5816
5817 } } // namespace v8::internal 5817 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/ic-mips.cc ('k') | src/mips/stub-cache-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698