OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // | 2 // |
3 // Redistribution and use in source and binary forms, with or without | 3 // Redistribution and use in source and binary forms, with or without |
4 // modification, are permitted provided that the following conditions are | 4 // modification, are permitted provided that the following conditions are |
5 // met: | 5 // met: |
6 // | 6 // |
7 // * Redistributions of source code must retain the above copyright | 7 // * Redistributions of source code must retain the above copyright |
8 // notice, this list of conditions and the following disclaimer. | 8 // notice, this list of conditions and the following disclaimer. |
9 // * Redistributions in binary form must reproduce the above | 9 // * Redistributions in binary form must reproduce the above |
10 // copyright notice, this list of conditions and the following | 10 // copyright notice, this list of conditions and the following |
(...skipping 2627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2638 RecordComment("[ Veneers"); | 2638 RecordComment("[ Veneers"); |
2639 | 2639 |
2640 // The exact size of the veneer pool must be recorded (see the comment at the | 2640 // The exact size of the veneer pool must be recorded (see the comment at the |
2641 // declaration site of RecordConstPool()), but computing the number of | 2641 // declaration site of RecordConstPool()), but computing the number of |
2642 // veneers that will be generated is not obvious. So instead we remember the | 2642 // veneers that will be generated is not obvious. So instead we remember the |
2643 // current position and will record the size after the pool has been | 2643 // current position and will record the size after the pool has been |
2644 // generated. | 2644 // generated. |
2645 Label size_check; | 2645 Label size_check; |
2646 bind(&size_check); | 2646 bind(&size_check); |
2647 int veneer_pool_relocinfo_loc = pc_offset(); | 2647 int veneer_pool_relocinfo_loc = pc_offset(); |
2648 #ifdef DEBUG | |
2649 byte* reloc_writer_record_pos = reloc_info_writer.pos(); | |
2650 #endif | |
2651 | 2648 |
2652 Label end; | 2649 Label end; |
2653 if (need_protection) { | 2650 if (need_protection) { |
2654 b(&end); | 2651 b(&end); |
2655 } | 2652 } |
2656 | 2653 |
2657 EmitVeneersGuard(); | 2654 EmitVeneersGuard(); |
2658 | 2655 |
2659 Label veneer_size_check; | 2656 Label veneer_size_check; |
2660 | 2657 |
(...skipping 21 matching lines...) Expand all Loading... |
2682 #endif | 2679 #endif |
2683 | 2680 |
2684 it_to_delete = it++; | 2681 it_to_delete = it++; |
2685 unresolved_branches_.erase(it_to_delete); | 2682 unresolved_branches_.erase(it_to_delete); |
2686 } else { | 2683 } else { |
2687 ++it; | 2684 ++it; |
2688 } | 2685 } |
2689 } | 2686 } |
2690 | 2687 |
2691 // Record the veneer pool size. | 2688 // Record the veneer pool size. |
2692 ASSERT(reloc_writer_record_pos == reloc_info_writer.pos()); | |
2693 int pool_size = SizeOfCodeGeneratedSince(&size_check); | 2689 int pool_size = SizeOfCodeGeneratedSince(&size_check); |
2694 RecordVeneerPool(veneer_pool_relocinfo_loc, pool_size); | 2690 RecordVeneerPool(veneer_pool_relocinfo_loc, pool_size); |
2695 | 2691 |
2696 if (unresolved_branches_.empty()) { | 2692 if (unresolved_branches_.empty()) { |
2697 next_veneer_pool_check_ = kMaxInt; | 2693 next_veneer_pool_check_ = kMaxInt; |
2698 } else { | 2694 } else { |
2699 next_veneer_pool_check_ = | 2695 next_veneer_pool_check_ = |
2700 unresolved_branches_first_limit() - kVeneerDistanceCheckMargin; | 2696 unresolved_branches_first_limit() - kVeneerDistanceCheckMargin; |
2701 } | 2697 } |
2702 | 2698 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2768 // code. | 2764 // code. |
2769 #ifdef ENABLE_DEBUGGER_SUPPORT | 2765 #ifdef ENABLE_DEBUGGER_SUPPORT |
2770 RecordRelocInfo(RelocInfo::CONST_POOL, static_cast<intptr_t>(size)); | 2766 RecordRelocInfo(RelocInfo::CONST_POOL, static_cast<intptr_t>(size)); |
2771 #endif | 2767 #endif |
2772 } | 2768 } |
2773 | 2769 |
2774 | 2770 |
2775 } } // namespace v8::internal | 2771 } } // namespace v8::internal |
2776 | 2772 |
2777 #endif // V8_TARGET_ARCH_A64 | 2773 #endif // V8_TARGET_ARCH_A64 |
OLD | NEW |