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 1818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1829 // building a stack frame. | 1829 // building a stack frame. |
1830 if (from.IsTagged()) { | 1830 if (from.IsTagged()) { |
1831 if (to.IsDouble()) { | 1831 if (to.IsDouble()) { |
1832 info()->MarkAsDeferredCalling(); | 1832 info()->MarkAsDeferredCalling(); |
1833 LOperand* value = UseRegister(instr->value()); | 1833 LOperand* value = UseRegister(instr->value()); |
1834 LNumberUntagD* res = new(zone()) LNumberUntagD(value); | 1834 LNumberUntagD* res = new(zone()) LNumberUntagD(value); |
1835 return AssignEnvironment(DefineAsRegister(res)); | 1835 return AssignEnvironment(DefineAsRegister(res)); |
1836 } else if (to.IsSmi()) { | 1836 } else if (to.IsSmi()) { |
1837 HValue* val = instr->value(); | 1837 HValue* val = instr->value(); |
1838 LOperand* value = UseRegister(val); | 1838 LOperand* value = UseRegister(val); |
| 1839 if (val->type().IsSmi()) { |
| 1840 return DefineSameAsFirst(new(zone()) LDummyUse(value)); |
| 1841 } |
1839 return AssignEnvironment( | 1842 return AssignEnvironment( |
1840 DefineSameAsFirst(new(zone()) LCheckSmiAndReturn(value))); | 1843 DefineSameAsFirst(new(zone()) LCheckSmiAndReturn(value))); |
1841 } else { | 1844 } else { |
1842 ASSERT(to.IsInteger32()); | 1845 ASSERT(to.IsInteger32()); |
1843 LOperand* value = UseRegister(instr->value()); | 1846 LOperand* value = UseRegister(instr->value()); |
1844 if (instr->value()->type().IsSmi()) { | 1847 if (instr->value()->type().IsSmi()) { |
1845 LInstruction* result = | 1848 LInstruction* result = |
1846 DefineSameAsFirst(new(zone()) LSmiUntag(value, false)); | 1849 DefineSameAsFirst(new(zone()) LSmiUntag(value, false)); |
1847 if (instr->value()->IsLoadKeyed()) { | 1850 if (instr->value()->IsLoadKeyed()) { |
1848 HLoadKeyed* load_keyed = HLoadKeyed::cast(instr->value()); | 1851 HLoadKeyed* load_keyed = HLoadKeyed::cast(instr->value()); |
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2583 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2586 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2584 LOperand* object = UseRegister(instr->object()); | 2587 LOperand* object = UseRegister(instr->object()); |
2585 LOperand* index = UseTempRegister(instr->index()); | 2588 LOperand* index = UseTempRegister(instr->index()); |
2586 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2589 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2587 } | 2590 } |
2588 | 2591 |
2589 | 2592 |
2590 } } // namespace v8::internal | 2593 } } // namespace v8::internal |
2591 | 2594 |
2592 #endif // V8_TARGET_ARCH_X64 | 2595 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |