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 1780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1791 LOperand* global_object = UseFixed(instr->global_object(), r1); | 1791 LOperand* global_object = UseFixed(instr->global_object(), r1); |
1792 LOperand* value = UseFixed(instr->value(), r0); | 1792 LOperand* value = UseFixed(instr->value(), r0); |
1793 LStoreGlobalGeneric* result = | 1793 LStoreGlobalGeneric* result = |
1794 new LStoreGlobalGeneric(global_object, value); | 1794 new LStoreGlobalGeneric(global_object, value); |
1795 return MarkAsCall(result, instr); | 1795 return MarkAsCall(result, instr); |
1796 } | 1796 } |
1797 | 1797 |
1798 | 1798 |
1799 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { | 1799 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { |
1800 LOperand* context = UseRegisterAtStart(instr->value()); | 1800 LOperand* context = UseRegisterAtStart(instr->value()); |
1801 return DefineAsRegister(new LLoadContextSlot(context)); | 1801 LInstruction* result = DefineAsRegister(new LLoadContextSlot(context)); |
| 1802 return instr->RequiresHoleCheck() ? AssignEnvironment(result) : result; |
1802 } | 1803 } |
1803 | 1804 |
1804 | 1805 |
1805 LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) { | 1806 LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) { |
1806 LOperand* context; | 1807 LOperand* context; |
1807 LOperand* value; | 1808 LOperand* value; |
1808 if (instr->NeedsWriteBarrier()) { | 1809 if (instr->NeedsWriteBarrier()) { |
1809 context = UseTempRegister(instr->context()); | 1810 context = UseTempRegister(instr->context()); |
1810 value = UseTempRegister(instr->value()); | 1811 value = UseTempRegister(instr->value()); |
1811 } else { | 1812 } else { |
1812 context = UseRegister(instr->context()); | 1813 context = UseRegister(instr->context()); |
1813 value = UseRegister(instr->value()); | 1814 value = UseRegister(instr->value()); |
1814 } | 1815 } |
1815 return new LStoreContextSlot(context, value); | 1816 LInstruction* result = new LStoreContextSlot(context, value); |
| 1817 return instr->RequiresHoleCheck() ? AssignEnvironment(result) : result; |
1816 } | 1818 } |
1817 | 1819 |
1818 | 1820 |
1819 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { | 1821 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { |
1820 return DefineAsRegister( | 1822 return DefineAsRegister( |
1821 new LLoadNamedField(UseRegisterAtStart(instr->object()))); | 1823 new LLoadNamedField(UseRegisterAtStart(instr->object()))); |
1822 } | 1824 } |
1823 | 1825 |
1824 | 1826 |
1825 LInstruction* LChunkBuilder::DoLoadNamedFieldPolymorphic( | 1827 LInstruction* LChunkBuilder::DoLoadNamedFieldPolymorphic( |
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2236 | 2238 |
2237 LInstruction* LChunkBuilder::DoIn(HIn* instr) { | 2239 LInstruction* LChunkBuilder::DoIn(HIn* instr) { |
2238 LOperand* key = UseRegisterAtStart(instr->key()); | 2240 LOperand* key = UseRegisterAtStart(instr->key()); |
2239 LOperand* object = UseRegisterAtStart(instr->object()); | 2241 LOperand* object = UseRegisterAtStart(instr->object()); |
2240 LIn* result = new LIn(key, object); | 2242 LIn* result = new LIn(key, object); |
2241 return MarkAsCall(DefineFixed(result, r0), instr); | 2243 return MarkAsCall(DefineFixed(result, r0), instr); |
2242 } | 2244 } |
2243 | 2245 |
2244 | 2246 |
2245 } } // namespace v8::internal | 2247 } } // namespace v8::internal |
OLD | NEW |