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

Side by Side Diff: src/mips/macro-assembler-mips.cc

Issue 7284025: MIPS: port Remove the fcontext field from all contexts. (Closed)
Patch Set: Created 9 years, 5 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 3697 matching lines...) Expand 10 before | Expand all | Expand 10 after
3708 lw(dst, MemOperand(cp, Context::SlotOffset(Context::PREVIOUS_INDEX))); 3708 lw(dst, MemOperand(cp, Context::SlotOffset(Context::PREVIOUS_INDEX)));
3709 for (int i = 1; i < context_chain_length; i++) { 3709 for (int i = 1; i < context_chain_length; i++) {
3710 lw(dst, MemOperand(dst, Context::SlotOffset(Context::PREVIOUS_INDEX))); 3710 lw(dst, MemOperand(dst, Context::SlotOffset(Context::PREVIOUS_INDEX)));
3711 } 3711 }
3712 } else { 3712 } else {
3713 // Slot is in the current function context. Move it into the 3713 // Slot is in the current function context. Move it into the
3714 // destination register in case we store into it (the write barrier 3714 // destination register in case we store into it (the write barrier
3715 // cannot be allowed to destroy the context in esi). 3715 // cannot be allowed to destroy the context in esi).
3716 Move(dst, cp); 3716 Move(dst, cp);
3717 } 3717 }
3718
3719 // We should not have found a 'with' context by walking the context chain
3720 // (i.e., the static scope chain and runtime context chain do not agree).
3721 // A variable occurring in such a scope should have slot type LOOKUP and
3722 // not CONTEXT.
3723 if (emit_debug_code()) {
Kevin Millikin (Chromium) 2011/06/30 08:21:01 BTW, this debug check was removed from ARM because
3724 lw(t9, MemOperand(dst, Context::SlotOffset(Context::FCONTEXT_INDEX)));
3725 Check(eq, "Yo dawg, I heard you liked function contexts "
3726 "so I put function contexts in all your contexts",
3727 dst, Operand(t9));
3728 }
3729 } 3718 }
3730 3719
3731 3720
3732 void MacroAssembler::LoadGlobalFunction(int index, Register function) { 3721 void MacroAssembler::LoadGlobalFunction(int index, Register function) {
3733 // Load the global or builtins object from the current context. 3722 // Load the global or builtins object from the current context.
3734 lw(function, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX))); 3723 lw(function, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX)));
3735 // Load the global context from the global or builtins object. 3724 // Load the global context from the global or builtins object.
3736 lw(function, FieldMemOperand(function, 3725 lw(function, FieldMemOperand(function,
3737 GlobalObject::kGlobalContextOffset)); 3726 GlobalObject::kGlobalContextOffset));
3738 // Load the function from the global context. 3727 // Load the function from the global context.
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
4241 opcode == BGTZL); 4230 opcode == BGTZL);
4242 opcode = (cond == eq) ? BEQ : BNE; 4231 opcode = (cond == eq) ? BEQ : BNE;
4243 instr = (instr & ~kOpcodeMask) | opcode; 4232 instr = (instr & ~kOpcodeMask) | opcode;
4244 masm_.emit(instr); 4233 masm_.emit(instr);
4245 } 4234 }
4246 4235
4247 4236
4248 } } // namespace v8::internal 4237 } } // namespace v8::internal
4249 4238
4250 #endif // V8_TARGET_ARCH_MIPS 4239 #endif // V8_TARGET_ARCH_MIPS
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