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 1890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1901 __ mov(result, Operand::Cell(instr->hydrogen()->cell())); | 1901 __ mov(result, Operand::Cell(instr->hydrogen()->cell())); |
1902 if (instr->hydrogen()->check_hole_value()) { | 1902 if (instr->hydrogen()->check_hole_value()) { |
1903 __ cmp(result, Factory::the_hole_value()); | 1903 __ cmp(result, Factory::the_hole_value()); |
1904 DeoptimizeIf(equal, instr->environment()); | 1904 DeoptimizeIf(equal, instr->environment()); |
1905 } | 1905 } |
1906 } | 1906 } |
1907 | 1907 |
1908 | 1908 |
1909 void LCodeGen::DoStoreGlobal(LStoreGlobal* instr) { | 1909 void LCodeGen::DoStoreGlobal(LStoreGlobal* instr) { |
1910 Register value = ToRegister(instr->InputAt(0)); | 1910 Register value = ToRegister(instr->InputAt(0)); |
1911 __ mov(Operand::Cell(instr->hydrogen()->cell()), value); | 1911 Operand cell_operand = Operand::Cell(instr->hydrogen()->cell()); |
| 1912 |
| 1913 // If the cell we are storing to contains the hole it could have |
| 1914 // been deleted from the property dictionary. In that case, we need |
| 1915 // to update the property details in the property dictionary to mark |
| 1916 // it as no longer deleted. We deoptimize in that case. |
| 1917 __ cmp(cell_operand, Factory::the_hole_value()); |
| 1918 DeoptimizeIf(equal, instr->environment()); |
| 1919 |
| 1920 // Store the value. |
| 1921 __ mov(cell_operand, value); |
1912 } | 1922 } |
1913 | 1923 |
1914 | 1924 |
1915 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { | 1925 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { |
1916 // TODO(antonm): load a context with a separate instruction. | 1926 // TODO(antonm): load a context with a separate instruction. |
1917 Register result = ToRegister(instr->result()); | 1927 Register result = ToRegister(instr->result()); |
1918 __ LoadContext(result, instr->context_chain_length()); | 1928 __ LoadContext(result, instr->context_chain_length()); |
1919 __ mov(result, ContextOperand(result, instr->slot_index())); | 1929 __ mov(result, ContextOperand(result, instr->slot_index())); |
1920 } | 1930 } |
1921 | 1931 |
(...skipping 1674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3596 ASSERT(osr_pc_offset_ == -1); | 3606 ASSERT(osr_pc_offset_ == -1); |
3597 osr_pc_offset_ = masm()->pc_offset(); | 3607 osr_pc_offset_ = masm()->pc_offset(); |
3598 } | 3608 } |
3599 | 3609 |
3600 | 3610 |
3601 #undef __ | 3611 #undef __ |
3602 | 3612 |
3603 } } // namespace v8::internal | 3613 } } // namespace v8::internal |
3604 | 3614 |
3605 #endif // V8_TARGET_ARCH_IA32 | 3615 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |