| 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 2404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2415 obj = needs_write_barrier_for_map | 2415 obj = needs_write_barrier_for_map |
| 2416 ? UseRegister(instr->object()) | 2416 ? UseRegister(instr->object()) |
| 2417 : UseRegisterAtStart(instr->object()); | 2417 : UseRegisterAtStart(instr->object()); |
| 2418 } | 2418 } |
| 2419 | 2419 |
| 2420 bool can_be_constant = instr->value()->IsConstant() && | 2420 bool can_be_constant = instr->value()->IsConstant() && |
| 2421 HConstant::cast(instr->value())->NotInNewSpace() && | 2421 HConstant::cast(instr->value())->NotInNewSpace() && |
| 2422 !(FLAG_track_double_fields && instr->field_representation().IsDouble()); | 2422 !(FLAG_track_double_fields && instr->field_representation().IsDouble()); |
| 2423 | 2423 |
| 2424 LOperand* val; | 2424 LOperand* val; |
| 2425 if (instr->field_representation().IsByte()) { | 2425 if (instr->field_representation().IsInteger8() || |
| 2426 instr->field_representation().IsUInteger8()) { |
| 2426 // mov_b requires a byte register (i.e. any of eax, ebx, ecx, edx). | 2427 // mov_b requires a byte register (i.e. any of eax, ebx, ecx, edx). |
| 2427 // Just force the value to be in eax and we're safe here. | 2428 // Just force the value to be in eax and we're safe here. |
| 2428 val = UseFixed(instr->value(), eax); | 2429 val = UseFixed(instr->value(), eax); |
| 2429 } else if (needs_write_barrier) { | 2430 } else if (needs_write_barrier) { |
| 2430 val = UseTempRegister(instr->value()); | 2431 val = UseTempRegister(instr->value()); |
| 2431 } else if (can_be_constant) { | 2432 } else if (can_be_constant) { |
| 2432 val = UseRegisterOrConstant(instr->value()); | 2433 val = UseRegisterOrConstant(instr->value()); |
| 2433 } else if (FLAG_track_fields && instr->field_representation().IsSmi()) { | 2434 } else if (FLAG_track_fields && instr->field_representation().IsSmi()) { |
| 2434 val = UseTempRegister(instr->value()); | 2435 val = UseTempRegister(instr->value()); |
| 2435 } else if (FLAG_track_double_fields && | 2436 } else if (FLAG_track_double_fields && |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2736 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2737 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2737 LOperand* object = UseRegister(instr->object()); | 2738 LOperand* object = UseRegister(instr->object()); |
| 2738 LOperand* index = UseTempRegister(instr->index()); | 2739 LOperand* index = UseTempRegister(instr->index()); |
| 2739 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2740 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
| 2740 } | 2741 } |
| 2741 | 2742 |
| 2742 | 2743 |
| 2743 } } // namespace v8::internal | 2744 } } // namespace v8::internal |
| 2744 | 2745 |
| 2745 #endif // V8_TARGET_ARCH_IA32 | 2746 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |