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 1896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1907 __ cmp(cell_operand, Factory::the_hole_value()); | 1907 __ cmp(cell_operand, Factory::the_hole_value()); |
1908 DeoptimizeIf(equal, instr->environment()); | 1908 DeoptimizeIf(equal, instr->environment()); |
1909 } | 1909 } |
1910 | 1910 |
1911 // Store the value. | 1911 // Store the value. |
1912 __ mov(cell_operand, value); | 1912 __ mov(cell_operand, value); |
1913 } | 1913 } |
1914 | 1914 |
1915 | 1915 |
1916 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { | 1916 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { |
1917 Register context = ToRegister(instr->InputAt(0)); | 1917 Register context = ToRegister(instr->context()); |
1918 Register result = ToRegister(instr->result()); | 1918 Register result = ToRegister(instr->result()); |
1919 __ mov(result, | 1919 __ mov(result, ContextOperand(context, instr->slot_index())); |
1920 Operand(context, Context::SlotOffset(Context::FCONTEXT_INDEX))); | |
1921 __ mov(result, ContextOperand(result, instr->slot_index())); | |
1922 } | 1920 } |
1923 | 1921 |
1924 | 1922 |
1925 void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) { | 1923 void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) { |
1926 Register context = ToRegister(instr->context()); | 1924 Register context = ToRegister(instr->context()); |
1927 Register value = ToRegister(instr->value()); | 1925 Register value = ToRegister(instr->value()); |
1928 __ mov(context, | |
1929 Operand(context, Context::SlotOffset(Context::FCONTEXT_INDEX))); | |
1930 __ mov(ContextOperand(context, instr->slot_index()), value); | 1926 __ mov(ContextOperand(context, instr->slot_index()), value); |
1931 if (instr->needs_write_barrier()) { | 1927 if (instr->needs_write_barrier()) { |
1932 Register temp = ToRegister(instr->TempAt(0)); | 1928 Register temp = ToRegister(instr->TempAt(0)); |
1933 int offset = Context::SlotOffset(instr->slot_index()); | 1929 int offset = Context::SlotOffset(instr->slot_index()); |
1934 __ RecordWrite(context, offset, value, temp); | 1930 __ RecordWrite(context, offset, value, temp); |
1935 } | 1931 } |
1936 } | 1932 } |
1937 | 1933 |
1938 | 1934 |
1939 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { | 1935 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { |
(...skipping 1698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3638 ASSERT(osr_pc_offset_ == -1); | 3634 ASSERT(osr_pc_offset_ == -1); |
3639 osr_pc_offset_ = masm()->pc_offset(); | 3635 osr_pc_offset_ = masm()->pc_offset(); |
3640 } | 3636 } |
3641 | 3637 |
3642 | 3638 |
3643 #undef __ | 3639 #undef __ |
3644 | 3640 |
3645 } } // namespace v8::internal | 3641 } } // namespace v8::internal |
3646 | 3642 |
3647 #endif // V8_TARGET_ARCH_IA32 | 3643 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |