| 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 2169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2180 ASSERT(ToRegister(instr->result()).is(r0)); | 2180 ASSERT(ToRegister(instr->result()).is(r0)); |
| 2181 | 2181 |
| 2182 __ mov(r2, Operand(instr->name())); | 2182 __ mov(r2, Operand(instr->name())); |
| 2183 RelocInfo::Mode mode = instr->for_typeof() ? RelocInfo::CODE_TARGET | 2183 RelocInfo::Mode mode = instr->for_typeof() ? RelocInfo::CODE_TARGET |
| 2184 : RelocInfo::CODE_TARGET_CONTEXT; | 2184 : RelocInfo::CODE_TARGET_CONTEXT; |
| 2185 Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize(); | 2185 Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize(); |
| 2186 CallCode(ic, mode, instr); | 2186 CallCode(ic, mode, instr); |
| 2187 } | 2187 } |
| 2188 | 2188 |
| 2189 | 2189 |
| 2190 void LCodeGen::DoStoreGlobal(LStoreGlobal* instr) { | 2190 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { |
| 2191 Register value = ToRegister(instr->InputAt(0)); | 2191 Register value = ToRegister(instr->InputAt(0)); |
| 2192 Register scratch = scratch0(); | 2192 Register scratch = scratch0(); |
| 2193 | 2193 |
| 2194 // Load the cell. | 2194 // Load the cell. |
| 2195 __ mov(scratch, Operand(Handle<Object>(instr->hydrogen()->cell()))); | 2195 __ mov(scratch, Operand(Handle<Object>(instr->hydrogen()->cell()))); |
| 2196 | 2196 |
| 2197 // If the cell we are storing to contains the hole it could have | 2197 // If the cell we are storing to contains the hole it could have |
| 2198 // been deleted from the property dictionary. In that case, we need | 2198 // been deleted from the property dictionary. In that case, we need |
| 2199 // to update the property details in the property dictionary to mark | 2199 // to update the property details in the property dictionary to mark |
| 2200 // it as no longer deleted. | 2200 // it as no longer deleted. |
| 2201 if (instr->hydrogen()->check_hole_value()) { | 2201 if (instr->hydrogen()->check_hole_value()) { |
| 2202 Register scratch2 = ToRegister(instr->TempAt(0)); | 2202 Register scratch2 = ToRegister(instr->TempAt(0)); |
| 2203 __ ldr(scratch2, | 2203 __ ldr(scratch2, |
| 2204 FieldMemOperand(scratch, JSGlobalPropertyCell::kValueOffset)); | 2204 FieldMemOperand(scratch, JSGlobalPropertyCell::kValueOffset)); |
| 2205 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); | 2205 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); |
| 2206 __ cmp(scratch2, ip); | 2206 __ cmp(scratch2, ip); |
| 2207 DeoptimizeIf(eq, instr->environment()); | 2207 DeoptimizeIf(eq, instr->environment()); |
| 2208 } | 2208 } |
| 2209 | 2209 |
| 2210 // Store the value. | 2210 // Store the value. |
| 2211 __ str(value, FieldMemOperand(scratch, JSGlobalPropertyCell::kValueOffset)); | 2211 __ str(value, FieldMemOperand(scratch, JSGlobalPropertyCell::kValueOffset)); |
| 2212 } | 2212 } |
| 2213 | 2213 |
| 2214 | 2214 |
| 2215 void LCodeGen::DoStoreGlobalGeneric(LStoreGlobalGeneric* instr) { |
| 2216 ASSERT(ToRegister(instr->global_object()).is(r1)); |
| 2217 ASSERT(ToRegister(instr->value()).is(r0)); |
| 2218 |
| 2219 __ mov(r2, Operand(instr->name())); |
| 2220 Handle<Code> ic = isolate()->builtins()->StoreIC_Initialize(); |
| 2221 CallCode(ic, RelocInfo::CODE_TARGET_CONTEXT, instr); |
| 2222 } |
| 2223 |
| 2224 |
| 2215 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { | 2225 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { |
| 2216 Register context = ToRegister(instr->context()); | 2226 Register context = ToRegister(instr->context()); |
| 2217 Register result = ToRegister(instr->result()); | 2227 Register result = ToRegister(instr->result()); |
| 2218 __ ldr(result, ContextOperand(context, instr->slot_index())); | 2228 __ ldr(result, ContextOperand(context, instr->slot_index())); |
| 2219 } | 2229 } |
| 2220 | 2230 |
| 2221 | 2231 |
| 2222 void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) { | 2232 void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) { |
| 2223 Register context = ToRegister(instr->context()); | 2233 Register context = ToRegister(instr->context()); |
| 2224 Register value = ToRegister(instr->value()); | 2234 Register value = ToRegister(instr->value()); |
| (...skipping 1888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4113 ASSERT(!environment->HasBeenRegistered()); | 4123 ASSERT(!environment->HasBeenRegistered()); |
| 4114 RegisterEnvironmentForDeoptimization(environment); | 4124 RegisterEnvironmentForDeoptimization(environment); |
| 4115 ASSERT(osr_pc_offset_ == -1); | 4125 ASSERT(osr_pc_offset_ == -1); |
| 4116 osr_pc_offset_ = masm()->pc_offset(); | 4126 osr_pc_offset_ = masm()->pc_offset(); |
| 4117 } | 4127 } |
| 4118 | 4128 |
| 4119 | 4129 |
| 4120 #undef __ | 4130 #undef __ |
| 4121 | 4131 |
| 4122 } } // namespace v8::internal | 4132 } } // namespace v8::internal |
| OLD | NEW |