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

Side by Side Diff: src/assembler.cc

Issue 2080173002: [debug] always add debug slot for statements. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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/full-codegen/full-codegen.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 1808 matching lines...) Expand 10 before | Expand all | Expand 10 after
1819 } 1819 }
1820 1820
1821 1821
1822 std::ostream& operator<<(std::ostream& os, ExternalReference reference) { 1822 std::ostream& operator<<(std::ostream& os, ExternalReference reference) {
1823 os << static_cast<const void*>(reference.address()); 1823 os << static_cast<const void*>(reference.address());
1824 const Runtime::Function* fn = Runtime::FunctionForEntry(reference.address()); 1824 const Runtime::Function* fn = Runtime::FunctionForEntry(reference.address());
1825 if (fn) os << "<" << fn->name << ".entry>"; 1825 if (fn) os << "<" << fn->name << ".entry>";
1826 return os; 1826 return os;
1827 } 1827 }
1828 1828
1829 bool AssemblerPositionsRecorder::RecordPosition(int pos) { 1829 void AssemblerPositionsRecorder::RecordPosition(int pos) {
1830 DCHECK(pos != RelocInfo::kNoPosition); 1830 DCHECK(pos != RelocInfo::kNoPosition);
1831 DCHECK(pos >= 0); 1831 DCHECK(pos >= 0);
1832 current_position_ = pos; 1832 current_position_ = pos;
1833 LOG_CODE_EVENT(assembler_->isolate(), 1833 LOG_CODE_EVENT(assembler_->isolate(),
1834 CodeLinePosInfoAddPositionEvent(jit_handler_data_, 1834 CodeLinePosInfoAddPositionEvent(jit_handler_data_,
1835 assembler_->pc_offset(), 1835 assembler_->pc_offset(),
1836 pos)); 1836 pos));
1837 return WriteRecordedPositions(); 1837 WriteRecordedPositions();
1838 } 1838 }
1839 1839
1840 bool AssemblerPositionsRecorder::RecordStatementPosition(int pos) { 1840 void AssemblerPositionsRecorder::RecordStatementPosition(int pos) {
1841 DCHECK(pos != RelocInfo::kNoPosition); 1841 DCHECK(pos != RelocInfo::kNoPosition);
1842 DCHECK(pos >= 0); 1842 DCHECK(pos >= 0);
1843 current_statement_position_ = pos; 1843 current_statement_position_ = pos;
1844 LOG_CODE_EVENT(assembler_->isolate(), 1844 LOG_CODE_EVENT(assembler_->isolate(),
1845 CodeLinePosInfoAddStatementPositionEvent( 1845 CodeLinePosInfoAddStatementPositionEvent(
1846 jit_handler_data_, 1846 jit_handler_data_,
1847 assembler_->pc_offset(), 1847 assembler_->pc_offset(),
1848 pos)); 1848 pos));
1849 return RecordPosition(pos); 1849 RecordPosition(pos);
1850 } 1850 }
1851 1851
1852 bool AssemblerPositionsRecorder::WriteRecordedPositions() { 1852 void AssemblerPositionsRecorder::WriteRecordedPositions() {
1853 bool written = false;
1854
1855 // Write the statement position if it is different from what was written last 1853 // Write the statement position if it is different from what was written last
1856 // time. 1854 // time.
1857 if (current_statement_position_ != written_statement_position_) { 1855 if (current_statement_position_ != written_statement_position_) {
1858 EnsureSpace ensure_space(assembler_); 1856 EnsureSpace ensure_space(assembler_);
1859 assembler_->RecordRelocInfo(RelocInfo::STATEMENT_POSITION, 1857 assembler_->RecordRelocInfo(RelocInfo::STATEMENT_POSITION,
1860 current_statement_position_); 1858 current_statement_position_);
1861 written_position_ = current_statement_position_; 1859 written_position_ = current_statement_position_;
1862 written_statement_position_ = current_statement_position_; 1860 written_statement_position_ = current_statement_position_;
1863 written = true;
1864 } 1861 }
1865 1862
1866 // Write the position if it is different from what was written last time and 1863 // Write the position if it is different from what was written last time and
1867 // also different from the statement position that was just written. 1864 // also different from the statement position that was just written.
1868 if (current_position_ != written_position_) { 1865 if (current_position_ != written_position_) {
1869 EnsureSpace ensure_space(assembler_); 1866 EnsureSpace ensure_space(assembler_);
1870 assembler_->RecordRelocInfo(RelocInfo::POSITION, current_position_); 1867 assembler_->RecordRelocInfo(RelocInfo::POSITION, current_position_);
1871 written_position_ = current_position_; 1868 written_position_ = current_position_;
1872 written = true;
1873 } 1869 }
1874
1875 // Return whether something was written.
1876 return written;
1877 } 1870 }
1878 1871
1879 1872
1880 ConstantPoolBuilder::ConstantPoolBuilder(int ptr_reach_bits, 1873 ConstantPoolBuilder::ConstantPoolBuilder(int ptr_reach_bits,
1881 int double_reach_bits) { 1874 int double_reach_bits) {
1882 info_[ConstantPoolEntry::INTPTR].entries.reserve(64); 1875 info_[ConstantPoolEntry::INTPTR].entries.reserve(64);
1883 info_[ConstantPoolEntry::INTPTR].regular_reach_bits = ptr_reach_bits; 1876 info_[ConstantPoolEntry::INTPTR].regular_reach_bits = ptr_reach_bits;
1884 info_[ConstantPoolEntry::DOUBLE].regular_reach_bits = double_reach_bits; 1877 info_[ConstantPoolEntry::DOUBLE].regular_reach_bits = double_reach_bits;
1885 } 1878 }
1886 1879
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
2113 2106
2114 2107
2115 void Assembler::DataAlign(int m) { 2108 void Assembler::DataAlign(int m) {
2116 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); 2109 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m));
2117 while ((pc_offset() & (m - 1)) != 0) { 2110 while ((pc_offset() & (m - 1)) != 0) {
2118 db(0); 2111 db(0);
2119 } 2112 }
2120 } 2113 }
2121 } // namespace internal 2114 } // namespace internal
2122 } // namespace v8 2115 } // namespace v8
OLDNEW
« no previous file with comments | « src/assembler.h ('k') | src/full-codegen/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698