Skip to content

Commit

Permalink
Code-review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Nemoumbra committed Sep 15, 2024
1 parent 08b20ce commit bd6c469
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Core/MIPS/IR/IRInst.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ static const IRMeta irMeta[] = {
{ IROp::ApplyRoundingMode, "ApplyRoundingMode", "" },
{ IROp::UpdateRoundingMode, "UpdateRoundingMode", "" },

{IROp::LogIRBlock, "LogIRBlock", ""}
{ IROp::LogIRBlock, "LogIRBlock", "" },
};

const IRMeta *metaIndex[256];
Expand Down
4 changes: 2 additions & 2 deletions Core/MIPS/MIPSTracer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void TraceBlockStorage::clear() {
INFO_LOG(Log::JIT, "TraceBlockStorage cleared");
}

void MIPSTracer::prepare_block(MIPSComp::IRBlock* block, MIPSComp::IRBlockCache& blocks) {
void MIPSTracer::prepare_block(const MIPSComp::IRBlock* block, MIPSComp::IRBlockCache& blocks) {
u32 virt_addr, size;
block->GetRange(&virt_addr, &size);

Expand Down Expand Up @@ -120,7 +120,7 @@ bool MIPSTracer::flush_to_file() {
return true;
}

void MIPSTracer::flush_block_to_file(TraceBlockInfo& block_info) {
void MIPSTracer::flush_block_to_file(const TraceBlockInfo& block_info) {
char buffer[512];

// The log format is '{prefix}{disassembled line}', where 'prefix' is '0x{8 hex digits of the address}: '
Expand Down
8 changes: 4 additions & 4 deletions Core/MIPS/MIPSTracer.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,16 +144,16 @@ struct MIPSTracer {
void start_tracing();
void stop_tracing();

void prepare_block(MIPSComp::IRBlock* block, MIPSComp::IRBlockCache& blocks);
void setLoggingPath(std::string path) {
void prepare_block(const MIPSComp::IRBlock* block, MIPSComp::IRBlockCache& blocks);
void set_logging_path(std::string path) {
logging_path = Path(path);
}
std::string getLoggingPath() const {
std::string get_logging_path() const {
return logging_path.ToString();
}

bool flush_to_file();
void flush_block_to_file(TraceBlockInfo& block);
void flush_block_to_file(const TraceBlockInfo& block);

void initialize(u32 storage_capacity, u32 max_trace_size);
void clear();
Expand Down
4 changes: 2 additions & 2 deletions UI/GameSettingsScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1909,7 +1909,7 @@ void DeveloperToolsScreen::CreateViews() {
return true;
});

MIPSTracerPath_ = mipsTracer.getLoggingPath();
MIPSTracerPath_ = mipsTracer.get_logging_path();
MIPSTracerPath = list->Add(new InfoItem(dev->T("Current log file"), MIPSTracerPath_));

PopupSliderChoice* storage_capacity = list->Add(
Expand Down Expand Up @@ -2151,7 +2151,7 @@ UI::EventReturn DeveloperToolsScreen::OnMIPSTracerPathChanged(UI::EventParams &e
auto dev = GetI18NCategory(I18NCat::DEVELOPER);
System_BrowseForFile(GetRequesterToken(), dev->T("Select the log file"), BrowseFileType::ANY,
[this](const std::string &value, int) {
mipsTracer.setLoggingPath(value);
mipsTracer.set_logging_path(value);
MIPSTracerPath_ = value;
MIPSTracerPath->SetRightText(MIPSTracerPath_);
});
Expand Down

0 comments on commit bd6c469

Please sign in to comment.