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 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); | 610 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); |
611 ASSERT(environment->HasBeenRegistered()); | 611 ASSERT(environment->HasBeenRegistered()); |
612 int id = environment->deoptimization_index(); | 612 int id = environment->deoptimization_index(); |
613 Address entry = Deoptimizer::GetDeoptimizationEntry(id, Deoptimizer::EAGER); | 613 Address entry = Deoptimizer::GetDeoptimizationEntry(id, Deoptimizer::EAGER); |
614 if (entry == NULL) { | 614 if (entry == NULL) { |
615 Abort("bailout was not prepared"); | 615 Abort("bailout was not prepared"); |
616 return; | 616 return; |
617 } | 617 } |
618 | 618 |
619 if (cc == no_condition) { | 619 if (cc == no_condition) { |
620 __ Jump(entry, RelocInfo::RUNTIME_ENTRY); | 620 if (FLAG_disable_direct_deopt) { |
| 621 __ Jump(entry, RelocInfo::RUNTIME_ENTRY); |
| 622 } else { |
| 623 __ jmp(entry, RelocInfo::DEOPT_ENTRY); |
| 624 } |
621 } else { | 625 } else { |
622 // We often have several deopts to the same entry, reuse the last | 626 if (FLAG_disable_direct_deopt) { |
623 // jump entry if this is the case. | 627 // We often have several deopts to the same entry, reuse the last |
624 if (jump_table_.is_empty() || | 628 // jump entry if this is the case. |
625 jump_table_.last().address != entry) { | 629 if (jump_table_.is_empty() || |
626 jump_table_.Add(JumpTableEntry(entry), zone()); | 630 jump_table_.last().address != entry) { |
| 631 jump_table_.Add(JumpTableEntry(entry), zone()); |
| 632 } |
| 633 __ j(cc, &jump_table_.last().label); |
| 634 } else { |
| 635 __ j(cc, entry, RelocInfo::DEOPT_ENTRY); |
627 } | 636 } |
628 __ j(cc, &jump_table_.last().label); | |
629 } | 637 } |
630 } | 638 } |
631 | 639 |
632 | 640 |
633 void LCodeGen::PopulateDeoptimizationData(Handle<Code> code) { | 641 void LCodeGen::PopulateDeoptimizationData(Handle<Code> code) { |
634 int length = deoptimizations_.length(); | 642 int length = deoptimizations_.length(); |
635 if (length == 0) return; | 643 if (length == 0) return; |
636 Handle<DeoptimizationInputData> data = | 644 Handle<DeoptimizationInputData> data = |
637 factory()->NewDeoptimizationInputData(length, TENURED); | 645 factory()->NewDeoptimizationInputData(length, TENURED); |
638 | 646 |
(...skipping 4785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5424 FixedArray::kHeaderSize - kPointerSize)); | 5432 FixedArray::kHeaderSize - kPointerSize)); |
5425 __ bind(&done); | 5433 __ bind(&done); |
5426 } | 5434 } |
5427 | 5435 |
5428 | 5436 |
5429 #undef __ | 5437 #undef __ |
5430 | 5438 |
5431 } } // namespace v8::internal | 5439 } } // namespace v8::internal |
5432 | 5440 |
5433 #endif // V8_TARGET_ARCH_X64 | 5441 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |