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 2187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2198 HTrapAllocationMemento* instr) { | 2198 HTrapAllocationMemento* instr) { |
2199 LOperand* object = UseRegister(instr->object()); | 2199 LOperand* object = UseRegister(instr->object()); |
2200 LOperand* temp = TempRegister(); | 2200 LOperand* temp = TempRegister(); |
2201 LTrapAllocationMemento* result = | 2201 LTrapAllocationMemento* result = |
2202 new(zone()) LTrapAllocationMemento(object, temp); | 2202 new(zone()) LTrapAllocationMemento(object, temp); |
2203 return AssignEnvironment(result); | 2203 return AssignEnvironment(result); |
2204 } | 2204 } |
2205 | 2205 |
2206 | 2206 |
2207 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { | 2207 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { |
| 2208 bool is_in_object = instr->access().IsInobject(); |
2208 bool needs_write_barrier = instr->NeedsWriteBarrier(); | 2209 bool needs_write_barrier = instr->NeedsWriteBarrier(); |
2209 bool needs_write_barrier_for_map = !instr->transition().is_null() && | 2210 bool needs_write_barrier_for_map = !instr->transition().is_null() && |
2210 instr->NeedsWriteBarrierForMap(); | 2211 instr->NeedsWriteBarrierForMap(); |
2211 | 2212 |
2212 LOperand* obj; | 2213 LOperand* obj; |
2213 if (needs_write_barrier) { | 2214 if (needs_write_barrier) { |
2214 obj = instr->is_in_object() | 2215 obj = is_in_object |
2215 ? UseRegister(instr->object()) | 2216 ? UseRegister(instr->object()) |
2216 : UseTempRegister(instr->object()); | 2217 : UseTempRegister(instr->object()); |
2217 } else { | 2218 } else { |
2218 obj = needs_write_barrier_for_map | 2219 obj = needs_write_barrier_for_map |
2219 ? UseRegister(instr->object()) | 2220 ? UseRegister(instr->object()) |
2220 : UseRegisterAtStart(instr->object()); | 2221 : UseRegisterAtStart(instr->object()); |
2221 } | 2222 } |
2222 | 2223 |
2223 LOperand* val; | 2224 LOperand* val; |
2224 if (needs_write_barrier || | 2225 if (needs_write_barrier || |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2520 | 2521 |
2521 | 2522 |
2522 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2523 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2523 LOperand* object = UseRegister(instr->object()); | 2524 LOperand* object = UseRegister(instr->object()); |
2524 LOperand* index = UseRegister(instr->index()); | 2525 LOperand* index = UseRegister(instr->index()); |
2525 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2526 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2526 } | 2527 } |
2527 | 2528 |
2528 | 2529 |
2529 } } // namespace v8::internal | 2530 } } // namespace v8::internal |
OLD | NEW |