| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 838 Address entry = deopt_jump_table_[i].address; | 838 Address entry = deopt_jump_table_[i].address; |
| 839 Deoptimizer::BailoutType type = deopt_jump_table_[i].bailout_type; | 839 Deoptimizer::BailoutType type = deopt_jump_table_[i].bailout_type; |
| 840 int id = Deoptimizer::GetDeoptimizationId(isolate(), entry, type); | 840 int id = Deoptimizer::GetDeoptimizationId(isolate(), entry, type); |
| 841 if (id == Deoptimizer::kNotDeoptimizationEntry) { | 841 if (id == Deoptimizer::kNotDeoptimizationEntry) { |
| 842 Comment(";;; jump table entry %d.", i); | 842 Comment(";;; jump table entry %d.", i); |
| 843 } else { | 843 } else { |
| 844 Comment(";;; jump table entry %d: deoptimization bailout %d.", i, id); | 844 Comment(";;; jump table entry %d: deoptimization bailout %d.", i, id); |
| 845 } | 845 } |
| 846 if (deopt_jump_table_[i].needs_frame) { | 846 if (deopt_jump_table_[i].needs_frame) { |
| 847 ASSERT(!info()->saves_caller_doubles()); | 847 ASSERT(!info()->saves_caller_doubles()); |
| 848 __ Mov(__ Tmp0(), Operand(ExternalReference::ForDeoptEntry(entry))); | 848 |
| 849 UseScratchRegisterScope temps(masm()); |
| 850 Register stub_deopt_entry = temps.AcquireX(); |
| 851 Register stub_marker = temps.AcquireX(); |
| 852 |
| 853 __ Mov(stub_deopt_entry, |
| 854 Operand(ExternalReference::ForDeoptEntry(entry))); |
| 849 if (needs_frame.is_bound()) { | 855 if (needs_frame.is_bound()) { |
| 850 __ B(&needs_frame); | 856 __ B(&needs_frame); |
| 851 } else { | 857 } else { |
| 852 __ Bind(&needs_frame); | 858 __ Bind(&needs_frame); |
| 853 // This variant of deopt can only be used with stubs. Since we don't | 859 // This variant of deopt can only be used with stubs. Since we don't |
| 854 // have a function pointer to install in the stack frame that we're | 860 // have a function pointer to install in the stack frame that we're |
| 855 // building, install a special marker there instead. | 861 // building, install a special marker there instead. |
| 856 // TODO(jochen): Revisit the use of TmpX(). | |
| 857 ASSERT(info()->IsStub()); | 862 ASSERT(info()->IsStub()); |
| 858 __ Mov(__ Tmp1(), Operand(Smi::FromInt(StackFrame::STUB))); | 863 __ Mov(stub_marker, Operand(Smi::FromInt(StackFrame::STUB))); |
| 859 __ Push(lr, fp, cp, __ Tmp1()); | 864 __ Push(lr, fp, cp, stub_marker); |
| 860 __ Add(fp, __ StackPointer(), 2 * kPointerSize); | 865 __ Add(fp, __ StackPointer(), 2 * kPointerSize); |
| 861 __ Call(__ Tmp0()); | 866 __ Call(stub_deopt_entry); |
| 862 } | 867 } |
| 863 } else { | 868 } else { |
| 864 if (info()->saves_caller_doubles()) { | 869 if (info()->saves_caller_doubles()) { |
| 865 ASSERT(info()->IsStub()); | 870 ASSERT(info()->IsStub()); |
| 866 RestoreCallerDoubles(); | 871 RestoreCallerDoubles(); |
| 867 } | 872 } |
| 868 __ Call(entry, RelocInfo::RUNTIME_ENTRY); | 873 __ Call(entry, RelocInfo::RUNTIME_ENTRY); |
| 869 } | 874 } |
| 870 masm()->CheckConstPool(false, false); | 875 masm()->CheckConstPool(false, false); |
| 871 } | 876 } |
| (...skipping 4960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5832 __ Bind(&out_of_object); | 5837 __ Bind(&out_of_object); |
| 5833 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); | 5838 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); |
| 5834 // Index is equal to negated out of object property index plus 1. | 5839 // Index is equal to negated out of object property index plus 1. |
| 5835 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 5840 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
| 5836 __ Ldr(result, FieldMemOperand(result, | 5841 __ Ldr(result, FieldMemOperand(result, |
| 5837 FixedArray::kHeaderSize - kPointerSize)); | 5842 FixedArray::kHeaderSize - kPointerSize)); |
| 5838 __ Bind(&done); | 5843 __ Bind(&done); |
| 5839 } | 5844 } |
| 5840 | 5845 |
| 5841 } } // namespace v8::internal | 5846 } } // namespace v8::internal |
| OLD | NEW |