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

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

Issue 137273006: MIPS: Fix loading the global receiver. (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 | « no previous file | 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 3362 matching lines...) Expand 10 before | Expand all | Expand 10 after
3373 DeoptimizeIf(eq, instr->environment(), scratch, Operand(zero_reg)); 3373 DeoptimizeIf(eq, instr->environment(), scratch, Operand(zero_reg));
3374 3374
3375 __ GetObjectType(receiver, scratch, scratch); 3375 __ GetObjectType(receiver, scratch, scratch);
3376 DeoptimizeIf(lt, instr->environment(), 3376 DeoptimizeIf(lt, instr->environment(),
3377 scratch, Operand(FIRST_SPEC_OBJECT_TYPE)); 3377 scratch, Operand(FIRST_SPEC_OBJECT_TYPE));
3378 __ Branch(&result_in_receiver); 3378 __ Branch(&result_in_receiver);
3379 3379
3380 __ bind(&global_object); 3380 __ bind(&global_object);
3381 __ lw(receiver, FieldMemOperand(function, JSFunction::kContextOffset)); 3381 __ lw(receiver, FieldMemOperand(function, JSFunction::kContextOffset));
3382 __ lw(receiver, 3382 __ lw(receiver,
3383 ContextOperand(receiver, 3383 ContextOperand(receiver, Context::GLOBAL_OBJECT_INDEX));
3384 Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
3385 __ lw(receiver, 3384 __ lw(receiver,
3386 FieldMemOperand(receiver, GlobalObject::kGlobalReceiverOffset)); 3385 FieldMemOperand(receiver, GlobalObject::kGlobalReceiverOffset));
3387 3386
3388 if (result.is(receiver)) { 3387 if (result.is(receiver)) {
3389 __ bind(&result_in_receiver); 3388 __ bind(&result_in_receiver);
3390 } else { 3389 } else {
3391 Label result_ok; 3390 Label result_ok;
3392 __ Branch(&result_ok); 3391 __ Branch(&result_ok);
3393 __ bind(&result_in_receiver); 3392 __ bind(&result_in_receiver);
3394 __ mov(result, receiver); 3393 __ mov(result, receiver);
(...skipping 2421 matching lines...) Expand 10 before | Expand all | Expand 10 after
5816 __ Subu(scratch, result, scratch); 5815 __ Subu(scratch, result, scratch);
5817 __ lw(result, FieldMemOperand(scratch, 5816 __ lw(result, FieldMemOperand(scratch,
5818 FixedArray::kHeaderSize - kPointerSize)); 5817 FixedArray::kHeaderSize - kPointerSize));
5819 __ bind(&done); 5818 __ bind(&done);
5820 } 5819 }
5821 5820
5822 5821
5823 #undef __ 5822 #undef __
5824 5823
5825 } } // namespace v8::internal 5824 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698