| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved.7 | 1 // Copyright 2012 the V8 project authors. All rights reserved.7 |
| 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 2833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2844 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); | 2844 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); |
| 2845 DeoptimizeIf(eq, instr->environment(), payload, Operand(at)); | 2845 DeoptimizeIf(eq, instr->environment(), payload, Operand(at)); |
| 2846 } | 2846 } |
| 2847 | 2847 |
| 2848 // Store the value. | 2848 // Store the value. |
| 2849 __ sw(value, FieldMemOperand(cell, Cell::kValueOffset)); | 2849 __ sw(value, FieldMemOperand(cell, Cell::kValueOffset)); |
| 2850 // Cells are always rescanned, so no write barrier here. | 2850 // Cells are always rescanned, so no write barrier here. |
| 2851 } | 2851 } |
| 2852 | 2852 |
| 2853 | 2853 |
| 2854 void LCodeGen::DoStoreGlobalGeneric(LStoreGlobalGeneric* instr) { | |
| 2855 ASSERT(ToRegister(instr->context()).is(cp)); | |
| 2856 ASSERT(ToRegister(instr->global_object()).is(a1)); | |
| 2857 ASSERT(ToRegister(instr->value()).is(a0)); | |
| 2858 | |
| 2859 __ li(a2, Operand(instr->name())); | |
| 2860 Handle<Code> ic = StoreIC::initialize_stub(isolate(), | |
| 2861 instr->strict_mode_flag(), | |
| 2862 CONTEXTUAL); | |
| 2863 CallCode(ic, RelocInfo::CODE_TARGET, instr); | |
| 2864 } | |
| 2865 | |
| 2866 | 2854 |
| 2867 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { | 2855 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { |
| 2868 Register context = ToRegister(instr->context()); | 2856 Register context = ToRegister(instr->context()); |
| 2869 Register result = ToRegister(instr->result()); | 2857 Register result = ToRegister(instr->result()); |
| 2870 | 2858 |
| 2871 __ lw(result, ContextOperand(context, instr->slot_index())); | 2859 __ lw(result, ContextOperand(context, instr->slot_index())); |
| 2872 if (instr->hydrogen()->RequiresHoleCheck()) { | 2860 if (instr->hydrogen()->RequiresHoleCheck()) { |
| 2873 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); | 2861 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); |
| 2874 | 2862 |
| 2875 if (instr->hydrogen()->DeoptimizesOnHole()) { | 2863 if (instr->hydrogen()->DeoptimizesOnHole()) { |
| (...skipping 1232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4108 | 4096 |
| 4109 | 4097 |
| 4110 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { | 4098 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { |
| 4111 ASSERT(ToRegister(instr->context()).is(cp)); | 4099 ASSERT(ToRegister(instr->context()).is(cp)); |
| 4112 ASSERT(ToRegister(instr->object()).is(a1)); | 4100 ASSERT(ToRegister(instr->object()).is(a1)); |
| 4113 ASSERT(ToRegister(instr->value()).is(a0)); | 4101 ASSERT(ToRegister(instr->value()).is(a0)); |
| 4114 | 4102 |
| 4115 // Name is always in a2. | 4103 // Name is always in a2. |
| 4116 __ li(a2, Operand(instr->name())); | 4104 __ li(a2, Operand(instr->name())); |
| 4117 Handle<Code> ic = StoreIC::initialize_stub(isolate(), | 4105 Handle<Code> ic = StoreIC::initialize_stub(isolate(), |
| 4118 instr->strict_mode_flag(), | 4106 instr->strict_mode_flag()); |
| 4119 NOT_CONTEXTUAL); | |
| 4120 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 4107 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 4121 } | 4108 } |
| 4122 | 4109 |
| 4123 | 4110 |
| 4124 void LCodeGen::ApplyCheckIf(Condition condition, | 4111 void LCodeGen::ApplyCheckIf(Condition condition, |
| 4125 LBoundsCheck* check, | 4112 LBoundsCheck* check, |
| 4126 Register src1, | 4113 Register src1, |
| 4127 const Operand& src2) { | 4114 const Operand& src2) { |
| 4128 if (FLAG_debug_code && check->hydrogen()->skip_check()) { | 4115 if (FLAG_debug_code && check->hydrogen()->skip_check()) { |
| 4129 Label done; | 4116 Label done; |
| (...skipping 1659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5789 __ Subu(scratch, result, scratch); | 5776 __ Subu(scratch, result, scratch); |
| 5790 __ lw(result, FieldMemOperand(scratch, | 5777 __ lw(result, FieldMemOperand(scratch, |
| 5791 FixedArray::kHeaderSize - kPointerSize)); | 5778 FixedArray::kHeaderSize - kPointerSize)); |
| 5792 __ bind(&done); | 5779 __ bind(&done); |
| 5793 } | 5780 } |
| 5794 | 5781 |
| 5795 | 5782 |
| 5796 #undef __ | 5783 #undef __ |
| 5797 | 5784 |
| 5798 } } // namespace v8::internal | 5785 } } // namespace v8::internal |
| OLD | NEW |