| 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 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 WriteModeAndPC(pc_delta, rmode); | 493 WriteModeAndPC(pc_delta, rmode); |
| 494 WriteIntData(id_delta); | 494 WriteIntData(id_delta); |
| 495 } | 495 } |
| 496 last_id_ = static_cast<int>(rinfo->data()); | 496 last_id_ = static_cast<int>(rinfo->data()); |
| 497 } else if (rmode == RelocInfo::DEOPT_REASON) { | 497 } else if (rmode == RelocInfo::DEOPT_REASON) { |
| 498 DCHECK(rinfo->data() < (1 << kShortDataBits)); | 498 DCHECK(rinfo->data() < (1 << kShortDataBits)); |
| 499 WriteShortTaggedPC(pc_delta, kLocatableTag); | 499 WriteShortTaggedPC(pc_delta, kLocatableTag); |
| 500 WriteShortTaggedData(rinfo->data(), kDeoptReasonTag); | 500 WriteShortTaggedData(rinfo->data(), kDeoptReasonTag); |
| 501 } else { | 501 } else { |
| 502 WriteModeAndPC(pc_delta, rmode); | 502 WriteModeAndPC(pc_delta, rmode); |
| 503 if (RelocInfo::IsComment(rmode)) { | 503 if (RelocInfo::IsComment(rmode) || RelocInfo::IsWasmTrapLanding(rmode)) { |
| 504 WriteData(rinfo->data()); | 504 WriteData(rinfo->data()); |
| 505 } else if (RelocInfo::IsConstPool(rmode) || | 505 } else if (RelocInfo::IsConstPool(rmode) || |
| 506 RelocInfo::IsVeneerPool(rmode) || RelocInfo::IsDeoptId(rmode) || | 506 RelocInfo::IsVeneerPool(rmode) || RelocInfo::IsDeoptId(rmode) || |
| 507 RelocInfo::IsDeoptPosition(rmode)) { | 507 RelocInfo::IsDeoptPosition(rmode)) { |
| 508 WriteIntData(static_cast<int>(rinfo->data())); | 508 WriteIntData(static_cast<int>(rinfo->data())); |
| 509 } | 509 } |
| 510 } | 510 } |
| 511 last_pc_ = rinfo->pc(); | 511 last_pc_ = rinfo->pc(); |
| 512 last_mode_ = rmode; | 512 last_mode_ = rmode; |
| 513 #ifdef DEBUG | 513 #ifdef DEBUG |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 637 if (rmode == RelocInfo::PC_JUMP) { | 637 if (rmode == RelocInfo::PC_JUMP) { |
| 638 AdvanceReadLongPCJump(); | 638 AdvanceReadLongPCJump(); |
| 639 } else { | 639 } else { |
| 640 AdvanceReadPC(); | 640 AdvanceReadPC(); |
| 641 if (rmode == RelocInfo::CODE_TARGET_WITH_ID) { | 641 if (rmode == RelocInfo::CODE_TARGET_WITH_ID) { |
| 642 if (SetMode(rmode)) { | 642 if (SetMode(rmode)) { |
| 643 AdvanceReadId(); | 643 AdvanceReadId(); |
| 644 return; | 644 return; |
| 645 } | 645 } |
| 646 Advance(kIntSize); | 646 Advance(kIntSize); |
| 647 } else if (RelocInfo::IsComment(rmode)) { | 647 } else if (RelocInfo::IsComment(rmode) || |
| 648 RelocInfo::IsWasmTrapLanding(rmode)) { |
| 648 if (SetMode(rmode)) { | 649 if (SetMode(rmode)) { |
| 649 AdvanceReadData(); | 650 AdvanceReadData(); |
| 650 return; | 651 return; |
| 651 } | 652 } |
| 652 Advance(kIntptrSize); | 653 Advance(kIntptrSize); |
| 653 } else if (RelocInfo::IsConstPool(rmode) || | 654 } else if (RelocInfo::IsConstPool(rmode) || |
| 654 RelocInfo::IsVeneerPool(rmode) || | 655 RelocInfo::IsVeneerPool(rmode) || |
| 655 RelocInfo::IsDeoptId(rmode) || | 656 RelocInfo::IsDeoptId(rmode) || |
| 656 RelocInfo::IsDeoptPosition(rmode)) { | 657 RelocInfo::IsDeoptPosition(rmode)) { |
| 657 if (SetMode(rmode)) { | 658 if (SetMode(rmode)) { |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 789 case CODE_AGE_SEQUENCE: | 790 case CODE_AGE_SEQUENCE: |
| 790 return "code age sequence"; | 791 return "code age sequence"; |
| 791 case GENERATOR_CONTINUATION: | 792 case GENERATOR_CONTINUATION: |
| 792 return "generator continuation"; | 793 return "generator continuation"; |
| 793 case WASM_MEMORY_REFERENCE: | 794 case WASM_MEMORY_REFERENCE: |
| 794 return "wasm memory reference"; | 795 return "wasm memory reference"; |
| 795 case WASM_MEMORY_SIZE_REFERENCE: | 796 case WASM_MEMORY_SIZE_REFERENCE: |
| 796 return "wasm memory size reference"; | 797 return "wasm memory size reference"; |
| 797 case WASM_GLOBAL_REFERENCE: | 798 case WASM_GLOBAL_REFERENCE: |
| 798 return "wasm global value reference"; | 799 return "wasm global value reference"; |
| 800 case WASM_TRAP_LANDING: |
| 801 return "wasm trap landing"; |
| 799 case NUMBER_OF_MODES: | 802 case NUMBER_OF_MODES: |
| 800 case PC_JUMP: | 803 case PC_JUMP: |
| 801 UNREACHABLE(); | 804 UNREACHABLE(); |
| 802 return "number_of_modes"; | 805 return "number_of_modes"; |
| 803 } | 806 } |
| 804 return "unknown relocation type"; | 807 return "unknown relocation type"; |
| 805 } | 808 } |
| 806 | 809 |
| 807 | 810 |
| 808 void RelocInfo::Print(Isolate* isolate, std::ostream& os) { // NOLINT | 811 void RelocInfo::Print(Isolate* isolate, std::ostream& os) { // NOLINT |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 886 case CONST_POOL: | 889 case CONST_POOL: |
| 887 case VENEER_POOL: | 890 case VENEER_POOL: |
| 888 case DEBUG_BREAK_SLOT_AT_POSITION: | 891 case DEBUG_BREAK_SLOT_AT_POSITION: |
| 889 case DEBUG_BREAK_SLOT_AT_RETURN: | 892 case DEBUG_BREAK_SLOT_AT_RETURN: |
| 890 case DEBUG_BREAK_SLOT_AT_CALL: | 893 case DEBUG_BREAK_SLOT_AT_CALL: |
| 891 case DEBUG_BREAK_SLOT_AT_TAIL_CALL: | 894 case DEBUG_BREAK_SLOT_AT_TAIL_CALL: |
| 892 case GENERATOR_CONTINUATION: | 895 case GENERATOR_CONTINUATION: |
| 893 case WASM_MEMORY_REFERENCE: | 896 case WASM_MEMORY_REFERENCE: |
| 894 case WASM_MEMORY_SIZE_REFERENCE: | 897 case WASM_MEMORY_SIZE_REFERENCE: |
| 895 case WASM_GLOBAL_REFERENCE: | 898 case WASM_GLOBAL_REFERENCE: |
| 899 case WASM_TRAP_LANDING: |
| 896 case NONE32: | 900 case NONE32: |
| 897 case NONE64: | 901 case NONE64: |
| 898 break; | 902 break; |
| 899 case NUMBER_OF_MODES: | 903 case NUMBER_OF_MODES: |
| 900 case PC_JUMP: | 904 case PC_JUMP: |
| 901 UNREACHABLE(); | 905 UNREACHABLE(); |
| 902 break; | 906 break; |
| 903 case CODE_AGE_SEQUENCE: | 907 case CODE_AGE_SEQUENCE: |
| 904 DCHECK(Code::IsYoungSequence(isolate, pc_) || code_age_stub()->IsCode()); | 908 DCHECK(Code::IsYoungSequence(isolate, pc_) || code_age_stub()->IsCode()); |
| 905 break; | 909 break; |
| (...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1956 | 1960 |
| 1957 | 1961 |
| 1958 void Assembler::DataAlign(int m) { | 1962 void Assembler::DataAlign(int m) { |
| 1959 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); | 1963 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); |
| 1960 while ((pc_offset() & (m - 1)) != 0) { | 1964 while ((pc_offset() & (m - 1)) != 0) { |
| 1961 db(0); | 1965 db(0); |
| 1962 } | 1966 } |
| 1963 } | 1967 } |
| 1964 } // namespace internal | 1968 } // namespace internal |
| 1965 } // namespace v8 | 1969 } // namespace v8 |
| OLD | NEW |