| 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 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1176 LOperand* constructor = UseFixed(instr->constructor(), r1); | 1176 LOperand* constructor = UseFixed(instr->constructor(), r1); |
| 1177 LCallNewArray* result = new(zone()) LCallNewArray(context, constructor); | 1177 LCallNewArray* result = new(zone()) LCallNewArray(context, constructor); |
| 1178 return MarkAsCall(DefineFixed(result, r0), instr); | 1178 return MarkAsCall(DefineFixed(result, r0), instr); |
| 1179 } | 1179 } |
| 1180 | 1180 |
| 1181 | 1181 |
| 1182 LInstruction* LChunkBuilder::DoCallFunction(HCallFunction* instr) { | 1182 LInstruction* LChunkBuilder::DoCallFunction(HCallFunction* instr) { |
| 1183 LOperand* context = UseFixed(instr->context(), cp); | 1183 LOperand* context = UseFixed(instr->context(), cp); |
| 1184 LOperand* function = UseFixed(instr->function(), r1); | 1184 LOperand* function = UseFixed(instr->function(), r1); |
| 1185 LCallFunction* call = new(zone()) LCallFunction(context, function); | 1185 LCallFunction* call = new(zone()) LCallFunction(context, function); |
| 1186 LInstruction* result = DefineFixed(call, r0); | 1186 return MarkAsCall(DefineFixed(call, r0), instr); |
| 1187 if (instr->IsTailCall()) return result; | |
| 1188 return MarkAsCall(result, instr); | |
| 1189 } | 1187 } |
| 1190 | 1188 |
| 1191 | 1189 |
| 1192 LInstruction* LChunkBuilder::DoCallRuntime(HCallRuntime* instr) { | 1190 LInstruction* LChunkBuilder::DoCallRuntime(HCallRuntime* instr) { |
| 1193 LOperand* context = UseFixed(instr->context(), cp); | 1191 LOperand* context = UseFixed(instr->context(), cp); |
| 1194 return MarkAsCall(DefineFixed(new(zone()) LCallRuntime(context), r0), instr); | 1192 return MarkAsCall(DefineFixed(new(zone()) LCallRuntime(context), r0), instr); |
| 1195 } | 1193 } |
| 1196 | 1194 |
| 1197 | 1195 |
| 1198 LInstruction* LChunkBuilder::DoRor(HRor* instr) { | 1196 LInstruction* LChunkBuilder::DoRor(HRor* instr) { |
| (...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1698 return new(zone()) LClassOfTestAndBranch(value, TempRegister()); | 1696 return new(zone()) LClassOfTestAndBranch(value, TempRegister()); |
| 1699 } | 1697 } |
| 1700 | 1698 |
| 1701 | 1699 |
| 1702 LInstruction* LChunkBuilder::DoMapEnumLength(HMapEnumLength* instr) { | 1700 LInstruction* LChunkBuilder::DoMapEnumLength(HMapEnumLength* instr) { |
| 1703 LOperand* map = UseRegisterAtStart(instr->value()); | 1701 LOperand* map = UseRegisterAtStart(instr->value()); |
| 1704 return DefineAsRegister(new(zone()) LMapEnumLength(map)); | 1702 return DefineAsRegister(new(zone()) LMapEnumLength(map)); |
| 1705 } | 1703 } |
| 1706 | 1704 |
| 1707 | 1705 |
| 1708 LInstruction* LChunkBuilder::DoElementsKind(HElementsKind* instr) { | |
| 1709 LOperand* object = UseRegisterAtStart(instr->value()); | |
| 1710 return DefineAsRegister(new(zone()) LElementsKind(object)); | |
| 1711 } | |
| 1712 | |
| 1713 | |
| 1714 LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) { | |
| 1715 LOperand* object = UseRegister(instr->value()); | |
| 1716 LValueOf* result = new(zone()) LValueOf(object, TempRegister()); | |
| 1717 return DefineAsRegister(result); | |
| 1718 } | |
| 1719 | |
| 1720 | |
| 1721 LInstruction* LChunkBuilder::DoDateField(HDateField* instr) { | 1706 LInstruction* LChunkBuilder::DoDateField(HDateField* instr) { |
| 1722 LOperand* object = UseFixed(instr->value(), r0); | 1707 LOperand* object = UseFixed(instr->value(), r0); |
| 1723 LDateField* result = | 1708 LDateField* result = |
| 1724 new(zone()) LDateField(object, FixedTemp(r1), instr->index()); | 1709 new(zone()) LDateField(object, FixedTemp(r1), instr->index()); |
| 1725 return MarkAsCall(DefineFixed(result, r0), instr, CAN_DEOPTIMIZE_EAGERLY); | 1710 return MarkAsCall(DefineFixed(result, r0), instr, CAN_DEOPTIMIZE_EAGERLY); |
| 1726 } | 1711 } |
| 1727 | 1712 |
| 1728 | 1713 |
| 1729 LInstruction* LChunkBuilder::DoSeqStringGetChar(HSeqStringGetChar* instr) { | 1714 LInstruction* LChunkBuilder::DoSeqStringGetChar(HSeqStringGetChar* instr) { |
| 1730 LOperand* string = UseRegisterAtStart(instr->string()); | 1715 LOperand* string = UseRegisterAtStart(instr->string()); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 1758 } | 1743 } |
| 1759 | 1744 |
| 1760 | 1745 |
| 1761 LInstruction* LChunkBuilder::DoAbnormalExit(HAbnormalExit* instr) { | 1746 LInstruction* LChunkBuilder::DoAbnormalExit(HAbnormalExit* instr) { |
| 1762 // The control instruction marking the end of a block that completed | 1747 // The control instruction marking the end of a block that completed |
| 1763 // abruptly (e.g., threw an exception). There is nothing specific to do. | 1748 // abruptly (e.g., threw an exception). There is nothing specific to do. |
| 1764 return NULL; | 1749 return NULL; |
| 1765 } | 1750 } |
| 1766 | 1751 |
| 1767 | 1752 |
| 1768 LInstruction* LChunkBuilder::DoThrow(HThrow* instr) { | |
| 1769 LOperand* context = UseFixed(instr->context(), cp); | |
| 1770 LOperand* value = UseFixed(instr->value(), r0); | |
| 1771 return MarkAsCall(new(zone()) LThrow(context, value), instr); | |
| 1772 } | |
| 1773 | |
| 1774 | |
| 1775 LInstruction* LChunkBuilder::DoUseConst(HUseConst* instr) { | 1753 LInstruction* LChunkBuilder::DoUseConst(HUseConst* instr) { |
| 1776 return NULL; | 1754 return NULL; |
| 1777 } | 1755 } |
| 1778 | 1756 |
| 1779 | 1757 |
| 1780 LInstruction* LChunkBuilder::DoForceRepresentation(HForceRepresentation* bad) { | 1758 LInstruction* LChunkBuilder::DoForceRepresentation(HForceRepresentation* bad) { |
| 1781 // All HForceRepresentation instructions should be eliminated in the | 1759 // All HForceRepresentation instructions should be eliminated in the |
| 1782 // representation change phase of Hydrogen. | 1760 // representation change phase of Hydrogen. |
| 1783 UNREACHABLE(); | 1761 UNREACHABLE(); |
| 1784 return NULL; | 1762 return NULL; |
| (...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2488 } | 2466 } |
| 2489 | 2467 |
| 2490 | 2468 |
| 2491 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2469 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2492 LOperand* object = UseRegister(instr->object()); | 2470 LOperand* object = UseRegister(instr->object()); |
| 2493 LOperand* index = UseRegister(instr->index()); | 2471 LOperand* index = UseRegister(instr->index()); |
| 2494 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2472 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
| 2495 } | 2473 } |
| 2496 | 2474 |
| 2497 } } // namespace v8::internal | 2475 } } // namespace v8::internal |
| OLD | NEW |