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 2175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2186 if (needs_write_barrier) { | 2186 if (needs_write_barrier) { |
2187 obj = instr->is_in_object() | 2187 obj = instr->is_in_object() |
2188 ? UseRegister(instr->object()) | 2188 ? UseRegister(instr->object()) |
2189 : UseTempRegister(instr->object()); | 2189 : UseTempRegister(instr->object()); |
2190 } else { | 2190 } else { |
2191 obj = needs_write_barrier_for_map | 2191 obj = needs_write_barrier_for_map |
2192 ? UseRegister(instr->object()) | 2192 ? UseRegister(instr->object()) |
2193 : UseRegisterAtStart(instr->object()); | 2193 : UseRegisterAtStart(instr->object()); |
2194 } | 2194 } |
2195 | 2195 |
2196 LOperand* val = | 2196 LOperand* val; |
2197 needs_write_barrier || | 2197 if (needs_write_barrier || |
2198 (FLAG_track_fields && instr->field_representation().IsSmi()) | 2198 (FLAG_track_fields && instr->field_representation().IsSmi())) { |
2199 ? UseTempRegister(instr->value()) : UseRegister(instr->value()); | 2199 val = UseTempRegister(instr->value()); |
| 2200 } else if (FLAG_track_double_fields && |
| 2201 instr->field_representation().IsDouble()) { |
| 2202 val = UseRegisterAtStart(instr->value()); |
| 2203 } else { |
| 2204 val = UseRegister(instr->value()); |
| 2205 } |
2200 | 2206 |
2201 // We need a temporary register for write barrier of the map field. | 2207 // We need a temporary register for write barrier of the map field. |
2202 LOperand* temp = needs_write_barrier_for_map ? TempRegister() : NULL; | 2208 LOperand* temp = needs_write_barrier_for_map ? TempRegister() : NULL; |
2203 | 2209 |
2204 LStoreNamedField* result = new(zone()) LStoreNamedField(obj, val, temp); | 2210 LStoreNamedField* result = new(zone()) LStoreNamedField(obj, val, temp); |
2205 if ((FLAG_track_fields && instr->field_representation().IsSmi()) || | 2211 if (FLAG_track_fields && instr->field_representation().IsSmi()) { |
2206 (FLAG_track_double_fields && instr->field_representation().IsDouble())) { | |
2207 return AssignEnvironment(result); | 2212 return AssignEnvironment(result); |
2208 } | 2213 } |
2209 return result; | 2214 return result; |
2210 } | 2215 } |
2211 | 2216 |
2212 | 2217 |
2213 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { | 2218 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { |
2214 LOperand* obj = UseFixed(instr->object(), a1); | 2219 LOperand* obj = UseFixed(instr->object(), a1); |
2215 LOperand* val = UseFixed(instr->value(), a0); | 2220 LOperand* val = UseFixed(instr->value(), a0); |
2216 | 2221 |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2496 | 2501 |
2497 | 2502 |
2498 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2503 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2499 LOperand* object = UseRegister(instr->object()); | 2504 LOperand* object = UseRegister(instr->object()); |
2500 LOperand* index = UseRegister(instr->index()); | 2505 LOperand* index = UseRegister(instr->index()); |
2501 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2506 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2502 } | 2507 } |
2503 | 2508 |
2504 | 2509 |
2505 } } // namespace v8::internal | 2510 } } // namespace v8::internal |
OLD | NEW |