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 1764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1775 | 1775 |
1776 | 1776 |
1777 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { | 1777 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { |
1778 LOperand* global_object = UseFixed(instr->global_object(), a0); | 1778 LOperand* global_object = UseFixed(instr->global_object(), a0); |
1779 LLoadGlobalGeneric* result = new LLoadGlobalGeneric(global_object); | 1779 LLoadGlobalGeneric* result = new LLoadGlobalGeneric(global_object); |
1780 return MarkAsCall(DefineFixed(result, v0), instr); | 1780 return MarkAsCall(DefineFixed(result, v0), instr); |
1781 } | 1781 } |
1782 | 1782 |
1783 | 1783 |
1784 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { | 1784 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { |
1785 LOperand* temp = TempRegister(); | 1785 LOperand* value = UseRegister(instr->value()); |
1786 LOperand* value = UseTempRegister(instr->value()); | 1786 // Use a temp to check the value in the cell in the case where we perform |
1787 LInstruction* result = new LStoreGlobalCell(value, temp); | 1787 // a hole check. |
1788 if (instr->RequiresHoleCheck()) result = AssignEnvironment(result); | 1788 return instr->RequiresHoleCheck() |
1789 return result; | 1789 ? AssignEnvironment(new LStoreGlobalCell(value, TempRegister())) |
| 1790 : new LStoreGlobalCell(value, NULL); |
1790 } | 1791 } |
1791 | 1792 |
1792 | 1793 |
1793 LInstruction* LChunkBuilder::DoStoreGlobalGeneric(HStoreGlobalGeneric* instr) { | 1794 LInstruction* LChunkBuilder::DoStoreGlobalGeneric(HStoreGlobalGeneric* instr) { |
1794 LOperand* global_object = UseFixed(instr->global_object(), a1); | 1795 LOperand* global_object = UseFixed(instr->global_object(), a1); |
1795 LOperand* value = UseFixed(instr->value(), a0); | 1796 LOperand* value = UseFixed(instr->value(), a0); |
1796 LStoreGlobalGeneric* result = | 1797 LStoreGlobalGeneric* result = |
1797 new LStoreGlobalGeneric(global_object, value); | 1798 new LStoreGlobalGeneric(global_object, value); |
1798 return MarkAsCall(result, instr); | 1799 return MarkAsCall(result, instr); |
1799 } | 1800 } |
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2241 | 2242 |
2242 LInstruction* LChunkBuilder::DoIn(HIn* instr) { | 2243 LInstruction* LChunkBuilder::DoIn(HIn* instr) { |
2243 LOperand* key = UseRegisterAtStart(instr->key()); | 2244 LOperand* key = UseRegisterAtStart(instr->key()); |
2244 LOperand* object = UseRegisterAtStart(instr->object()); | 2245 LOperand* object = UseRegisterAtStart(instr->object()); |
2245 LIn* result = new LIn(key, object); | 2246 LIn* result = new LIn(key, object); |
2246 return MarkAsCall(DefineFixed(result, v0), instr); | 2247 return MarkAsCall(DefineFixed(result, v0), instr); |
2247 } | 2248 } |
2248 | 2249 |
2249 | 2250 |
2250 } } // namespace v8::internal | 2251 } } // namespace v8::internal |
OLD | NEW |