| 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 1825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1836 LOperand* value = UseRegister(instr->value()); | 1836 LOperand* value = UseRegister(instr->value()); |
| 1837 LDoubleToI* res = new(zone()) LDoubleToI(value); | 1837 LDoubleToI* res = new(zone()) LDoubleToI(value); |
| 1838 return AssignEnvironment(DefineAsRegister(res)); | 1838 return AssignEnvironment(DefineAsRegister(res)); |
| 1839 } | 1839 } |
| 1840 } else if (from.IsInteger32()) { | 1840 } else if (from.IsInteger32()) { |
| 1841 info()->MarkAsDeferredCalling(); | 1841 info()->MarkAsDeferredCalling(); |
| 1842 if (to.IsTagged()) { | 1842 if (to.IsTagged()) { |
| 1843 HValue* val = instr->value(); | 1843 HValue* val = instr->value(); |
| 1844 LOperand* value = UseRegisterAtStart(val); | 1844 LOperand* value = UseRegisterAtStart(val); |
| 1845 if (val->CheckFlag(HInstruction::kUint32)) { | 1845 if (val->CheckFlag(HInstruction::kUint32)) { |
| 1846 LNumberTagU* result = new(zone()) LNumberTagU(value); | 1846 LOperand* temp1 = TempRegister(); |
| 1847 LOperand* temp2 = TempRegister(); |
| 1848 LNumberTagU* result = new(zone()) LNumberTagU(value, temp1, temp2); |
| 1847 return AssignEnvironment(AssignPointerMap(DefineAsRegister(result))); | 1849 return AssignEnvironment(AssignPointerMap(DefineAsRegister(result))); |
| 1848 } else if (val->HasRange() && val->range()->IsInSmiRange()) { | 1850 } else if (val->HasRange() && val->range()->IsInSmiRange()) { |
| 1849 return DefineAsRegister(new(zone()) LSmiTag(value)); | 1851 return DefineAsRegister(new(zone()) LSmiTag(value)); |
| 1850 } else { | 1852 } else { |
| 1851 LNumberTagI* result = new(zone()) LNumberTagI(value); | 1853 LOperand* temp1 = TempRegister(); |
| 1854 LOperand* temp2 = TempRegister(); |
| 1855 LNumberTagI* result = new(zone()) LNumberTagI(value, temp1, temp2); |
| 1852 return AssignEnvironment(AssignPointerMap(DefineAsRegister(result))); | 1856 return AssignEnvironment(AssignPointerMap(DefineAsRegister(result))); |
| 1853 } | 1857 } |
| 1854 } else if (to.IsSmi()) { | 1858 } else if (to.IsSmi()) { |
| 1855 HValue* val = instr->value(); | 1859 HValue* val = instr->value(); |
| 1856 LOperand* value = UseRegister(val); | 1860 LOperand* value = UseRegister(val); |
| 1857 LInstruction* result = val->CheckFlag(HInstruction::kUint32) | 1861 LInstruction* result = val->CheckFlag(HInstruction::kUint32) |
| 1858 ? DefineAsRegister(new(zone()) LUint32ToSmi(value)) | 1862 ? DefineAsRegister(new(zone()) LUint32ToSmi(value)) |
| 1859 : DefineAsRegister(new(zone()) LInteger32ToSmi(value)); | 1863 : DefineAsRegister(new(zone()) LInteger32ToSmi(value)); |
| 1860 if (val->HasRange() && val->range()->IsInSmiRange()) { | 1864 if (val->HasRange() && val->range()->IsInSmiRange()) { |
| 1861 return result; | 1865 return result; |
| (...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2476 } | 2480 } |
| 2477 | 2481 |
| 2478 | 2482 |
| 2479 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2483 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2480 LOperand* object = UseRegister(instr->object()); | 2484 LOperand* object = UseRegister(instr->object()); |
| 2481 LOperand* index = UseRegister(instr->index()); | 2485 LOperand* index = UseRegister(instr->index()); |
| 2482 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2486 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
| 2483 } | 2487 } |
| 2484 | 2488 |
| 2485 } } // namespace v8::internal | 2489 } } // namespace v8::internal |
| OLD | NEW |