| OLD | NEW |
| 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 2160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2171 ? isolate()->builtins()->StoreIC_Initialize_Strict() | 2171 ? isolate()->builtins()->StoreIC_Initialize_Strict() |
| 2172 : isolate()->builtins()->StoreIC_Initialize(); | 2172 : isolate()->builtins()->StoreIC_Initialize(); |
| 2173 CallCode(ic, RelocInfo::CODE_TARGET_CONTEXT, instr); | 2173 CallCode(ic, RelocInfo::CODE_TARGET_CONTEXT, instr); |
| 2174 } | 2174 } |
| 2175 | 2175 |
| 2176 | 2176 |
| 2177 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { | 2177 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { |
| 2178 Register context = ToRegister(instr->context()); | 2178 Register context = ToRegister(instr->context()); |
| 2179 Register result = ToRegister(instr->result()); | 2179 Register result = ToRegister(instr->result()); |
| 2180 __ mov(result, ContextOperand(context, instr->slot_index())); | 2180 __ mov(result, ContextOperand(context, instr->slot_index())); |
| 2181 if (instr->hydrogen()->RequiresHoleCheck()) { |
| 2182 __ cmp(result, factory()->the_hole_value()); |
| 2183 DeoptimizeIf(equal, instr->environment()); |
| 2184 } |
| 2181 } | 2185 } |
| 2182 | 2186 |
| 2183 | 2187 |
| 2184 void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) { | 2188 void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) { |
| 2185 Register context = ToRegister(instr->context()); | 2189 Register context = ToRegister(instr->context()); |
| 2186 Register value = ToRegister(instr->value()); | 2190 Register value = ToRegister(instr->value()); |
| 2187 __ mov(ContextOperand(context, instr->slot_index()), value); | 2191 Operand target = ContextOperand(context, instr->slot_index()); |
| 2192 if (instr->hydrogen()->RequiresHoleCheck()) { |
| 2193 __ cmp(target, factory()->the_hole_value()); |
| 2194 DeoptimizeIf(equal, instr->environment()); |
| 2195 } |
| 2196 __ mov(target, value); |
| 2188 if (instr->hydrogen()->NeedsWriteBarrier()) { | 2197 if (instr->hydrogen()->NeedsWriteBarrier()) { |
| 2189 HType type = instr->hydrogen()->value()->type(); | 2198 HType type = instr->hydrogen()->value()->type(); |
| 2190 SmiCheck check_needed = | 2199 SmiCheck check_needed = |
| 2191 type.IsHeapObject() ? OMIT_SMI_CHECK : INLINE_SMI_CHECK; | 2200 type.IsHeapObject() ? OMIT_SMI_CHECK : INLINE_SMI_CHECK; |
| 2192 Register temp = ToRegister(instr->TempAt(0)); | 2201 Register temp = ToRegister(instr->TempAt(0)); |
| 2193 int offset = Context::SlotOffset(instr->slot_index()); | 2202 int offset = Context::SlotOffset(instr->slot_index()); |
| 2194 __ RecordWriteContextSlot(context, | 2203 __ RecordWriteContextSlot(context, |
| 2195 offset, | 2204 offset, |
| 2196 value, | 2205 value, |
| 2197 temp, | 2206 temp, |
| (...skipping 2423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4621 this, pointers, Safepoint::kLazyDeopt); | 4630 this, pointers, Safepoint::kLazyDeopt); |
| 4622 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); | 4631 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); |
| 4623 } | 4632 } |
| 4624 | 4633 |
| 4625 | 4634 |
| 4626 #undef __ | 4635 #undef __ |
| 4627 | 4636 |
| 4628 } } // namespace v8::internal | 4637 } } // namespace v8::internal |
| 4629 | 4638 |
| 4630 #endif // V8_TARGET_ARCH_IA32 | 4639 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |