| 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 2203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2214 } | 2214 } |
| 2215 | 2215 |
| 2216 | 2216 |
| 2217 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { | 2217 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { |
| 2218 Register object = ToRegister(instr->TempAt(0)); | 2218 Register object = ToRegister(instr->TempAt(0)); |
| 2219 Register address = ToRegister(instr->TempAt(1)); | 2219 Register address = ToRegister(instr->TempAt(1)); |
| 2220 Register value = ToRegister(instr->InputAt(0)); | 2220 Register value = ToRegister(instr->InputAt(0)); |
| 2221 ASSERT(!value.is(object)); | 2221 ASSERT(!value.is(object)); |
| 2222 Handle<JSGlobalPropertyCell> cell_handle(instr->hydrogen()->cell()); | 2222 Handle<JSGlobalPropertyCell> cell_handle(instr->hydrogen()->cell()); |
| 2223 | 2223 |
| 2224 int offset = JSGlobalPropertyCell::kValueOffset; | |
| 2225 __ movq(address, cell_handle, RelocInfo::GLOBAL_PROPERTY_CELL); | 2224 __ movq(address, cell_handle, RelocInfo::GLOBAL_PROPERTY_CELL); |
| 2226 | 2225 |
| 2227 // If the cell we are storing to contains the hole it could have | 2226 // If the cell we are storing to contains the hole it could have |
| 2228 // been deleted from the property dictionary. In that case, we need | 2227 // been deleted from the property dictionary. In that case, we need |
| 2229 // to update the property details in the property dictionary to mark | 2228 // to update the property details in the property dictionary to mark |
| 2230 // it as no longer deleted. We deoptimize in that case. | 2229 // it as no longer deleted. We deoptimize in that case. |
| 2231 if (instr->hydrogen()->check_hole_value()) { | 2230 if (instr->hydrogen()->check_hole_value()) { |
| 2232 __ CompareRoot(Operand(address, 0), Heap::kTheHoleValueRootIndex); | 2231 __ CompareRoot(Operand(address, 0), Heap::kTheHoleValueRootIndex); |
| 2233 DeoptimizeIf(equal, instr->environment()); | 2232 DeoptimizeIf(equal, instr->environment()); |
| 2234 } | 2233 } |
| 2235 | 2234 |
| 2236 // Store the value. | 2235 // Store the value. |
| 2237 __ movq(Operand(address, 0), value); | 2236 __ movq(Operand(address, 0), value); |
| 2238 | 2237 |
| 2239 Label smi_store; | 2238 Label smi_store; |
| 2240 __ JumpIfSmi(value, &smi_store, Label::kNear); | 2239 __ JumpIfSmi(value, &smi_store, Label::kNear); |
| 2241 | 2240 |
| 2241 int offset = JSGlobalPropertyCell::kValueOffset - kHeapObjectTag; |
| 2242 __ lea(object, Operand(address, -offset)); | 2242 __ lea(object, Operand(address, -offset)); |
| 2243 // Cells are always in the remembered set. | 2243 // Cells are always in the remembered set. |
| 2244 __ RecordWrite(object, | 2244 __ RecordWrite(object, |
| 2245 address, | 2245 address, |
| 2246 value, | 2246 value, |
| 2247 kSaveFPRegs, | 2247 kSaveFPRegs, |
| 2248 OMIT_REMEMBERED_SET, | 2248 OMIT_REMEMBERED_SET, |
| 2249 OMIT_SMI_CHECK); | 2249 OMIT_SMI_CHECK); |
| 2250 __ bind(&smi_store); | 2250 __ bind(&smi_store); |
| 2251 } | 2251 } |
| (...skipping 2017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4269 RegisterEnvironmentForDeoptimization(environment); | 4269 RegisterEnvironmentForDeoptimization(environment); |
| 4270 ASSERT(osr_pc_offset_ == -1); | 4270 ASSERT(osr_pc_offset_ == -1); |
| 4271 osr_pc_offset_ = masm()->pc_offset(); | 4271 osr_pc_offset_ = masm()->pc_offset(); |
| 4272 } | 4272 } |
| 4273 | 4273 |
| 4274 #undef __ | 4274 #undef __ |
| 4275 | 4275 |
| 4276 } } // namespace v8::internal | 4276 } } // namespace v8::internal |
| 4277 | 4277 |
| 4278 #endif // V8_TARGET_ARCH_X64 | 4278 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |