OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 2312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2323 HTrapAllocationMemento* instr) { | 2323 HTrapAllocationMemento* instr) { |
2324 LOperand* object = UseRegister(instr->object()); | 2324 LOperand* object = UseRegister(instr->object()); |
2325 LOperand* temp = TempRegister(); | 2325 LOperand* temp = TempRegister(); |
2326 LTrapAllocationMemento* result = | 2326 LTrapAllocationMemento* result = |
2327 new(zone()) LTrapAllocationMemento(object, temp); | 2327 new(zone()) LTrapAllocationMemento(object, temp); |
2328 return AssignEnvironment(result); | 2328 return AssignEnvironment(result); |
2329 } | 2329 } |
2330 | 2330 |
2331 | 2331 |
2332 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { | 2332 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { |
| 2333 bool is_in_object = instr->access().IsInobject(); |
2333 bool needs_write_barrier = instr->NeedsWriteBarrier(); | 2334 bool needs_write_barrier = instr->NeedsWriteBarrier(); |
2334 bool needs_write_barrier_for_map = !instr->transition().is_null() && | 2335 bool needs_write_barrier_for_map = !instr->transition().is_null() && |
2335 instr->NeedsWriteBarrierForMap(); | 2336 instr->NeedsWriteBarrierForMap(); |
2336 | 2337 |
2337 LOperand* obj; | 2338 LOperand* obj; |
2338 if (needs_write_barrier) { | 2339 if (needs_write_barrier) { |
2339 obj = instr->is_in_object() | 2340 obj = is_in_object |
2340 ? UseRegister(instr->object()) | 2341 ? UseRegister(instr->object()) |
2341 : UseTempRegister(instr->object()); | 2342 : UseTempRegister(instr->object()); |
2342 } else { | 2343 } else { |
2343 obj = needs_write_barrier_for_map | 2344 obj = needs_write_barrier_for_map |
2344 ? UseRegister(instr->object()) | 2345 ? UseRegister(instr->object()) |
2345 : UseRegisterAtStart(instr->object()); | 2346 : UseRegisterAtStart(instr->object()); |
2346 } | 2347 } |
2347 | 2348 |
2348 LOperand* val; | 2349 LOperand* val; |
2349 if (needs_write_barrier || | 2350 if (needs_write_barrier || |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2645 | 2646 |
2646 | 2647 |
2647 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2648 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2648 LOperand* object = UseRegister(instr->object()); | 2649 LOperand* object = UseRegister(instr->object()); |
2649 LOperand* index = UseRegister(instr->index()); | 2650 LOperand* index = UseRegister(instr->index()); |
2650 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2651 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2651 } | 2652 } |
2652 | 2653 |
2653 | 2654 |
2654 } } // namespace v8::internal | 2655 } } // namespace v8::internal |
OLD | NEW |