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 2414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2425 obj = needs_write_barrier_for_map | 2425 obj = needs_write_barrier_for_map |
2426 ? UseRegister(instr->object()) | 2426 ? UseRegister(instr->object()) |
2427 : UseRegisterAtStart(instr->object()); | 2427 : UseRegisterAtStart(instr->object()); |
2428 } | 2428 } |
2429 | 2429 |
2430 bool can_be_constant = instr->value()->IsConstant() && | 2430 bool can_be_constant = instr->value()->IsConstant() && |
2431 HConstant::cast(instr->value())->NotInNewSpace() && | 2431 HConstant::cast(instr->value())->NotInNewSpace() && |
2432 !(FLAG_track_double_fields && instr->field_representation().IsDouble()); | 2432 !(FLAG_track_double_fields && instr->field_representation().IsDouble()); |
2433 | 2433 |
2434 LOperand* val; | 2434 LOperand* val; |
2435 if (instr->field_representation().IsInteger8() || | 2435 if (instr->field_representation().IsByte()) { |
2436 instr->field_representation().IsUInteger8()) { | |
2437 // mov_b requires a byte register (i.e. any of eax, ebx, ecx, edx). | 2436 // mov_b requires a byte register (i.e. any of eax, ebx, ecx, edx). |
2438 // Just force the value to be in eax and we're safe here. | 2437 // Just force the value to be in eax and we're safe here. |
2439 val = UseFixed(instr->value(), eax); | 2438 val = UseFixed(instr->value(), eax); |
2440 } else if (needs_write_barrier) { | 2439 } else if (needs_write_barrier) { |
2441 val = UseTempRegister(instr->value()); | 2440 val = UseTempRegister(instr->value()); |
2442 } else if (can_be_constant) { | 2441 } else if (can_be_constant) { |
2443 val = UseRegisterOrConstant(instr->value()); | 2442 val = UseRegisterOrConstant(instr->value()); |
2444 } else if (FLAG_track_fields && instr->field_representation().IsSmi()) { | 2443 } else if (FLAG_track_fields && instr->field_representation().IsSmi()) { |
2445 val = UseTempRegister(instr->value()); | 2444 val = UseTempRegister(instr->value()); |
2446 } else if (FLAG_track_double_fields && | 2445 } else if (FLAG_track_double_fields && |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2747 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2746 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2748 LOperand* object = UseRegister(instr->object()); | 2747 LOperand* object = UseRegister(instr->object()); |
2749 LOperand* index = UseTempRegister(instr->index()); | 2748 LOperand* index = UseTempRegister(instr->index()); |
2750 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2749 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2751 } | 2750 } |
2752 | 2751 |
2753 | 2752 |
2754 } } // namespace v8::internal | 2753 } } // namespace v8::internal |
2755 | 2754 |
2756 #endif // V8_TARGET_ARCH_IA32 | 2755 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |