| 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 1763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1774 } | 1774 } |
| 1775 if (from.IsTagged()) { | 1775 if (from.IsTagged()) { |
| 1776 if (to.IsDouble()) { | 1776 if (to.IsDouble()) { |
| 1777 info()->MarkAsDeferredCalling(); | 1777 info()->MarkAsDeferredCalling(); |
| 1778 LOperand* value = UseRegister(instr->value()); | 1778 LOperand* value = UseRegister(instr->value()); |
| 1779 LNumberUntagD* res = new(zone()) LNumberUntagD(value); | 1779 LNumberUntagD* res = new(zone()) LNumberUntagD(value); |
| 1780 return AssignEnvironment(DefineAsRegister(res)); | 1780 return AssignEnvironment(DefineAsRegister(res)); |
| 1781 } else if (to.IsSmi()) { | 1781 } else if (to.IsSmi()) { |
| 1782 HValue* val = instr->value(); | 1782 HValue* val = instr->value(); |
| 1783 LOperand* value = UseRegister(val); | 1783 LOperand* value = UseRegister(val); |
| 1784 if (val->type().IsSmi()) { |
| 1785 return DefineSameAsFirst(new(zone()) LDummyUse(value)); |
| 1786 } |
| 1784 return AssignEnvironment( | 1787 return AssignEnvironment( |
| 1785 DefineSameAsFirst(new(zone()) LCheckSmiAndReturn(value))); | 1788 DefineSameAsFirst(new(zone()) LCheckSmiAndReturn(value))); |
| 1786 } else { | 1789 } else { |
| 1787 ASSERT(to.IsInteger32()); | 1790 ASSERT(to.IsInteger32()); |
| 1788 LOperand* value = NULL; | 1791 LOperand* value = NULL; |
| 1789 LInstruction* res = NULL; | 1792 LInstruction* res = NULL; |
| 1790 if (instr->value()->type().IsSmi()) { | 1793 if (instr->value()->type().IsSmi()) { |
| 1791 value = UseRegisterAtStart(instr->value()); | 1794 value = UseRegisterAtStart(instr->value()); |
| 1792 res = DefineAsRegister(new(zone()) LSmiUntag(value, false)); | 1795 res = DefineAsRegister(new(zone()) LSmiUntag(value, false)); |
| 1793 if (instr->value()->IsLoadKeyed()) { | 1796 if (instr->value()->IsLoadKeyed()) { |
| (...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2521 | 2524 |
| 2522 | 2525 |
| 2523 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2526 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2524 LOperand* object = UseRegister(instr->object()); | 2527 LOperand* object = UseRegister(instr->object()); |
| 2525 LOperand* index = UseRegister(instr->index()); | 2528 LOperand* index = UseRegister(instr->index()); |
| 2526 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2529 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
| 2527 } | 2530 } |
| 2528 | 2531 |
| 2529 | 2532 |
| 2530 } } // namespace v8::internal | 2533 } } // namespace v8::internal |
| OLD | NEW |