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

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

Issue 8857001: [hydrogen] don't bailout assignments to consts (Closed) Base URL: gh:v8/v8@master
Patch Set: fixed x64 build 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
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 2149 matching lines...) Expand 10 before | Expand all | Expand 10 after
2160 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 2160 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
2161 Register context = ToRegister(instr->context()); 2161 Register context = ToRegister(instr->context());
2162 Register result = ToRegister(instr->result()); 2162 Register result = ToRegister(instr->result());
2163 __ lw(result, ContextOperand(context, instr->slot_index())); 2163 __ lw(result, ContextOperand(context, instr->slot_index()));
2164 } 2164 }
2165 2165
2166 2166
2167 void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) { 2167 void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) {
2168 Register context = ToRegister(instr->context()); 2168 Register context = ToRegister(instr->context());
2169 Register value = ToRegister(instr->value()); 2169 Register value = ToRegister(instr->value());
2170 Register scratch = scratch0();
2170 MemOperand target = ContextOperand(context, instr->slot_index()); 2171 MemOperand target = ContextOperand(context, instr->slot_index());
2172
2173 Label skip_assignment;
2174
2175 if (instr->needs_is_hole_check()) {
2176 __ lw(scratch, target);
2177 __ Branch(&skip_assignment, ne, scratch,
2178 Operand(factory()->the_hole_value()));
2179 }
2180
2171 __ sw(value, target); 2181 __ sw(value, target);
2172 if (instr->hydrogen()->NeedsWriteBarrier()) { 2182 if (instr->hydrogen()->NeedsWriteBarrier()) {
2173 HType type = instr->hydrogen()->value()->type(); 2183 HType type = instr->hydrogen()->value()->type();
2174 SmiCheck check_needed = 2184 SmiCheck check_needed =
2175 type.IsHeapObject() ? OMIT_SMI_CHECK : INLINE_SMI_CHECK; 2185 type.IsHeapObject() ? OMIT_SMI_CHECK : INLINE_SMI_CHECK;
2176 __ RecordWriteContextSlot(context, 2186 __ RecordWriteContextSlot(context,
2177 target.offset(), 2187 target.offset(),
2178 value, 2188 value,
2179 scratch0(), 2189 scratch0(),
2180 kRAHasBeenSaved, 2190 kRAHasBeenSaved,
2181 kSaveFPRegs, 2191 kSaveFPRegs,
2182 EMIT_REMEMBERED_SET, 2192 EMIT_REMEMBERED_SET,
2183 check_needed); 2193 check_needed);
2184 } 2194 }
2195
2196 __ bind(&skip_assignment);
2185 } 2197 }
2186 2198
2187 2199
2188 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { 2200 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
2189 Register object = ToRegister(instr->InputAt(0)); 2201 Register object = ToRegister(instr->InputAt(0));
2190 Register result = ToRegister(instr->result()); 2202 Register result = ToRegister(instr->result());
2191 if (instr->hydrogen()->is_in_object()) { 2203 if (instr->hydrogen()->is_in_object()) {
2192 __ lw(result, FieldMemOperand(object, instr->hydrogen()->offset())); 2204 __ lw(result, FieldMemOperand(object, instr->hydrogen()->offset()));
2193 } else { 2205 } else {
2194 __ lw(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); 2206 __ lw(result, FieldMemOperand(object, JSObject::kPropertiesOffset));
(...skipping 2453 matching lines...) Expand 10 before | Expand all | Expand 10 after
4648 ASSERT(!environment->HasBeenRegistered()); 4660 ASSERT(!environment->HasBeenRegistered());
4649 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); 4661 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt);
4650 ASSERT(osr_pc_offset_ == -1); 4662 ASSERT(osr_pc_offset_ == -1);
4651 osr_pc_offset_ = masm()->pc_offset(); 4663 osr_pc_offset_ = masm()->pc_offset();
4652 } 4664 }
4653 4665
4654 4666
4655 #undef __ 4667 #undef __
4656 4668
4657 } } // namespace v8::internal 4669 } } // namespace v8::internal
OLDNEW
« src/hydrogen.cc ('K') | « src/ia32/lithium-ia32.h ('k') | src/mips/lithium-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698