| 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 1787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1798 LOperand* value = UseRegister(instr->value()); | 1798 LOperand* value = UseRegister(instr->value()); |
| 1799 // Temp register only necessary for minus zero check. | 1799 // Temp register only necessary for minus zero check. |
| 1800 LOperand* temp = TempRegister(); | 1800 LOperand* temp = TempRegister(); |
| 1801 LNumberUntagD* res = new(zone()) LNumberUntagD(value, temp); | 1801 LNumberUntagD* res = new(zone()) LNumberUntagD(value, temp); |
| 1802 return AssignEnvironment(DefineAsRegister(res)); | 1802 return AssignEnvironment(DefineAsRegister(res)); |
| 1803 } else if (to.IsSmi()) { | 1803 } else if (to.IsSmi()) { |
| 1804 HValue* val = instr->value(); | 1804 HValue* val = instr->value(); |
| 1805 LOperand* value = UseRegister(val); | 1805 LOperand* value = UseRegister(val); |
| 1806 if (val->type().IsSmi()) { | 1806 if (val->type().IsSmi()) { |
| 1807 return DefineSameAsFirst(new(zone()) LDummyUse(value)); | 1807 return DefineSameAsFirst(new(zone()) LDummyUse(value)); |
| 1808 } else { |
| 1809 bool truncating = instr->CanTruncateToSmi(); |
| 1810 LOperand* temp = |
| 1811 (CpuFeatures::IsSafeForSnapshot(SSE2) && !truncating) |
| 1812 ? FixedTemp(xmm1) : NULL; |
| 1813 LTaggedToSmi* res = new(zone()) LTaggedToSmi(UseRegister(val), temp); |
| 1814 |
| 1815 return AssignEnvironment(DefineSameAsFirst(res)); |
| 1808 } | 1816 } |
| 1809 return AssignEnvironment(DefineSameAsFirst(new(zone()) LCheckSmi(value))); | |
| 1810 } else { | 1817 } else { |
| 1811 ASSERT(to.IsInteger32()); | 1818 ASSERT(to.IsInteger32()); |
| 1812 HValue* val = instr->value(); | 1819 HValue* val = instr->value(); |
| 1813 if (val->type().IsSmi() || val->representation().IsSmi()) { | 1820 if (val->type().IsSmi() || val->representation().IsSmi()) { |
| 1814 LOperand* value = UseRegister(val); | 1821 LOperand* value = UseRegister(val); |
| 1815 return DefineSameAsFirst(new(zone()) LSmiUntag(value, false)); | 1822 return DefineSameAsFirst(new(zone()) LSmiUntag(value, false)); |
| 1816 } else { | 1823 } else { |
| 1817 bool truncating = instr->CanTruncateToInt32(); | 1824 bool truncating = instr->CanTruncateToInt32(); |
| 1818 LOperand* xmm_temp = | 1825 LOperand* xmm_temp = |
| 1819 (CpuFeatures::IsSafeForSnapshot(SSE2) && !truncating) | 1826 (CpuFeatures::IsSafeForSnapshot(SSE2) && !truncating) |
| (...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2582 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2589 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2583 LOperand* object = UseRegister(instr->object()); | 2590 LOperand* object = UseRegister(instr->object()); |
| 2584 LOperand* index = UseTempRegister(instr->index()); | 2591 LOperand* index = UseTempRegister(instr->index()); |
| 2585 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2592 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
| 2586 } | 2593 } |
| 2587 | 2594 |
| 2588 | 2595 |
| 2589 } } // namespace v8::internal | 2596 } } // namespace v8::internal |
| 2590 | 2597 |
| 2591 #endif // V8_TARGET_ARCH_IA32 | 2598 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |