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

Side by Side Diff: src/assembler.cc

Issue 2161543002: [turbofan] Add support for eager/soft deoptimization reasons. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Do the ports properly Created 4 years, 5 months 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
« no previous file with comments | « src/assembler.h ('k') | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 } 767 }
768 768
769 769
770 void RelocInfo::Print(Isolate* isolate, std::ostream& os) { // NOLINT 770 void RelocInfo::Print(Isolate* isolate, std::ostream& os) { // NOLINT
771 os << static_cast<const void*>(pc_) << " " << RelocModeName(rmode_); 771 os << static_cast<const void*>(pc_) << " " << RelocModeName(rmode_);
772 if (IsComment(rmode_)) { 772 if (IsComment(rmode_)) {
773 os << " (" << reinterpret_cast<char*>(data_) << ")"; 773 os << " (" << reinterpret_cast<char*>(data_) << ")";
774 } else if (rmode_ == DEOPT_POSITION) { 774 } else if (rmode_ == DEOPT_POSITION) {
775 os << " (" << data() << ")"; 775 os << " (" << data() << ")";
776 } else if (rmode_ == DEOPT_REASON) { 776 } else if (rmode_ == DEOPT_REASON) {
777 os << " (" << Deoptimizer::GetDeoptReason( 777 os << " ("
778 static_cast<Deoptimizer::DeoptReason>(data_)) << ")"; 778 << DeoptimizeReasonToString(static_cast<DeoptimizeReason>(data_)) << ")";
779 } else if (rmode_ == EMBEDDED_OBJECT) { 779 } else if (rmode_ == EMBEDDED_OBJECT) {
780 os << " (" << Brief(target_object()) << ")"; 780 os << " (" << Brief(target_object()) << ")";
781 } else if (rmode_ == EXTERNAL_REFERENCE) { 781 } else if (rmode_ == EXTERNAL_REFERENCE) {
782 ExternalReferenceEncoder ref_encoder(isolate); 782 ExternalReferenceEncoder ref_encoder(isolate);
783 os << " (" 783 os << " ("
784 << ref_encoder.NameOfAddress(isolate, target_external_reference()) 784 << ref_encoder.NameOfAddress(isolate, target_external_reference())
785 << ") (" << static_cast<const void*>(target_external_reference()) 785 << ") (" << static_cast<const void*>(target_external_reference())
786 << ")"; 786 << ")";
787 } else if (IsCodeTarget(rmode_)) { 787 } else if (IsCodeTarget(rmode_)) {
788 Code* code = Code::GetCodeFromTargetAddress(target_address()); 788 Code* code = Code::GetCodeFromTargetAddress(target_address());
(...skipping 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after
1855 } 1855 }
1856 } 1856 }
1857 } 1857 }
1858 1858
1859 return !empty ? emitted_label_.pos() : 0; 1859 return !empty ? emitted_label_.pos() : 0;
1860 } 1860 }
1861 1861
1862 1862
1863 // Platform specific but identical code for all the platforms. 1863 // Platform specific but identical code for all the platforms.
1864 1864
1865 void Assembler::RecordDeoptReason(const int reason, int raw_position, int id) { 1865 void Assembler::RecordDeoptReason(DeoptimizeReason reason, int raw_position,
1866 int id) {
1866 if (FLAG_trace_deopt || isolate()->is_profiling()) { 1867 if (FLAG_trace_deopt || isolate()->is_profiling()) {
1867 EnsureSpace ensure_space(this); 1868 EnsureSpace ensure_space(this);
1868 RecordRelocInfo(RelocInfo::DEOPT_POSITION, raw_position); 1869 RecordRelocInfo(RelocInfo::DEOPT_POSITION, raw_position);
1869 RecordRelocInfo(RelocInfo::DEOPT_REASON, reason); 1870 RecordRelocInfo(RelocInfo::DEOPT_REASON, static_cast<int>(reason));
1870 RecordRelocInfo(RelocInfo::DEOPT_ID, id); 1871 RecordRelocInfo(RelocInfo::DEOPT_ID, id);
1871 } 1872 }
1872 } 1873 }
1873 1874
1874 1875
1875 void Assembler::RecordComment(const char* msg) { 1876 void Assembler::RecordComment(const char* msg) {
1876 if (FLAG_code_comments) { 1877 if (FLAG_code_comments) {
1877 EnsureSpace ensure_space(this); 1878 EnsureSpace ensure_space(this);
1878 RecordRelocInfo(RelocInfo::COMMENT, reinterpret_cast<intptr_t>(msg)); 1879 RecordRelocInfo(RelocInfo::COMMENT, reinterpret_cast<intptr_t>(msg));
1879 } 1880 }
(...skipping 14 matching lines...) Expand all
1894 1895
1895 1896
1896 void Assembler::DataAlign(int m) { 1897 void Assembler::DataAlign(int m) {
1897 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); 1898 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m));
1898 while ((pc_offset() & (m - 1)) != 0) { 1899 while ((pc_offset() & (m - 1)) != 0) {
1899 db(0); 1900 db(0);
1900 } 1901 }
1901 } 1902 }
1902 } // namespace internal 1903 } // namespace internal
1903 } // namespace v8 1904 } // namespace v8
OLDNEW
« no previous file with comments | « src/assembler.h ('k') | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698