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 2269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2280 } else { | 2280 } else { |
2281 val = UseRegister(instr->value()); | 2281 val = UseRegister(instr->value()); |
2282 } | 2282 } |
2283 | 2283 |
2284 // We only need a scratch register if we have a write barrier or we | 2284 // We only need a scratch register if we have a write barrier or we |
2285 // have a store into the properties array (not in-object-property). | 2285 // have a store into the properties array (not in-object-property). |
2286 LOperand* temp = (!is_in_object || needs_write_barrier || | 2286 LOperand* temp = (!is_in_object || needs_write_barrier || |
2287 needs_write_barrier_for_map) ? TempRegister() : NULL; | 2287 needs_write_barrier_for_map) ? TempRegister() : NULL; |
2288 | 2288 |
2289 LStoreNamedField* result = new(zone()) LStoreNamedField(obj, val, temp); | 2289 LStoreNamedField* result = new(zone()) LStoreNamedField(obj, val, temp); |
2290 if ((FLAG_track_fields && instr->field_representation().IsSmi()) || | 2290 if (FLAG_track_fields && instr->field_representation().IsSmi()) { |
danno
2013/06/06 07:54:19
See comment from ia32 code.
Toon Verwaest
2013/06/06 10:31:41
Done.
| |
2291 (FLAG_track_heap_object_fields && | 2291 if (!instr->value()->range()->IsInSmiRange()) { |
2292 instr->field_representation().IsHeapObject())) { | 2292 return AssignEnvironment(result); |
2293 return AssignEnvironment(result); | 2293 } |
2294 } else if (FLAG_track_heap_object_fields && | |
2295 instr->field_representation().IsHeapObject()) { | |
2296 if (!instr->value()->type().IsHeapObject()) { | |
2297 return AssignEnvironment(result); | |
2298 } | |
2294 } | 2299 } |
2295 return result; | 2300 return result; |
2296 } | 2301 } |
2297 | 2302 |
2298 | 2303 |
2299 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { | 2304 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { |
2300 LOperand* object = UseFixed(instr->object(), rdx); | 2305 LOperand* object = UseFixed(instr->object(), rdx); |
2301 LOperand* value = UseFixed(instr->value(), rax); | 2306 LOperand* value = UseFixed(instr->value(), rax); |
2302 | 2307 |
2303 LStoreNamedGeneric* result = new(zone()) LStoreNamedGeneric(object, value); | 2308 LStoreNamedGeneric* result = new(zone()) LStoreNamedGeneric(object, value); |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2567 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2572 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2568 LOperand* object = UseRegister(instr->object()); | 2573 LOperand* object = UseRegister(instr->object()); |
2569 LOperand* index = UseTempRegister(instr->index()); | 2574 LOperand* index = UseTempRegister(instr->index()); |
2570 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2575 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2571 } | 2576 } |
2572 | 2577 |
2573 | 2578 |
2574 } } // namespace v8::internal | 2579 } } // namespace v8::internal |
2575 | 2580 |
2576 #endif // V8_TARGET_ARCH_X64 | 2581 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |