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 1755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1766 LOperand* value = UseRegister(instr->value()); | 1766 LOperand* value = UseRegister(instr->value()); |
1767 LNumberUntagD* res = new(zone()) LNumberUntagD(value); | 1767 LNumberUntagD* res = new(zone()) LNumberUntagD(value); |
1768 return AssignEnvironment(DefineAsRegister(res)); | 1768 return AssignEnvironment(DefineAsRegister(res)); |
1769 } else { | 1769 } else { |
1770 ASSERT(to.IsInteger32()); | 1770 ASSERT(to.IsInteger32()); |
1771 LOperand* value = NULL; | 1771 LOperand* value = NULL; |
1772 LInstruction* res = NULL; | 1772 LInstruction* res = NULL; |
1773 if (instr->value()->type().IsSmi()) { | 1773 if (instr->value()->type().IsSmi()) { |
1774 value = UseRegisterAtStart(instr->value()); | 1774 value = UseRegisterAtStart(instr->value()); |
1775 res = DefineAsRegister(new(zone()) LSmiUntag(value, false)); | 1775 res = DefineAsRegister(new(zone()) LSmiUntag(value, false)); |
| 1776 if (instr->value()->IsLoadKeyed()) { |
| 1777 HLoadKeyed* load_keyed = HLoadKeyed::cast(instr->value()); |
| 1778 if (load_keyed->UsesMustHandleHole() && |
| 1779 load_keyed->hole_mode() == NEVER_RETURN_HOLE) { |
| 1780 res = AssignEnvironment(res); |
| 1781 } |
| 1782 } |
1776 } else { | 1783 } else { |
1777 value = UseRegister(instr->value()); | 1784 value = UseRegister(instr->value()); |
1778 LOperand* temp1 = TempRegister(); | 1785 LOperand* temp1 = TempRegister(); |
1779 LOperand* temp2 = instr->CanTruncateToInt32() ? TempRegister() | 1786 LOperand* temp2 = instr->CanTruncateToInt32() ? TempRegister() |
1780 : NULL; | 1787 : NULL; |
1781 LOperand* temp3 = FixedTemp(f22); | 1788 LOperand* temp3 = FixedTemp(f22); |
1782 res = DefineSameAsFirst(new(zone()) LTaggedToI(value, | 1789 res = DefineSameAsFirst(new(zone()) LTaggedToI(value, |
1783 temp1, | 1790 temp1, |
1784 temp2, | 1791 temp2, |
1785 temp3)); | 1792 temp3)); |
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2483 | 2490 |
2484 | 2491 |
2485 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2492 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2486 LOperand* object = UseRegister(instr->object()); | 2493 LOperand* object = UseRegister(instr->object()); |
2487 LOperand* index = UseRegister(instr->index()); | 2494 LOperand* index = UseRegister(instr->index()); |
2488 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2495 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2489 } | 2496 } |
2490 | 2497 |
2491 | 2498 |
2492 } } // namespace v8::internal | 2499 } } // namespace v8::internal |
OLD | NEW |