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 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
641 deoptimizations_.Add(environment); | 641 deoptimizations_.Add(environment); |
642 } | 642 } |
643 } | 643 } |
644 | 644 |
645 | 645 |
646 void LCodeGen::DeoptimizeIf(Condition cc, LEnvironment* environment) { | 646 void LCodeGen::DeoptimizeIf(Condition cc, LEnvironment* environment) { |
647 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); | 647 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); |
648 ASSERT(environment->HasBeenRegistered()); | 648 ASSERT(environment->HasBeenRegistered()); |
649 int id = environment->deoptimization_index(); | 649 int id = environment->deoptimization_index(); |
650 Address entry = Deoptimizer::GetDeoptimizationEntry(id, Deoptimizer::EAGER); | 650 Address entry = Deoptimizer::GetDeoptimizationEntry(id, Deoptimizer::EAGER); |
651 ASSERT(entry != NULL); | |
652 if (entry == NULL) { | 651 if (entry == NULL) { |
653 Abort("bailout was not prepared"); | 652 Abort("bailout was not prepared"); |
654 return; | 653 return; |
655 } | 654 } |
656 | 655 |
657 ASSERT(FLAG_deopt_every_n_times < 2); // Other values not supported on ARM. | 656 ASSERT(FLAG_deopt_every_n_times < 2); // Other values not supported on ARM. |
658 | 657 |
659 if (FLAG_deopt_every_n_times == 1 && | 658 if (FLAG_deopt_every_n_times == 1 && |
660 info_->shared_info()->opt_count() == id) { | 659 info_->shared_info()->opt_count() == id) { |
661 __ Jump(entry, RelocInfo::RUNTIME_ENTRY); | 660 __ Jump(entry, RelocInfo::RUNTIME_ENTRY); |
(...skipping 4451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5113 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); | 5112 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); |
5114 __ ldr(result, FieldMemOperand(scratch, | 5113 __ ldr(result, FieldMemOperand(scratch, |
5115 FixedArray::kHeaderSize - kPointerSize)); | 5114 FixedArray::kHeaderSize - kPointerSize)); |
5116 __ bind(&done); | 5115 __ bind(&done); |
5117 } | 5116 } |
5118 | 5117 |
5119 | 5118 |
5120 #undef __ | 5119 #undef __ |
5121 | 5120 |
5122 } } // namespace v8::internal | 5121 } } // namespace v8::internal |
OLD | NEW |