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

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

Issue 9298011: MIPS: Store transitioned JSArray maps in global context (Closed)
Patch Set: Created 8 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/macro-assembler-mips.h ('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 4261 matching lines...) Expand 10 before | Expand all | Expand 10 after
4272 } 4272 }
4273 } else { 4273 } else {
4274 // Slot is in the current function context. Move it into the 4274 // Slot is in the current function context. Move it into the
4275 // destination register in case we store into it (the write barrier 4275 // destination register in case we store into it (the write barrier
4276 // cannot be allowed to destroy the context in esi). 4276 // cannot be allowed to destroy the context in esi).
4277 Move(dst, cp); 4277 Move(dst, cp);
4278 } 4278 }
4279 } 4279 }
4280 4280
4281 4281
4282 void MacroAssembler::LoadGlobalInitialConstructedArrayMap(
4283 Register function_in, Register scratch, Register map_out) {
4284 ASSERT(!function_in.is(map_out));
4285 Label done;
4286 lw(map_out, FieldMemOperand(function_in,
4287 JSFunction::kPrototypeOrInitialMapOffset));
4288 if (!FLAG_smi_only_arrays) {
4289 // Load the global or builtins object from the current context.
4290 lw(scratch, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX)));
4291 lw(scratch, FieldMemOperand(scratch, GlobalObject::kGlobalContextOffset));
4292
4293 // Check that the function's map is same as the cached map.
4294 lw(at, MemOperand(
4295 scratch, Context::SlotOffset(Context::SMI_JS_ARRAY_MAP_INDEX)));
4296 Branch(&done, ne, map_out, Operand(at));
4297
4298 // Use the cached transitioned map.
4299 lw(map_out,
4300 MemOperand(scratch,
4301 Context::SlotOffset(Context::OBJECT_JS_ARRAY_MAP_INDEX)));
4302 }
4303 bind(&done);
4304 }
4305
4306
4282 void MacroAssembler::LoadGlobalFunction(int index, Register function) { 4307 void MacroAssembler::LoadGlobalFunction(int index, Register function) {
4283 // Load the global or builtins object from the current context. 4308 // Load the global or builtins object from the current context.
4284 lw(function, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX))); 4309 lw(function, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX)));
4285 // Load the global context from the global or builtins object. 4310 // Load the global context from the global or builtins object.
4286 lw(function, FieldMemOperand(function, 4311 lw(function, FieldMemOperand(function,
4287 GlobalObject::kGlobalContextOffset)); 4312 GlobalObject::kGlobalContextOffset));
4288 // Load the function from the global context. 4313 // Load the function from the global context.
4289 lw(function, MemOperand(function, Context::SlotOffset(index))); 4314 lw(function, MemOperand(function, Context::SlotOffset(index)));
4290 } 4315 }
4291 4316
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after
5123 opcode == BGTZL); 5148 opcode == BGTZL);
5124 opcode = (cond == eq) ? BEQ : BNE; 5149 opcode = (cond == eq) ? BEQ : BNE;
5125 instr = (instr & ~kOpcodeMask) | opcode; 5150 instr = (instr & ~kOpcodeMask) | opcode;
5126 masm_.emit(instr); 5151 masm_.emit(instr);
5127 } 5152 }
5128 5153
5129 5154
5130 } } // namespace v8::internal 5155 } } // namespace v8::internal
5131 5156
5132 #endif // V8_TARGET_ARCH_MIPS 5157 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698