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 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
778 : Deoptimizer::EAGER; | 778 : Deoptimizer::EAGER; |
779 Address entry = Deoptimizer::GetDeoptimizationEntry(id, bailout_type); | 779 Address entry = Deoptimizer::GetDeoptimizationEntry(id, bailout_type); |
780 if (entry == NULL) { | 780 if (entry == NULL) { |
781 Abort("bailout was not prepared"); | 781 Abort("bailout was not prepared"); |
782 return; | 782 return; |
783 } | 783 } |
784 | 784 |
785 ASSERT(FLAG_deopt_every_n_times < 2); // Other values not supported on MIPS. | 785 ASSERT(FLAG_deopt_every_n_times < 2); // Other values not supported on MIPS. |
786 | 786 |
787 if (FLAG_deopt_every_n_times == 1 && info_->opt_count() == id) { | 787 if (FLAG_deopt_every_n_times == 1 && info_->opt_count() == id) { |
788 __ Jump(entry, RelocInfo::RUNTIME_ENTRY); | 788 __ Jump(entry, RelocInfo::EXTERNAL_REFERENCE); |
789 return; | 789 return; |
790 } | 790 } |
791 | 791 |
792 if (FLAG_trap_on_deopt) { | 792 if (FLAG_trap_on_deopt) { |
793 Label skip; | 793 Label skip; |
794 if (cc != al) { | 794 if (cc != al) { |
795 __ Branch(&skip, NegateCondition(cc), src1, src2); | 795 __ Branch(&skip, NegateCondition(cc), src1, src2); |
796 } | 796 } |
797 __ stop("trap_on_deopt"); | 797 __ stop("trap_on_deopt"); |
798 __ bind(&skip); | 798 __ bind(&skip); |
799 } | 799 } |
800 | 800 |
801 bool needs_lazy_deopt = info()->IsStub(); | 801 bool needs_lazy_deopt = info()->IsStub(); |
802 ASSERT(info()->IsStub() || frame_is_built_); | 802 ASSERT(info()->IsStub() || frame_is_built_); |
803 if (cc == al && !needs_lazy_deopt) { | 803 if (cc == al && !needs_lazy_deopt) { |
804 __ Jump(entry, RelocInfo::RUNTIME_ENTRY, cc, src1, src2); | 804 __ Jump(entry, RelocInfo::EXTERNAL_REFERENCE, cc, src1, src2); |
805 } else { | 805 } else { |
806 // We often have several deopts to the same entry, reuse the last | 806 // We often have several deopts to the same entry, reuse the last |
807 // jump entry if this is the case. | 807 // jump entry if this is the case. |
808 if (deopt_jump_table_.is_empty() || | 808 if (deopt_jump_table_.is_empty() || |
809 (deopt_jump_table_.last().address != entry) || | 809 (deopt_jump_table_.last().address != entry) || |
810 (deopt_jump_table_.last().is_lazy_deopt != needs_lazy_deopt) || | 810 (deopt_jump_table_.last().is_lazy_deopt != needs_lazy_deopt) || |
811 (deopt_jump_table_.last().needs_frame != !frame_is_built_)) { | 811 (deopt_jump_table_.last().needs_frame != !frame_is_built_)) { |
812 JumpTableEntry table_entry(entry, !frame_is_built_, needs_lazy_deopt); | 812 JumpTableEntry table_entry(entry, !frame_is_built_, needs_lazy_deopt); |
813 deopt_jump_table_.Add(table_entry, zone()); | 813 deopt_jump_table_.Add(table_entry, zone()); |
814 } | 814 } |
(...skipping 4995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5810 __ Subu(scratch, result, scratch); | 5810 __ Subu(scratch, result, scratch); |
5811 __ lw(result, FieldMemOperand(scratch, | 5811 __ lw(result, FieldMemOperand(scratch, |
5812 FixedArray::kHeaderSize - kPointerSize)); | 5812 FixedArray::kHeaderSize - kPointerSize)); |
5813 __ bind(&done); | 5813 __ bind(&done); |
5814 } | 5814 } |
5815 | 5815 |
5816 | 5816 |
5817 #undef __ | 5817 #undef __ |
5818 | 5818 |
5819 } } // namespace v8::internal | 5819 } } // namespace v8::internal |
OLD | NEW |