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 2230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2241 val = UseTempRegister(instr->value()); | 2241 val = UseTempRegister(instr->value()); |
2242 } else if (instr->field_representation().IsDouble()) { | 2242 } else if (instr->field_representation().IsDouble()) { |
2243 val = UseRegisterAtStart(instr->value()); | 2243 val = UseRegisterAtStart(instr->value()); |
2244 } else { | 2244 } else { |
2245 val = UseRegister(instr->value()); | 2245 val = UseRegister(instr->value()); |
2246 } | 2246 } |
2247 | 2247 |
2248 // We need a temporary register for write barrier of the map field. | 2248 // We need a temporary register for write barrier of the map field. |
2249 LOperand* temp = needs_write_barrier_for_map ? TempRegister() : NULL; | 2249 LOperand* temp = needs_write_barrier_for_map ? TempRegister() : NULL; |
2250 | 2250 |
2251 LInstruction* result = new(zone()) LStoreNamedField(obj, val, temp); | 2251 return new(zone()) LStoreNamedField(obj, val, temp); |
2252 if (!instr->access().IsExternalMemory() && | |
2253 instr->field_representation().IsHeapObject() && | |
2254 !instr->value()->type().IsHeapObject()) { | |
2255 result = AssignEnvironment(result); | |
2256 } | |
2257 return result; | |
2258 } | 2252 } |
2259 | 2253 |
2260 | 2254 |
2261 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { | 2255 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { |
2262 LOperand* context = UseFixed(instr->context(), cp); | 2256 LOperand* context = UseFixed(instr->context(), cp); |
2263 LOperand* obj = UseFixed(instr->object(), a1); | 2257 LOperand* obj = UseFixed(instr->object(), a1); |
2264 LOperand* val = UseFixed(instr->value(), a0); | 2258 LOperand* val = UseFixed(instr->value(), a0); |
2265 | 2259 |
2266 LInstruction* result = new(zone()) LStoreNamedGeneric(context, obj, val); | 2260 LInstruction* result = new(zone()) LStoreNamedGeneric(context, obj, val); |
2267 return MarkAsCall(result, instr); | 2261 return MarkAsCall(result, instr); |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2508 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2502 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2509 LOperand* object = UseRegister(instr->object()); | 2503 LOperand* object = UseRegister(instr->object()); |
2510 LOperand* index = UseTempRegister(instr->index()); | 2504 LOperand* index = UseTempRegister(instr->index()); |
2511 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); | 2505 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); |
2512 LInstruction* result = DefineSameAsFirst(load); | 2506 LInstruction* result = DefineSameAsFirst(load); |
2513 return AssignPointerMap(result); | 2507 return AssignPointerMap(result); |
2514 } | 2508 } |
2515 | 2509 |
2516 | 2510 |
2517 } } // namespace v8::internal | 2511 } } // namespace v8::internal |
OLD | NEW |