| 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 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 789 ? Deoptimizer::LAZY | 789 ? Deoptimizer::LAZY |
| 790 : Deoptimizer::EAGER; | 790 : Deoptimizer::EAGER; |
| 791 Address entry = Deoptimizer::GetDeoptimizationEntry(id, bailout_type); | 791 Address entry = Deoptimizer::GetDeoptimizationEntry(id, bailout_type); |
| 792 if (entry == NULL) { | 792 if (entry == NULL) { |
| 793 Abort("bailout was not prepared"); | 793 Abort("bailout was not prepared"); |
| 794 return; | 794 return; |
| 795 } | 795 } |
| 796 | 796 |
| 797 ASSERT(FLAG_deopt_every_n_times < 2); // Other values not supported on MIPS. | 797 ASSERT(FLAG_deopt_every_n_times < 2); // Other values not supported on MIPS. |
| 798 | 798 |
| 799 if (FLAG_deopt_every_n_times == 1 && | 799 if (FLAG_deopt_every_n_times == 1 && info_->opt_count() == id) { |
| 800 info_->shared_info()->opt_count() == id) { | |
| 801 __ Jump(entry, RelocInfo::RUNTIME_ENTRY); | 800 __ Jump(entry, RelocInfo::RUNTIME_ENTRY); |
| 802 return; | 801 return; |
| 803 } | 802 } |
| 804 | 803 |
| 805 if (FLAG_trap_on_deopt) { | 804 if (FLAG_trap_on_deopt) { |
| 806 Label skip; | 805 Label skip; |
| 807 if (cc != al) { | 806 if (cc != al) { |
| 808 __ Branch(&skip, NegateCondition(cc), src1, src2); | 807 __ Branch(&skip, NegateCondition(cc), src1, src2); |
| 809 } | 808 } |
| 810 __ stop("trap_on_deopt"); | 809 __ stop("trap_on_deopt"); |
| (...skipping 3390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4201 } | 4200 } |
| 4202 | 4201 |
| 4203 | 4202 |
| 4204 void LCodeGen::DoTransitionElementsKind(LTransitionElementsKind* instr) { | 4203 void LCodeGen::DoTransitionElementsKind(LTransitionElementsKind* instr) { |
| 4205 Register object_reg = ToRegister(instr->object()); | 4204 Register object_reg = ToRegister(instr->object()); |
| 4206 Register new_map_reg = ToRegister(instr->new_map_temp()); | 4205 Register new_map_reg = ToRegister(instr->new_map_temp()); |
| 4207 Register scratch = scratch0(); | 4206 Register scratch = scratch0(); |
| 4208 | 4207 |
| 4209 Handle<Map> from_map = instr->original_map(); | 4208 Handle<Map> from_map = instr->original_map(); |
| 4210 Handle<Map> to_map = instr->transitioned_map(); | 4209 Handle<Map> to_map = instr->transitioned_map(); |
| 4211 ElementsKind from_kind = from_map->elements_kind(); | 4210 ElementsKind from_kind = instr->from_kind(); |
| 4212 ElementsKind to_kind = to_map->elements_kind(); | 4211 ElementsKind to_kind = instr->to_kind(); |
| 4213 | 4212 |
| 4214 __ mov(ToRegister(instr->result()), object_reg); | 4213 __ mov(ToRegister(instr->result()), object_reg); |
| 4215 | 4214 |
| 4216 Label not_applicable; | 4215 Label not_applicable; |
| 4217 __ lw(scratch, FieldMemOperand(object_reg, HeapObject::kMapOffset)); | 4216 __ lw(scratch, FieldMemOperand(object_reg, HeapObject::kMapOffset)); |
| 4218 __ Branch(¬_applicable, ne, scratch, Operand(from_map)); | 4217 __ Branch(¬_applicable, ne, scratch, Operand(from_map)); |
| 4219 | 4218 |
| 4220 __ li(new_map_reg, Operand(to_map)); | 4219 __ li(new_map_reg, Operand(to_map)); |
| 4221 if (IsSimpleMapChangeTransition(from_kind, to_kind)) { | 4220 if (IsSimpleMapChangeTransition(from_kind, to_kind)) { |
| 4222 __ sw(new_map_reg, FieldMemOperand(object_reg, HeapObject::kMapOffset)); | 4221 __ sw(new_map_reg, FieldMemOperand(object_reg, HeapObject::kMapOffset)); |
| (...skipping 1600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5823 __ Subu(scratch, result, scratch); | 5822 __ Subu(scratch, result, scratch); |
| 5824 __ lw(result, FieldMemOperand(scratch, | 5823 __ lw(result, FieldMemOperand(scratch, |
| 5825 FixedArray::kHeaderSize - kPointerSize)); | 5824 FixedArray::kHeaderSize - kPointerSize)); |
| 5826 __ bind(&done); | 5825 __ bind(&done); |
| 5827 } | 5826 } |
| 5828 | 5827 |
| 5829 | 5828 |
| 5830 #undef __ | 5829 #undef __ |
| 5831 | 5830 |
| 5832 } } // namespace v8::internal | 5831 } } // namespace v8::internal |
| OLD | NEW |