| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "v8.h" | 5 #include "v8.h" |
| 6 | 6 |
| 7 #include "lithium-allocator-inl.h" | 7 #include "lithium-allocator-inl.h" |
| 8 #include "mips/lithium-mips.h" | 8 #include "mips/lithium-mips.h" |
| 9 #include "mips/lithium-codegen-mips.h" | 9 #include "mips/lithium-codegen-mips.h" |
| 10 #include "hydrogen-osr.h" | 10 #include "hydrogen-osr.h" |
| (...skipping 2249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2260 val = UseTempRegister(instr->value()); | 2260 val = UseTempRegister(instr->value()); |
| 2261 } else if (instr->field_representation().IsDouble()) { | 2261 } else if (instr->field_representation().IsDouble()) { |
| 2262 val = UseRegisterAtStart(instr->value()); | 2262 val = UseRegisterAtStart(instr->value()); |
| 2263 } else { | 2263 } else { |
| 2264 val = UseRegister(instr->value()); | 2264 val = UseRegister(instr->value()); |
| 2265 } | 2265 } |
| 2266 | 2266 |
| 2267 // We need a temporary register for write barrier of the map field. | 2267 // We need a temporary register for write barrier of the map field. |
| 2268 LOperand* temp = needs_write_barrier_for_map ? TempRegister() : NULL; | 2268 LOperand* temp = needs_write_barrier_for_map ? TempRegister() : NULL; |
| 2269 | 2269 |
| 2270 LInstruction* result = new(zone()) LStoreNamedField(obj, val, temp); | 2270 return new(zone()) LStoreNamedField(obj, val, temp); |
| 2271 if (!instr->access().IsExternalMemory() && | |
| 2272 instr->field_representation().IsHeapObject() && | |
| 2273 !instr->value()->type().IsHeapObject()) { | |
| 2274 result = AssignEnvironment(result); | |
| 2275 } | |
| 2276 return result; | |
| 2277 } | 2271 } |
| 2278 | 2272 |
| 2279 | 2273 |
| 2280 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { | 2274 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { |
| 2281 LOperand* context = UseFixed(instr->context(), cp); | 2275 LOperand* context = UseFixed(instr->context(), cp); |
| 2282 LOperand* obj = UseFixed(instr->object(), a1); | 2276 LOperand* obj = UseFixed(instr->object(), a1); |
| 2283 LOperand* val = UseFixed(instr->value(), a0); | 2277 LOperand* val = UseFixed(instr->value(), a0); |
| 2284 | 2278 |
| 2285 LInstruction* result = new(zone()) LStoreNamedGeneric(context, obj, val); | 2279 LInstruction* result = new(zone()) LStoreNamedGeneric(context, obj, val); |
| 2286 return MarkAsCall(result, instr); | 2280 return MarkAsCall(result, instr); |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2527 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2521 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2528 LOperand* object = UseRegister(instr->object()); | 2522 LOperand* object = UseRegister(instr->object()); |
| 2529 LOperand* index = UseTempRegister(instr->index()); | 2523 LOperand* index = UseTempRegister(instr->index()); |
| 2530 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); | 2524 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); |
| 2531 LInstruction* result = DefineSameAsFirst(load); | 2525 LInstruction* result = DefineSameAsFirst(load); |
| 2532 return AssignPointerMap(result); | 2526 return AssignPointerMap(result); |
| 2533 } | 2527 } |
| 2534 | 2528 |
| 2535 | 2529 |
| 2536 } } // namespace v8::internal | 2530 } } // namespace v8::internal |
| OLD | NEW |