| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1716 return DefineAsRegister(new LConstantD); | 1716 return DefineAsRegister(new LConstantD); |
| 1717 } else if (r.IsTagged()) { | 1717 } else if (r.IsTagged()) { |
| 1718 return DefineAsRegister(new LConstantT); | 1718 return DefineAsRegister(new LConstantT); |
| 1719 } else { | 1719 } else { |
| 1720 UNREACHABLE(); | 1720 UNREACHABLE(); |
| 1721 return NULL; | 1721 return NULL; |
| 1722 } | 1722 } |
| 1723 } | 1723 } |
| 1724 | 1724 |
| 1725 | 1725 |
| 1726 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) { | 1726 LInstruction* LChunkBuilder::DoLoadGlobal(HLoadGlobal* instr) { |
| 1727 LLoadGlobalCell* result = new LLoadGlobalCell; | 1727 LLoadGlobal* result = new LLoadGlobal(); |
| 1728 return instr->check_hole_value() | 1728 return instr->check_hole_value() |
| 1729 ? AssignEnvironment(DefineAsRegister(result)) | 1729 ? AssignEnvironment(DefineAsRegister(result)) |
| 1730 : DefineAsRegister(result); | 1730 : DefineAsRegister(result); |
| 1731 } | 1731 } |
| 1732 | 1732 |
| 1733 | 1733 |
| 1734 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { | 1734 LInstruction* LChunkBuilder::DoStoreGlobal(HStoreGlobal* instr) { |
| 1735 LOperand* global_object = UseFixed(instr->global_object(), r0); | |
| 1736 LLoadGlobalGeneric* result = new LLoadGlobalGeneric(global_object); | |
| 1737 return MarkAsCall(DefineFixed(result, r0), instr); | |
| 1738 } | |
| 1739 | |
| 1740 | |
| 1741 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { | |
| 1742 if (instr->check_hole_value()) { | 1735 if (instr->check_hole_value()) { |
| 1743 LOperand* temp = TempRegister(); | 1736 LOperand* temp = TempRegister(); |
| 1744 LOperand* value = UseRegister(instr->value()); | 1737 LOperand* value = UseRegister(instr->value()); |
| 1745 return AssignEnvironment(new LStoreGlobalCell(value, temp)); | 1738 return AssignEnvironment(new LStoreGlobal(value, temp)); |
| 1746 } else { | 1739 } else { |
| 1747 LOperand* value = UseRegisterAtStart(instr->value()); | 1740 LOperand* value = UseRegisterAtStart(instr->value()); |
| 1748 return new LStoreGlobalCell(value, NULL); | 1741 return new LStoreGlobal(value, NULL); |
| 1749 } | 1742 } |
| 1750 } | 1743 } |
| 1751 | 1744 |
| 1752 | 1745 |
| 1753 LInstruction* LChunkBuilder::DoStoreGlobalGeneric(HStoreGlobalGeneric* instr) { | |
| 1754 LOperand* global_object = UseFixed(instr->global_object(), r1); | |
| 1755 LOperand* value = UseFixed(instr->value(), r0); | |
| 1756 LStoreGlobalGeneric* result = | |
| 1757 new LStoreGlobalGeneric(global_object, value); | |
| 1758 return MarkAsCall(result, instr); | |
| 1759 } | |
| 1760 | |
| 1761 | |
| 1762 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { | 1746 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { |
| 1763 LOperand* context = UseRegisterAtStart(instr->value()); | 1747 LOperand* context = UseRegisterAtStart(instr->value()); |
| 1764 return DefineAsRegister(new LLoadContextSlot(context)); | 1748 return DefineAsRegister(new LLoadContextSlot(context)); |
| 1765 } | 1749 } |
| 1766 | 1750 |
| 1767 | 1751 |
| 1768 LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) { | 1752 LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) { |
| 1769 LOperand* context; | 1753 LOperand* context; |
| 1770 LOperand* value; | 1754 LOperand* value; |
| 1771 if (instr->NeedsWriteBarrier()) { | 1755 if (instr->NeedsWriteBarrier()) { |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2113 | 2097 |
| 2114 | 2098 |
| 2115 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 2099 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
| 2116 HEnvironment* outer = current_block_->last_environment()->outer(); | 2100 HEnvironment* outer = current_block_->last_environment()->outer(); |
| 2117 current_block_->UpdateEnvironment(outer); | 2101 current_block_->UpdateEnvironment(outer); |
| 2118 return NULL; | 2102 return NULL; |
| 2119 } | 2103 } |
| 2120 | 2104 |
| 2121 | 2105 |
| 2122 } } // namespace v8::internal | 2106 } } // namespace v8::internal |
| OLD | NEW |