OLD | NEW |
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
2 // All Rights Reserved. | 2 // All Rights Reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
10 // | 10 // |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 next_position_candidate_pos_delta_ += pos_delta; | 507 next_position_candidate_pos_delta_ += pos_delta; |
508 } | 508 } |
509 next_position_candidate_flushed_ = false; | 509 next_position_candidate_flushed_ = false; |
510 } | 510 } |
511 last_position_ = static_cast<int>(rinfo->data()); | 511 last_position_ = static_cast<int>(rinfo->data()); |
512 } else { | 512 } else { |
513 WriteModeAndPC(pc_delta, rmode); | 513 WriteModeAndPC(pc_delta, rmode); |
514 if (RelocInfo::IsComment(rmode)) { | 514 if (RelocInfo::IsComment(rmode)) { |
515 WriteData(rinfo->data()); | 515 WriteData(rinfo->data()); |
516 } else if (RelocInfo::IsConstPool(rmode) || | 516 } else if (RelocInfo::IsConstPool(rmode) || |
517 RelocInfo::IsVeneerPool(rmode)) { | 517 RelocInfo::IsVeneerPool(rmode) || |
| 518 RelocInfo::IsDeoptId(rmode)) { |
518 WriteIntData(static_cast<int>(rinfo->data())); | 519 WriteIntData(static_cast<int>(rinfo->data())); |
519 } | 520 } |
520 } | 521 } |
521 last_pc_ = rinfo->pc(); | 522 last_pc_ = rinfo->pc(); |
522 last_mode_ = rmode; | 523 last_mode_ = rmode; |
523 #ifdef DEBUG | 524 #ifdef DEBUG |
524 DCHECK(begin_pos - pos_ <= kMaxSize); | 525 DCHECK(begin_pos - pos_ <= kMaxSize); |
525 #endif | 526 #endif |
526 } | 527 } |
527 | 528 |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
698 } else if (RelocInfo::IsPosition(rmode)) { | 699 } else if (RelocInfo::IsPosition(rmode)) { |
699 if (mode_mask_ & RelocInfo::kPositionMask) { | 700 if (mode_mask_ & RelocInfo::kPositionMask) { |
700 // Always update the position if we are interested in either | 701 // Always update the position if we are interested in either |
701 // statement positions or non-statement positions. | 702 // statement positions or non-statement positions. |
702 AdvanceReadPosition(); | 703 AdvanceReadPosition(); |
703 if (SetMode(rmode)) return; | 704 if (SetMode(rmode)) return; |
704 } else { | 705 } else { |
705 Advance(kIntSize); | 706 Advance(kIntSize); |
706 } | 707 } |
707 } else if (RelocInfo::IsConstPool(rmode) || | 708 } else if (RelocInfo::IsConstPool(rmode) || |
708 RelocInfo::IsVeneerPool(rmode)) { | 709 RelocInfo::IsVeneerPool(rmode) || |
| 710 RelocInfo::IsDeoptId(rmode)) { |
709 if (SetMode(rmode)) { | 711 if (SetMode(rmode)) { |
710 AdvanceReadInt(); | 712 AdvanceReadInt(); |
711 return; | 713 return; |
712 } | 714 } |
713 Advance(kIntSize); | 715 Advance(kIntSize); |
714 } else if (SetMode(static_cast<RelocInfo::Mode>(rmode))) { | 716 } else if (SetMode(static_cast<RelocInfo::Mode>(rmode))) { |
715 return; | 717 return; |
716 } | 718 } |
717 } | 719 } |
718 } | 720 } |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
821 case STATEMENT_POSITION: | 823 case STATEMENT_POSITION: |
822 return "statement position"; | 824 return "statement position"; |
823 case EXTERNAL_REFERENCE: | 825 case EXTERNAL_REFERENCE: |
824 return "external reference"; | 826 return "external reference"; |
825 case INTERNAL_REFERENCE: | 827 case INTERNAL_REFERENCE: |
826 return "internal reference"; | 828 return "internal reference"; |
827 case INTERNAL_REFERENCE_ENCODED: | 829 case INTERNAL_REFERENCE_ENCODED: |
828 return "encoded internal reference"; | 830 return "encoded internal reference"; |
829 case DEOPT_REASON: | 831 case DEOPT_REASON: |
830 return "deopt reason"; | 832 return "deopt reason"; |
| 833 case DEOPT_ID: |
| 834 return "deopt inlining id"; |
831 case CONST_POOL: | 835 case CONST_POOL: |
832 return "constant pool"; | 836 return "constant pool"; |
833 case VENEER_POOL: | 837 case VENEER_POOL: |
834 return "veneer pool"; | 838 return "veneer pool"; |
835 case DEBUG_BREAK_SLOT_AT_POSITION: | 839 case DEBUG_BREAK_SLOT_AT_POSITION: |
836 return "debug break slot at position"; | 840 return "debug break slot at position"; |
837 case DEBUG_BREAK_SLOT_AT_RETURN: | 841 case DEBUG_BREAK_SLOT_AT_RETURN: |
838 return "debug break slot at return"; | 842 return "debug break slot at return"; |
839 case DEBUG_BREAK_SLOT_AT_CALL: | 843 case DEBUG_BREAK_SLOT_AT_CALL: |
840 return "debug break slot at call"; | 844 return "debug break slot at call"; |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
928 CHECK(target >= code->instruction_start()); | 932 CHECK(target >= code->instruction_start()); |
929 CHECK(target <= code->instruction_end()); | 933 CHECK(target <= code->instruction_end()); |
930 break; | 934 break; |
931 } | 935 } |
932 case RUNTIME_ENTRY: | 936 case RUNTIME_ENTRY: |
933 case COMMENT: | 937 case COMMENT: |
934 case POSITION: | 938 case POSITION: |
935 case STATEMENT_POSITION: | 939 case STATEMENT_POSITION: |
936 case EXTERNAL_REFERENCE: | 940 case EXTERNAL_REFERENCE: |
937 case DEOPT_REASON: | 941 case DEOPT_REASON: |
| 942 case DEOPT_ID: |
938 case CONST_POOL: | 943 case CONST_POOL: |
939 case VENEER_POOL: | 944 case VENEER_POOL: |
940 case DEBUG_BREAK_SLOT_AT_POSITION: | 945 case DEBUG_BREAK_SLOT_AT_POSITION: |
941 case DEBUG_BREAK_SLOT_AT_RETURN: | 946 case DEBUG_BREAK_SLOT_AT_RETURN: |
942 case DEBUG_BREAK_SLOT_AT_CALL: | 947 case DEBUG_BREAK_SLOT_AT_CALL: |
943 case DEBUG_BREAK_SLOT_AT_TAIL_CALL: | 948 case DEBUG_BREAK_SLOT_AT_TAIL_CALL: |
944 case GENERATOR_CONTINUATION: | 949 case GENERATOR_CONTINUATION: |
945 case WASM_MEMORY_REFERENCE: | 950 case WASM_MEMORY_REFERENCE: |
946 case WASM_MEMORY_SIZE_REFERENCE: | 951 case WASM_MEMORY_SIZE_REFERENCE: |
947 case NONE32: | 952 case NONE32: |
(...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2045 } | 2050 } |
2046 } | 2051 } |
2047 } | 2052 } |
2048 | 2053 |
2049 return !empty ? emitted_label_.pos() : 0; | 2054 return !empty ? emitted_label_.pos() : 0; |
2050 } | 2055 } |
2051 | 2056 |
2052 | 2057 |
2053 // Platform specific but identical code for all the platforms. | 2058 // Platform specific but identical code for all the platforms. |
2054 | 2059 |
2055 | 2060 void Assembler::RecordDeoptReason(const int reason, int raw_position, |
2056 void Assembler::RecordDeoptReason(const int reason, int raw_position) { | 2061 int inlining_id) { |
2057 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling()) { | 2062 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling()) { |
2058 EnsureSpace ensure_space(this); | 2063 EnsureSpace ensure_space(this); |
2059 RecordRelocInfo(RelocInfo::POSITION, raw_position); | 2064 RecordRelocInfo(RelocInfo::POSITION, raw_position); |
2060 RecordRelocInfo(RelocInfo::DEOPT_REASON, reason); | 2065 RecordRelocInfo(RelocInfo::DEOPT_REASON, reason); |
| 2066 RecordRelocInfo(RelocInfo::DEOPT_ID, inlining_id); |
2061 } | 2067 } |
2062 } | 2068 } |
2063 | 2069 |
2064 | 2070 |
2065 void Assembler::RecordComment(const char* msg) { | 2071 void Assembler::RecordComment(const char* msg) { |
2066 if (FLAG_code_comments) { | 2072 if (FLAG_code_comments) { |
2067 EnsureSpace ensure_space(this); | 2073 EnsureSpace ensure_space(this); |
2068 RecordRelocInfo(RelocInfo::COMMENT, reinterpret_cast<intptr_t>(msg)); | 2074 RecordRelocInfo(RelocInfo::COMMENT, reinterpret_cast<intptr_t>(msg)); |
2069 } | 2075 } |
2070 } | 2076 } |
(...skipping 13 matching lines...) Expand all Loading... |
2084 | 2090 |
2085 | 2091 |
2086 void Assembler::DataAlign(int m) { | 2092 void Assembler::DataAlign(int m) { |
2087 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); | 2093 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); |
2088 while ((pc_offset() & (m - 1)) != 0) { | 2094 while ((pc_offset() & (m - 1)) != 0) { |
2089 db(0); | 2095 db(0); |
2090 } | 2096 } |
2091 } | 2097 } |
2092 } // namespace internal | 2098 } // namespace internal |
2093 } // namespace v8 | 2099 } // namespace v8 |
OLD | NEW |