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

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

Issue 8897025: MIPS: Hydrogen support for context allocated harmony bindings. (Closed)
Patch Set: Created 9 years 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 | src/mips/lithium-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 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 2163 matching lines...) Expand 10 before | Expand all | Expand 10 after
2174 ? isolate()->builtins()->StoreIC_Initialize_Strict() 2174 ? isolate()->builtins()->StoreIC_Initialize_Strict()
2175 : isolate()->builtins()->StoreIC_Initialize(); 2175 : isolate()->builtins()->StoreIC_Initialize();
2176 CallCode(ic, RelocInfo::CODE_TARGET_CONTEXT, instr); 2176 CallCode(ic, RelocInfo::CODE_TARGET_CONTEXT, instr);
2177 } 2177 }
2178 2178
2179 2179
2180 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 2180 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
2181 Register context = ToRegister(instr->context()); 2181 Register context = ToRegister(instr->context());
2182 Register result = ToRegister(instr->result()); 2182 Register result = ToRegister(instr->result());
2183 __ lw(result, ContextOperand(context, instr->slot_index())); 2183 __ lw(result, ContextOperand(context, instr->slot_index()));
2184 if (instr->hydrogen()->RequiresHoleCheck()) {
2185 __ LoadRoot(at, Heap::kTheHoleValueRootIndex);
2186 DeoptimizeIf(eq, instr->environment(), result, Operand(at));
2187 }
2184 } 2188 }
2185 2189
2186 2190
2187 void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) { 2191 void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) {
2188 Register context = ToRegister(instr->context()); 2192 Register context = ToRegister(instr->context());
2189 Register value = ToRegister(instr->value()); 2193 Register value = ToRegister(instr->value());
2190 MemOperand target = ContextOperand(context, instr->slot_index()); 2194 MemOperand target = ContextOperand(context, instr->slot_index());
2195 if (instr->hydrogen()->RequiresHoleCheck()) {
2196 Register scratch = scratch0();
2197 __ lw(scratch, target);
2198 __ LoadRoot(at, Heap::kTheHoleValueRootIndex);
2199 DeoptimizeIf(eq, instr->environment(), scratch, Operand(at));
2200 }
2191 __ sw(value, target); 2201 __ sw(value, target);
2192 if (instr->hydrogen()->NeedsWriteBarrier()) { 2202 if (instr->hydrogen()->NeedsWriteBarrier()) {
2193 HType type = instr->hydrogen()->value()->type(); 2203 HType type = instr->hydrogen()->value()->type();
2194 SmiCheck check_needed = 2204 SmiCheck check_needed =
2195 type.IsHeapObject() ? OMIT_SMI_CHECK : INLINE_SMI_CHECK; 2205 type.IsHeapObject() ? OMIT_SMI_CHECK : INLINE_SMI_CHECK;
2196 __ RecordWriteContextSlot(context, 2206 __ RecordWriteContextSlot(context,
2197 target.offset(), 2207 target.offset(),
2198 value, 2208 value,
2199 scratch0(), 2209 scratch0(),
2200 kRAHasBeenSaved, 2210 kRAHasBeenSaved,
(...skipping 2475 matching lines...) Expand 10 before | Expand all | Expand 10 after
4676 ASSERT(!environment->HasBeenRegistered()); 4686 ASSERT(!environment->HasBeenRegistered());
4677 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); 4687 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt);
4678 ASSERT(osr_pc_offset_ == -1); 4688 ASSERT(osr_pc_offset_ == -1);
4679 osr_pc_offset_ = masm()->pc_offset(); 4689 osr_pc_offset_ = masm()->pc_offset();
4680 } 4690 }
4681 4691
4682 4692
4683 #undef __ 4693 #undef __
4684 4694
4685 } } // namespace v8::internal 4695 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/mips/lithium-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698