| 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 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 811 ? Deoptimizer::LAZY | 811 ? Deoptimizer::LAZY |
| 812 : Deoptimizer::EAGER; | 812 : Deoptimizer::EAGER; |
| 813 Address entry = Deoptimizer::GetDeoptimizationEntry(id, bailout_type); | 813 Address entry = Deoptimizer::GetDeoptimizationEntry(id, bailout_type); |
| 814 if (entry == NULL) { | 814 if (entry == NULL) { |
| 815 Abort("bailout was not prepared"); | 815 Abort("bailout was not prepared"); |
| 816 return; | 816 return; |
| 817 } | 817 } |
| 818 | 818 |
| 819 ASSERT(FLAG_deopt_every_n_times < 2); // Other values not supported on ARM. | 819 ASSERT(FLAG_deopt_every_n_times < 2); // Other values not supported on ARM. |
| 820 | 820 |
| 821 if (FLAG_deopt_every_n_times == 1 && | 821 if (FLAG_deopt_every_n_times == 1 && info_->opt_count() == id) { |
| 822 info_->shared_info()->opt_count() == id) { | |
| 823 __ Jump(entry, RelocInfo::RUNTIME_ENTRY); | 822 __ Jump(entry, RelocInfo::RUNTIME_ENTRY); |
| 824 return; | 823 return; |
| 825 } | 824 } |
| 826 | 825 |
| 827 if (FLAG_trap_on_deopt) __ stop("trap_on_deopt", cc); | 826 if (FLAG_trap_on_deopt) __ stop("trap_on_deopt", cc); |
| 828 | 827 |
| 829 bool needs_lazy_deopt = info()->IsStub(); | 828 bool needs_lazy_deopt = info()->IsStub(); |
| 830 ASSERT(info()->IsStub() || frame_is_built_); | 829 ASSERT(info()->IsStub() || frame_is_built_); |
| 831 if (cc == al && !needs_lazy_deopt) { | 830 if (cc == al && !needs_lazy_deopt) { |
| 832 __ Jump(entry, RelocInfo::RUNTIME_ENTRY); | 831 __ Jump(entry, RelocInfo::RUNTIME_ENTRY); |
| (...skipping 3668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4501 } | 4500 } |
| 4502 | 4501 |
| 4503 | 4502 |
| 4504 void LCodeGen::DoTransitionElementsKind(LTransitionElementsKind* instr) { | 4503 void LCodeGen::DoTransitionElementsKind(LTransitionElementsKind* instr) { |
| 4505 Register object_reg = ToRegister(instr->object()); | 4504 Register object_reg = ToRegister(instr->object()); |
| 4506 Register new_map_reg = ToRegister(instr->new_map_temp()); | 4505 Register new_map_reg = ToRegister(instr->new_map_temp()); |
| 4507 Register scratch = scratch0(); | 4506 Register scratch = scratch0(); |
| 4508 | 4507 |
| 4509 Handle<Map> from_map = instr->original_map(); | 4508 Handle<Map> from_map = instr->original_map(); |
| 4510 Handle<Map> to_map = instr->transitioned_map(); | 4509 Handle<Map> to_map = instr->transitioned_map(); |
| 4511 ElementsKind from_kind = from_map->elements_kind(); | 4510 ElementsKind from_kind = instr->from_kind(); |
| 4512 ElementsKind to_kind = to_map->elements_kind(); | 4511 ElementsKind to_kind = instr->to_kind(); |
| 4513 | 4512 |
| 4514 Label not_applicable; | 4513 Label not_applicable; |
| 4515 __ ldr(scratch, FieldMemOperand(object_reg, HeapObject::kMapOffset)); | 4514 __ ldr(scratch, FieldMemOperand(object_reg, HeapObject::kMapOffset)); |
| 4516 __ cmp(scratch, Operand(from_map)); | 4515 __ cmp(scratch, Operand(from_map)); |
| 4517 __ b(ne, ¬_applicable); | 4516 __ b(ne, ¬_applicable); |
| 4518 __ mov(new_map_reg, Operand(to_map)); | 4517 __ mov(new_map_reg, Operand(to_map)); |
| 4519 | 4518 |
| 4520 if (IsSimpleMapChangeTransition(from_kind, to_kind)) { | 4519 if (IsSimpleMapChangeTransition(from_kind, to_kind)) { |
| 4521 __ str(new_map_reg, FieldMemOperand(object_reg, HeapObject::kMapOffset)); | 4520 __ str(new_map_reg, FieldMemOperand(object_reg, HeapObject::kMapOffset)); |
| 4522 // Write barrier. | 4521 // Write barrier. |
| (...skipping 1578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6101 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); | 6100 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); |
| 6102 __ ldr(result, FieldMemOperand(scratch, | 6101 __ ldr(result, FieldMemOperand(scratch, |
| 6103 FixedArray::kHeaderSize - kPointerSize)); | 6102 FixedArray::kHeaderSize - kPointerSize)); |
| 6104 __ bind(&done); | 6103 __ bind(&done); |
| 6105 } | 6104 } |
| 6106 | 6105 |
| 6107 | 6106 |
| 6108 #undef __ | 6107 #undef __ |
| 6109 | 6108 |
| 6110 } } // namespace v8::internal | 6109 } } // namespace v8::internal |
| OLD | NEW |