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 1627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1638 | 1638 |
1639 LInstruction* LChunkBuilder::DoLoadGlobal(HLoadGlobal* instr) { | 1639 LInstruction* LChunkBuilder::DoLoadGlobal(HLoadGlobal* instr) { |
1640 LLoadGlobal* result = new LLoadGlobal; | 1640 LLoadGlobal* result = new LLoadGlobal; |
1641 return instr->check_hole_value() | 1641 return instr->check_hole_value() |
1642 ? AssignEnvironment(DefineAsRegister(result)) | 1642 ? AssignEnvironment(DefineAsRegister(result)) |
1643 : DefineAsRegister(result); | 1643 : DefineAsRegister(result); |
1644 } | 1644 } |
1645 | 1645 |
1646 | 1646 |
1647 LInstruction* LChunkBuilder::DoStoreGlobal(HStoreGlobal* instr) { | 1647 LInstruction* LChunkBuilder::DoStoreGlobal(HStoreGlobal* instr) { |
1648 return new LStoreGlobal(UseRegisterAtStart(instr->value())); | 1648 LStoreGlobal* result = new LStoreGlobal(UseRegisterAtStart(instr->value())); |
| 1649 return instr->check_hole_value() ? AssignEnvironment(result) : result; |
1649 } | 1650 } |
1650 | 1651 |
1651 | 1652 |
1652 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { | 1653 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { |
1653 return DefineAsRegister(new LLoadContextSlot); | 1654 return DefineAsRegister(new LLoadContextSlot); |
1654 } | 1655 } |
1655 | 1656 |
1656 | 1657 |
1657 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { | 1658 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { |
1658 ASSERT(instr->representation().IsTagged()); | 1659 ASSERT(instr->representation().IsTagged()); |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1908 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 1909 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
1909 HEnvironment* outer = current_block_->last_environment()->outer(); | 1910 HEnvironment* outer = current_block_->last_environment()->outer(); |
1910 current_block_->UpdateEnvironment(outer); | 1911 current_block_->UpdateEnvironment(outer); |
1911 return NULL; | 1912 return NULL; |
1912 } | 1913 } |
1913 | 1914 |
1914 | 1915 |
1915 } } // namespace v8::internal | 1916 } } // namespace v8::internal |
1916 | 1917 |
1917 #endif // V8_TARGET_ARCH_IA32 | 1918 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |