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 1750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1761 | 1761 |
1762 | 1762 |
1763 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { | 1763 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { |
1764 LOperand* global_object = UseFixed(instr->global_object(), rax); | 1764 LOperand* global_object = UseFixed(instr->global_object(), rax); |
1765 LLoadGlobalGeneric* result = new LLoadGlobalGeneric(global_object); | 1765 LLoadGlobalGeneric* result = new LLoadGlobalGeneric(global_object); |
1766 return MarkAsCall(DefineFixed(result, rax), instr); | 1766 return MarkAsCall(DefineFixed(result, rax), instr); |
1767 } | 1767 } |
1768 | 1768 |
1769 | 1769 |
1770 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { | 1770 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { |
1771 LStoreGlobalCell* result = | 1771 LOperand* value = UseRegister(instr->value()); |
1772 new LStoreGlobalCell(UseTempRegister(instr->value()), | 1772 // Use a temp to avoid reloading the cell value address in the case where |
1773 TempRegister(), | 1773 // we perform a hole check. |
1774 TempRegister()); | 1774 return instr->RequiresHoleCheck() |
1775 return instr->RequiresHoleCheck() ? AssignEnvironment(result) : result; | 1775 ? AssignEnvironment(new LStoreGlobalCell(value, TempRegister())) |
| 1776 : new LStoreGlobalCell(value, NULL); |
1776 } | 1777 } |
1777 | 1778 |
1778 | 1779 |
1779 LInstruction* LChunkBuilder::DoStoreGlobalGeneric(HStoreGlobalGeneric* instr) { | 1780 LInstruction* LChunkBuilder::DoStoreGlobalGeneric(HStoreGlobalGeneric* instr) { |
1780 LOperand* global_object = UseFixed(instr->global_object(), rdx); | 1781 LOperand* global_object = UseFixed(instr->global_object(), rdx); |
1781 LOperand* value = UseFixed(instr->value(), rax); | 1782 LOperand* value = UseFixed(instr->value(), rax); |
1782 LStoreGlobalGeneric* result = new LStoreGlobalGeneric(global_object, value); | 1783 LStoreGlobalGeneric* result = new LStoreGlobalGeneric(global_object, value); |
1783 return MarkAsCall(result, instr); | 1784 return MarkAsCall(result, instr); |
1784 } | 1785 } |
1785 | 1786 |
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2238 LOperand* key = UseOrConstantAtStart(instr->key()); | 2239 LOperand* key = UseOrConstantAtStart(instr->key()); |
2239 LOperand* object = UseOrConstantAtStart(instr->object()); | 2240 LOperand* object = UseOrConstantAtStart(instr->object()); |
2240 LIn* result = new LIn(key, object); | 2241 LIn* result = new LIn(key, object); |
2241 return MarkAsCall(DefineFixed(result, rax), instr); | 2242 return MarkAsCall(DefineFixed(result, rax), instr); |
2242 } | 2243 } |
2243 | 2244 |
2244 | 2245 |
2245 } } // namespace v8::internal | 2246 } } // namespace v8::internal |
2246 | 2247 |
2247 #endif // V8_TARGET_ARCH_X64 | 2248 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |