Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: src/assembler.cc

Issue 2451853002: Uniform and precise source positions for inlining (Closed)
Patch Set: fixed gcmole issue Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 case RUNTIME_ENTRY: 753 case RUNTIME_ENTRY:
754 return "runtime entry"; 754 return "runtime entry";
755 case COMMENT: 755 case COMMENT:
756 return "comment"; 756 return "comment";
757 case EXTERNAL_REFERENCE: 757 case EXTERNAL_REFERENCE:
758 return "external reference"; 758 return "external reference";
759 case INTERNAL_REFERENCE: 759 case INTERNAL_REFERENCE:
760 return "internal reference"; 760 return "internal reference";
761 case INTERNAL_REFERENCE_ENCODED: 761 case INTERNAL_REFERENCE_ENCODED:
762 return "encoded internal reference"; 762 return "encoded internal reference";
763 case DEOPT_POSITION: 763 case DEOPT_SCRIPT_OFFSET:
764 return "deopt position"; 764 return "deopt script offset";
765 case DEOPT_INLINING_ID:
766 return "deopt inlining id";
765 case DEOPT_REASON: 767 case DEOPT_REASON:
766 return "deopt reason"; 768 return "deopt reason";
767 case DEOPT_ID: 769 case DEOPT_ID:
768 return "deopt index"; 770 return "deopt index";
769 case CONST_POOL: 771 case CONST_POOL:
770 return "constant pool"; 772 return "constant pool";
771 case VENEER_POOL: 773 case VENEER_POOL:
772 return "veneer pool"; 774 return "veneer pool";
773 case DEBUG_BREAK_SLOT_AT_POSITION: 775 case DEBUG_BREAK_SLOT_AT_POSITION:
774 return "debug break slot at position"; 776 return "debug break slot at position";
(...skipping 19 matching lines...) Expand all
794 return "number_of_modes"; 796 return "number_of_modes";
795 } 797 }
796 return "unknown relocation type"; 798 return "unknown relocation type";
797 } 799 }
798 800
799 801
800 void RelocInfo::Print(Isolate* isolate, std::ostream& os) { // NOLINT 802 void RelocInfo::Print(Isolate* isolate, std::ostream& os) { // NOLINT
801 os << static_cast<const void*>(pc_) << " " << RelocModeName(rmode_); 803 os << static_cast<const void*>(pc_) << " " << RelocModeName(rmode_);
802 if (IsComment(rmode_)) { 804 if (IsComment(rmode_)) {
803 os << " (" << reinterpret_cast<char*>(data_) << ")"; 805 os << " (" << reinterpret_cast<char*>(data_) << ")";
804 } else if (rmode_ == DEOPT_POSITION) { 806 } else if (rmode_ == DEOPT_SCRIPT_OFFSET || rmode_ == DEOPT_INLINING_ID) {
805 os << " (" << data() << ")"; 807 os << " (" << data() << ")";
806 } else if (rmode_ == DEOPT_REASON) { 808 } else if (rmode_ == DEOPT_REASON) {
807 os << " (" 809 os << " ("
808 << DeoptimizeReasonToString(static_cast<DeoptimizeReason>(data_)) << ")"; 810 << DeoptimizeReasonToString(static_cast<DeoptimizeReason>(data_)) << ")";
809 } else if (rmode_ == EMBEDDED_OBJECT) { 811 } else if (rmode_ == EMBEDDED_OBJECT) {
810 os << " (" << Brief(target_object()) << ")"; 812 os << " (" << Brief(target_object()) << ")";
811 } else if (rmode_ == EXTERNAL_REFERENCE) { 813 } else if (rmode_ == EXTERNAL_REFERENCE) {
812 ExternalReferenceEncoder ref_encoder(isolate); 814 ExternalReferenceEncoder ref_encoder(isolate);
813 os << " (" 815 os << " ("
814 << ref_encoder.NameOfAddress(isolate, target_external_reference()) 816 << ref_encoder.NameOfAddress(isolate, target_external_reference())
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 Address target = target_internal_reference(); 867 Address target = target_internal_reference();
866 Address pc = target_internal_reference_address(); 868 Address pc = target_internal_reference_address();
867 Code* code = Code::cast(isolate->FindCodeObject(pc)); 869 Code* code = Code::cast(isolate->FindCodeObject(pc));
868 CHECK(target >= code->instruction_start()); 870 CHECK(target >= code->instruction_start());
869 CHECK(target <= code->instruction_end()); 871 CHECK(target <= code->instruction_end());
870 break; 872 break;
871 } 873 }
872 case RUNTIME_ENTRY: 874 case RUNTIME_ENTRY:
873 case COMMENT: 875 case COMMENT:
874 case EXTERNAL_REFERENCE: 876 case EXTERNAL_REFERENCE:
875 case DEOPT_POSITION: 877 case DEOPT_SCRIPT_OFFSET:
878 case DEOPT_INLINING_ID:
876 case DEOPT_REASON: 879 case DEOPT_REASON:
877 case DEOPT_ID: 880 case DEOPT_ID:
878 case CONST_POOL: 881 case CONST_POOL:
879 case VENEER_POOL: 882 case VENEER_POOL:
880 case DEBUG_BREAK_SLOT_AT_POSITION: 883 case DEBUG_BREAK_SLOT_AT_POSITION:
881 case DEBUG_BREAK_SLOT_AT_RETURN: 884 case DEBUG_BREAK_SLOT_AT_RETURN:
882 case DEBUG_BREAK_SLOT_AT_CALL: 885 case DEBUG_BREAK_SLOT_AT_CALL:
883 case DEBUG_BREAK_SLOT_AT_TAIL_CALL: 886 case DEBUG_BREAK_SLOT_AT_TAIL_CALL:
884 case GENERATOR_CONTINUATION: 887 case GENERATOR_CONTINUATION:
885 case WASM_MEMORY_REFERENCE: 888 case WASM_MEMORY_REFERENCE:
(...skipping 998 matching lines...) Expand 10 before | Expand all | Expand 10 after
1884 } 1887 }
1885 } 1888 }
1886 } 1889 }
1887 1890
1888 return !empty ? emitted_label_.pos() : 0; 1891 return !empty ? emitted_label_.pos() : 0;
1889 } 1892 }
1890 1893
1891 1894
1892 // Platform specific but identical code for all the platforms. 1895 // Platform specific but identical code for all the platforms.
1893 1896
1894 void Assembler::RecordDeoptReason(DeoptimizeReason reason, int raw_position, 1897 void Assembler::RecordDeoptReason(DeoptimizeReason reason,
1895 int id) { 1898 SourcePosition position, int id) {
1896 if (FLAG_trace_deopt || isolate()->is_profiling()) { 1899 if (FLAG_trace_deopt || isolate()->is_profiling()) {
1897 EnsureSpace ensure_space(this); 1900 EnsureSpace ensure_space(this);
1898 RecordRelocInfo(RelocInfo::DEOPT_POSITION, raw_position); 1901 RecordRelocInfo(RelocInfo::DEOPT_SCRIPT_OFFSET, position.ScriptOffset());
1902 RecordRelocInfo(RelocInfo::DEOPT_INLINING_ID, position.InliningId());
1899 RecordRelocInfo(RelocInfo::DEOPT_REASON, static_cast<int>(reason)); 1903 RecordRelocInfo(RelocInfo::DEOPT_REASON, static_cast<int>(reason));
1900 RecordRelocInfo(RelocInfo::DEOPT_ID, id); 1904 RecordRelocInfo(RelocInfo::DEOPT_ID, id);
1901 } 1905 }
1902 } 1906 }
1903 1907
1904 1908
1905 void Assembler::RecordComment(const char* msg) { 1909 void Assembler::RecordComment(const char* msg) {
1906 if (FLAG_code_comments) { 1910 if (FLAG_code_comments) {
1907 EnsureSpace ensure_space(this); 1911 EnsureSpace ensure_space(this);
1908 RecordRelocInfo(RelocInfo::COMMENT, reinterpret_cast<intptr_t>(msg)); 1912 RecordRelocInfo(RelocInfo::COMMENT, reinterpret_cast<intptr_t>(msg));
(...skipping 15 matching lines...) Expand all
1924 1928
1925 1929
1926 void Assembler::DataAlign(int m) { 1930 void Assembler::DataAlign(int m) {
1927 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); 1931 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m));
1928 while ((pc_offset() & (m - 1)) != 0) { 1932 while ((pc_offset() & (m - 1)) != 0) {
1929 db(0); 1933 db(0);
1930 } 1934 }
1931 } 1935 }
1932 } // namespace internal 1936 } // namespace internal
1933 } // namespace v8 1937 } // namespace v8
OLDNEW
« no previous file with comments | « src/assembler.h ('k') | src/compilation-info.h » ('j') | src/crankshaft/hydrogen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698