| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 2787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2798 __ Jump(ra); | 2798 __ Jump(ra); |
| 2799 | 2799 |
| 2800 if (no_frame_start != -1) { | 2800 if (no_frame_start != -1) { |
| 2801 info_->AddNoFrameRange(no_frame_start, masm_->pc_offset()); | 2801 info_->AddNoFrameRange(no_frame_start, masm_->pc_offset()); |
| 2802 } | 2802 } |
| 2803 } | 2803 } |
| 2804 | 2804 |
| 2805 | 2805 |
| 2806 void LCodeGen::DoLoadGlobalCell(LLoadGlobalCell* instr) { | 2806 void LCodeGen::DoLoadGlobalCell(LLoadGlobalCell* instr) { |
| 2807 Register result = ToRegister(instr->result()); | 2807 Register result = ToRegister(instr->result()); |
| 2808 __ li(at, Operand(Handle<Object>(instr->hydrogen()->cell()))); | 2808 __ li(at, Operand(Handle<Object>(instr->hydrogen()->cell().handle()))); |
| 2809 __ lw(result, FieldMemOperand(at, Cell::kValueOffset)); | 2809 __ lw(result, FieldMemOperand(at, Cell::kValueOffset)); |
| 2810 if (instr->hydrogen()->RequiresHoleCheck()) { | 2810 if (instr->hydrogen()->RequiresHoleCheck()) { |
| 2811 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); | 2811 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); |
| 2812 DeoptimizeIf(eq, instr->environment(), result, Operand(at)); | 2812 DeoptimizeIf(eq, instr->environment(), result, Operand(at)); |
| 2813 } | 2813 } |
| 2814 } | 2814 } |
| 2815 | 2815 |
| 2816 | 2816 |
| 2817 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { | 2817 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
| 2818 ASSERT(ToRegister(instr->global_object()).is(a0)); | 2818 ASSERT(ToRegister(instr->global_object()).is(a0)); |
| 2819 ASSERT(ToRegister(instr->result()).is(v0)); | 2819 ASSERT(ToRegister(instr->result()).is(v0)); |
| 2820 | 2820 |
| 2821 __ li(a2, Operand(instr->name())); | 2821 __ li(a2, Operand(instr->name())); |
| 2822 RelocInfo::Mode mode = instr->for_typeof() ? RelocInfo::CODE_TARGET | 2822 RelocInfo::Mode mode = instr->for_typeof() ? RelocInfo::CODE_TARGET |
| 2823 : RelocInfo::CODE_TARGET_CONTEXT; | 2823 : RelocInfo::CODE_TARGET_CONTEXT; |
| 2824 Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize(); | 2824 Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize(); |
| 2825 CallCode(ic, mode, instr); | 2825 CallCode(ic, mode, instr); |
| 2826 } | 2826 } |
| 2827 | 2827 |
| 2828 | 2828 |
| 2829 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { | 2829 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { |
| 2830 Register value = ToRegister(instr->value()); | 2830 Register value = ToRegister(instr->value()); |
| 2831 Register cell = scratch0(); | 2831 Register cell = scratch0(); |
| 2832 | 2832 |
| 2833 // Load the cell. | 2833 // Load the cell. |
| 2834 __ li(cell, Operand(instr->hydrogen()->cell())); | 2834 __ li(cell, Operand(instr->hydrogen()->cell().handle())); |
| 2835 | 2835 |
| 2836 // If the cell we are storing to contains the hole it could have | 2836 // If the cell we are storing to contains the hole it could have |
| 2837 // been deleted from the property dictionary. In that case, we need | 2837 // been deleted from the property dictionary. In that case, we need |
| 2838 // to update the property details in the property dictionary to mark | 2838 // to update the property details in the property dictionary to mark |
| 2839 // it as no longer deleted. | 2839 // it as no longer deleted. |
| 2840 if (instr->hydrogen()->RequiresHoleCheck()) { | 2840 if (instr->hydrogen()->RequiresHoleCheck()) { |
| 2841 // We use a temp to check the payload. | 2841 // We use a temp to check the payload. |
| 2842 Register payload = ToRegister(instr->temp()); | 2842 Register payload = ToRegister(instr->temp()); |
| 2843 __ lw(payload, FieldMemOperand(cell, Cell::kValueOffset)); | 2843 __ lw(payload, FieldMemOperand(cell, Cell::kValueOffset)); |
| 2844 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); | 2844 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); |
| (...skipping 2935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5780 __ Subu(scratch, result, scratch); | 5780 __ Subu(scratch, result, scratch); |
| 5781 __ lw(result, FieldMemOperand(scratch, | 5781 __ lw(result, FieldMemOperand(scratch, |
| 5782 FixedArray::kHeaderSize - kPointerSize)); | 5782 FixedArray::kHeaderSize - kPointerSize)); |
| 5783 __ bind(&done); | 5783 __ bind(&done); |
| 5784 } | 5784 } |
| 5785 | 5785 |
| 5786 | 5786 |
| 5787 #undef __ | 5787 #undef __ |
| 5788 | 5788 |
| 5789 } } // namespace v8::internal | 5789 } } // namespace v8::internal |
| OLD | NEW |