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 2173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2184 obj = is_in_object | 2184 obj = is_in_object |
2185 ? UseRegister(instr->object()) | 2185 ? UseRegister(instr->object()) |
2186 : UseTempRegister(instr->object()); | 2186 : UseTempRegister(instr->object()); |
2187 } else { | 2187 } else { |
2188 obj = needs_write_barrier_for_map | 2188 obj = needs_write_barrier_for_map |
2189 ? UseRegister(instr->object()) | 2189 ? UseRegister(instr->object()) |
2190 : UseRegisterAtStart(instr->object()); | 2190 : UseRegisterAtStart(instr->object()); |
2191 } | 2191 } |
2192 | 2192 |
2193 LOperand* val; | 2193 LOperand* val; |
2194 if (needs_write_barrier || | 2194 if (needs_write_barrier || instr->field_representation().IsSmi()) { |
2195 (FLAG_track_fields && instr->field_representation().IsSmi())) { | |
2196 val = UseTempRegister(instr->value()); | 2195 val = UseTempRegister(instr->value()); |
2197 } else if (FLAG_track_double_fields && | 2196 } else if (instr->field_representation().IsDouble()) { |
2198 instr->field_representation().IsDouble()) { | |
2199 val = UseRegisterAtStart(instr->value()); | 2197 val = UseRegisterAtStart(instr->value()); |
2200 } else { | 2198 } else { |
2201 val = UseRegister(instr->value()); | 2199 val = UseRegister(instr->value()); |
2202 } | 2200 } |
2203 | 2201 |
2204 // We need a temporary register for write barrier of the map field. | 2202 // We need a temporary register for write barrier of the map field. |
2205 LOperand* temp = needs_write_barrier_for_map ? TempRegister() : NULL; | 2203 LOperand* temp = needs_write_barrier_for_map ? TempRegister() : NULL; |
2206 | 2204 |
2207 LStoreNamedField* result = new(zone()) LStoreNamedField(obj, val, temp); | 2205 LStoreNamedField* result = new(zone()) LStoreNamedField(obj, val, temp); |
2208 if (FLAG_track_heap_object_fields && | 2206 if (instr->field_representation().IsHeapObject()) { |
2209 instr->field_representation().IsHeapObject()) { | |
2210 if (!instr->value()->type().IsHeapObject()) { | 2207 if (!instr->value()->type().IsHeapObject()) { |
2211 return AssignEnvironment(result); | 2208 return AssignEnvironment(result); |
2212 } | 2209 } |
2213 } | 2210 } |
2214 return result; | 2211 return result; |
2215 } | 2212 } |
2216 | 2213 |
2217 | 2214 |
2218 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { | 2215 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { |
2219 LOperand* context = UseFixed(instr->context(), cp); | 2216 LOperand* context = UseFixed(instr->context(), cp); |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2476 } | 2473 } |
2477 | 2474 |
2478 | 2475 |
2479 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2476 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2480 LOperand* object = UseRegister(instr->object()); | 2477 LOperand* object = UseRegister(instr->object()); |
2481 LOperand* index = UseRegister(instr->index()); | 2478 LOperand* index = UseRegister(instr->index()); |
2482 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2479 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2483 } | 2480 } |
2484 | 2481 |
2485 } } // namespace v8::internal | 2482 } } // namespace v8::internal |
OLD | NEW |