| 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 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1258 LOperand* constructor = UseFixed(instr->constructor(), edi); | 1258 LOperand* constructor = UseFixed(instr->constructor(), edi); |
| 1259 LCallNewArray* result = new(zone()) LCallNewArray(context, constructor); | 1259 LCallNewArray* result = new(zone()) LCallNewArray(context, constructor); |
| 1260 return MarkAsCall(DefineFixed(result, eax), instr); | 1260 return MarkAsCall(DefineFixed(result, eax), instr); |
| 1261 } | 1261 } |
| 1262 | 1262 |
| 1263 | 1263 |
| 1264 LInstruction* LChunkBuilder::DoCallFunction(HCallFunction* instr) { | 1264 LInstruction* LChunkBuilder::DoCallFunction(HCallFunction* instr) { |
| 1265 LOperand* context = UseFixed(instr->context(), esi); | 1265 LOperand* context = UseFixed(instr->context(), esi); |
| 1266 LOperand* function = UseFixed(instr->function(), edi); | 1266 LOperand* function = UseFixed(instr->function(), edi); |
| 1267 LCallFunction* call = new(zone()) LCallFunction(context, function); | 1267 LCallFunction* call = new(zone()) LCallFunction(context, function); |
| 1268 LInstruction* result = DefineFixed(call, eax); | 1268 return MarkAsCall(DefineFixed(call, eax), instr); |
| 1269 if (instr->IsTailCall()) return result; | |
| 1270 return MarkAsCall(result, instr); | |
| 1271 } | 1269 } |
| 1272 | 1270 |
| 1273 | 1271 |
| 1274 LInstruction* LChunkBuilder::DoCallRuntime(HCallRuntime* instr) { | 1272 LInstruction* LChunkBuilder::DoCallRuntime(HCallRuntime* instr) { |
| 1275 LOperand* context = UseFixed(instr->context(), esi); | 1273 LOperand* context = UseFixed(instr->context(), esi); |
| 1276 return MarkAsCall(DefineFixed(new(zone()) LCallRuntime(context), eax), instr); | 1274 return MarkAsCall(DefineFixed(new(zone()) LCallRuntime(context), eax), instr); |
| 1277 } | 1275 } |
| 1278 | 1276 |
| 1279 | 1277 |
| 1280 LInstruction* LChunkBuilder::DoRor(HRor* instr) { | 1278 LInstruction* LChunkBuilder::DoRor(HRor* instr) { |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1690 TempRegister()); | 1688 TempRegister()); |
| 1691 } | 1689 } |
| 1692 | 1690 |
| 1693 | 1691 |
| 1694 LInstruction* LChunkBuilder::DoMapEnumLength(HMapEnumLength* instr) { | 1692 LInstruction* LChunkBuilder::DoMapEnumLength(HMapEnumLength* instr) { |
| 1695 LOperand* map = UseRegisterAtStart(instr->value()); | 1693 LOperand* map = UseRegisterAtStart(instr->value()); |
| 1696 return DefineAsRegister(new(zone()) LMapEnumLength(map)); | 1694 return DefineAsRegister(new(zone()) LMapEnumLength(map)); |
| 1697 } | 1695 } |
| 1698 | 1696 |
| 1699 | 1697 |
| 1700 LInstruction* LChunkBuilder::DoElementsKind(HElementsKind* instr) { | |
| 1701 LOperand* object = UseRegisterAtStart(instr->value()); | |
| 1702 return DefineAsRegister(new(zone()) LElementsKind(object)); | |
| 1703 } | |
| 1704 | |
| 1705 | |
| 1706 LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) { | |
| 1707 LOperand* object = UseRegister(instr->value()); | |
| 1708 LValueOf* result = new(zone()) LValueOf(object, TempRegister()); | |
| 1709 return DefineSameAsFirst(result); | |
| 1710 } | |
| 1711 | |
| 1712 | |
| 1713 LInstruction* LChunkBuilder::DoDateField(HDateField* instr) { | 1698 LInstruction* LChunkBuilder::DoDateField(HDateField* instr) { |
| 1714 LOperand* date = UseFixed(instr->value(), eax); | 1699 LOperand* date = UseFixed(instr->value(), eax); |
| 1715 LDateField* result = | 1700 LDateField* result = |
| 1716 new(zone()) LDateField(date, FixedTemp(ecx), instr->index()); | 1701 new(zone()) LDateField(date, FixedTemp(ecx), instr->index()); |
| 1717 return MarkAsCall(DefineFixed(result, eax), instr, CAN_DEOPTIMIZE_EAGERLY); | 1702 return MarkAsCall(DefineFixed(result, eax), instr, CAN_DEOPTIMIZE_EAGERLY); |
| 1718 } | 1703 } |
| 1719 | 1704 |
| 1720 | 1705 |
| 1721 LInstruction* LChunkBuilder::DoSeqStringGetChar(HSeqStringGetChar* instr) { | 1706 LInstruction* LChunkBuilder::DoSeqStringGetChar(HSeqStringGetChar* instr) { |
| 1722 LOperand* string = UseRegisterAtStart(instr->string()); | 1707 LOperand* string = UseRegisterAtStart(instr->string()); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1772 } | 1757 } |
| 1773 | 1758 |
| 1774 | 1759 |
| 1775 LInstruction* LChunkBuilder::DoAbnormalExit(HAbnormalExit* instr) { | 1760 LInstruction* LChunkBuilder::DoAbnormalExit(HAbnormalExit* instr) { |
| 1776 // The control instruction marking the end of a block that completed | 1761 // The control instruction marking the end of a block that completed |
| 1777 // abruptly (e.g., threw an exception). There is nothing specific to do. | 1762 // abruptly (e.g., threw an exception). There is nothing specific to do. |
| 1778 return NULL; | 1763 return NULL; |
| 1779 } | 1764 } |
| 1780 | 1765 |
| 1781 | 1766 |
| 1782 LInstruction* LChunkBuilder::DoThrow(HThrow* instr) { | |
| 1783 LOperand* context = UseFixed(instr->context(), esi); | |
| 1784 LOperand* value = UseFixed(instr->value(), eax); | |
| 1785 return MarkAsCall(new(zone()) LThrow(context, value), instr); | |
| 1786 } | |
| 1787 | |
| 1788 | |
| 1789 LInstruction* LChunkBuilder::DoUseConst(HUseConst* instr) { | 1767 LInstruction* LChunkBuilder::DoUseConst(HUseConst* instr) { |
| 1790 return NULL; | 1768 return NULL; |
| 1791 } | 1769 } |
| 1792 | 1770 |
| 1793 | 1771 |
| 1794 LInstruction* LChunkBuilder::DoForceRepresentation(HForceRepresentation* bad) { | 1772 LInstruction* LChunkBuilder::DoForceRepresentation(HForceRepresentation* bad) { |
| 1795 // All HForceRepresentation instructions should be eliminated in the | 1773 // All HForceRepresentation instructions should be eliminated in the |
| 1796 // representation change phase of Hydrogen. | 1774 // representation change phase of Hydrogen. |
| 1797 UNREACHABLE(); | 1775 UNREACHABLE(); |
| 1798 return NULL; | 1776 return NULL; |
| (...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2601 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2579 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2602 LOperand* object = UseRegister(instr->object()); | 2580 LOperand* object = UseRegister(instr->object()); |
| 2603 LOperand* index = UseTempRegister(instr->index()); | 2581 LOperand* index = UseTempRegister(instr->index()); |
| 2604 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2582 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
| 2605 } | 2583 } |
| 2606 | 2584 |
| 2607 | 2585 |
| 2608 } } // namespace v8::internal | 2586 } } // namespace v8::internal |
| 2609 | 2587 |
| 2610 #endif // V8_TARGET_ARCH_IA32 | 2588 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |