Fix Windows asserts (#1045)

* fix release mode asserts

* clang

* dummy
This commit is contained in:
ManDude
2022-01-02 23:02:10 +00:00
committed by GitHub
parent 6e4b34be0b
commit c9204f2a9b
108 changed files with 230 additions and 238 deletions
+2 -2
View File
@@ -3,10 +3,10 @@
// Data format for the tfrag3 renderer.
#include "common/common_types.h"
#include "common/util/assert.h"
#include "common/dma/gs.h"
#include "common/util/Serializer.h"
#include "common/math/Vector.h"
#include "common/util/assert.h"
namespace tfrag3 {
@@ -136,4 +136,4 @@ struct Level {
void serialize(Serializer& ser);
};
} // namespace tfrag3
} // namespace tfrag3
+2 -2
View File
@@ -7,8 +7,8 @@
#include <string>
#include <cstring>
#include "common/util/assert.h"
#include "common/common_types.h"
#include "common/util/assert.h"
struct DmaStats {
double sync_time_ms = 0;
@@ -117,4 +117,4 @@ struct VifCodeUnpack {
u16 addr_qw;
bool is_unsigned; // only care for 8/16 bit data.
bool use_tops_flag; // uses double buffering
};
};
+1 -1
View File
@@ -7,7 +7,7 @@
#include "Interpreter.h"
#include "ParseHelpers.h"
#include "common/util/FileUtil.h"
#include <third-party/fmt/core.h>
#include "third-party/fmt/core.h"
namespace goos {
Interpreter::Interpreter(const std::string& username) {
+1 -1
View File
@@ -41,7 +41,6 @@
*/
#include <string>
#include "common/util/assert.h"
#include <memory>
#include <unordered_map>
#include <unordered_set>
@@ -50,6 +49,7 @@
#include <stdexcept>
#include <map>
#include "common/common_types.h"
#include "common/util/assert.h"
namespace goos {
+1 -1
View File
@@ -4,7 +4,6 @@
* It is not very good, but significantly better than putting everything on one line
*/
#include "common/util/assert.h"
#include <stdexcept>
#include <utility>
#include <cstring>
@@ -14,6 +13,7 @@
#include "common/log/log.h"
#include "common/goos/PrettyPrinter2.h"
#include "common/util/assert.h"
namespace pretty_print {
+1 -1
View File
@@ -1,7 +1,7 @@
#include "PrettyPrinter2.h"
#include "common/common_types.h"
#include "common/util/assert.h"
#include "third-party/fmt/core.h"
#include "common/util/assert.h"
namespace pretty_print {
+2 -1
View File
@@ -12,7 +12,6 @@
*/
#include <memory>
#include "common/util/assert.h"
#include <utility>
#include <unordered_map>
#include <optional>
@@ -22,6 +21,8 @@
#include "ReplUtils.h"
#include "common/util/assert.h"
namespace goos {
/*!
+1 -1
View File
@@ -1,12 +1,12 @@
#include <cstdio>
#include <cstdlib>
#include "common/util/assert.h"
#include <mutex>
#include "third-party/fmt/color.h"
#include "log.h"
#ifdef _WIN32 // see lg::initialize
#include <Windows.h>
#endif
#include "common/util/assert.h"
namespace lg {
struct Logger {
+2 -2
View File
@@ -4,9 +4,9 @@
*/
#include <stdexcept>
#include "common/util/assert.h"
#include <third-party/fmt/core.h>
#include "third-party/fmt/core.h"
#include "Type.h"
#include "common/util/assert.h"
namespace {
std::string reg_kind_to_string(RegClass kind) {
+1 -1
View File
@@ -7,10 +7,10 @@
#include <string>
#include <map>
#include "common/util/assert.h"
#include <unordered_map>
#include "common/goal_constants.h"
#include "TypeSpec.h"
#include "common/util/assert.h"
class TypeSystem;
+1 -1
View File
@@ -8,8 +8,8 @@
#include <vector>
#include <string>
#include <optional>
#include "common/util/assert.h"
#include "common/util/SmallVector.h"
#include "common/util/assert.h"
/*!
* A :name value modifier to apply to a type.
+3 -3
View File
@@ -5,12 +5,12 @@
* access types, and reverse type lookups.
*/
#include "common/util/assert.h"
#include "third-party/fmt/core.h"
#include "third-party/fmt/color.h"
#include <stdexcept>
#include <third-party/fmt/core.h>
#include "TypeSystem.h"
#include "common/util/math_util.h"
#include "third-party/fmt/color.h"
#include "common/util/assert.h"
namespace {
template <typename... Args>
+2 -2
View File
@@ -7,9 +7,9 @@
#include <cstdint>
#include <cstring>
#include "common/util/assert.h"
#include "common/common_types.h"
#include <vector>
#include "common/common_types.h"
#include "common/util/assert.h"
class BinaryReader {
public:
+1 -1
View File
@@ -5,11 +5,11 @@
* Write raw data like a stream.
*/
#include "common/util/assert.h"
#include <stdexcept>
#include <vector>
#include <cstdint>
#include <cstring>
#include "common/util/assert.h"
struct BinaryWriterRef {
size_t offset;
+2 -2
View File
@@ -1,9 +1,9 @@
#pragma once
#include <optional>
#include "common/util/assert.h"
#include "common/util/Range.h"
#include "common/common_types.h"
#include "common/util/assert.h"
constexpr int BITS_PER_BYTE = 8;
template <typename T>
@@ -93,4 +93,4 @@ inline u32 count_leading_zeros_u32(u32 in) {
_BitScanReverse(&result, in);
return result;
#endif
}
}
+1 -1
View File
@@ -9,7 +9,6 @@
#include <cstdio> /* defines FILENAME_MAX */
#include <fstream>
#include <sstream>
#include "common/util/assert.h"
#include <cstdlib>
#include "common/util/BinaryReader.h"
#include "BinaryWriter.h"
@@ -24,6 +23,7 @@
#include <unistd.h>
#include <cstring>
#endif
#include "common/util/assert.h"
namespace file_util {
std::filesystem::path get_user_home_dir() {
+2 -2
View File
@@ -1,9 +1,9 @@
#pragma once
#include "common/util/assert.h"
#include <cstring>
#include <string>
#include <vector>
#include "common/util/assert.h"
/*!
* The Serializer is a tool to load or save data from a buffer.
@@ -216,4 +216,4 @@ class Serializer {
size_t m_size = 0;
size_t m_offset = 0;
bool m_writing = false;
};
};
+1 -1
View File
@@ -1,11 +1,11 @@
#pragma once
#include <cassert>
#include <cstdint>
#include <iterator>
#include <new>
#include <type_traits>
#include <utility>
#include "assert.h"
namespace cu {
// This might seem stupid, but compiling an empty file with #include <algorithm> takes 0.5 seconds.
+1 -6
View File
@@ -1,11 +1,8 @@
#pragma once
#ifndef JAK_V2_TIMER_H
#define JAK_V2_TIMER_H
#include "common/util/assert.h"
#include <cstdint>
#include <ctime>
#include "common/util/assert.h"
/*!
* Timer for measuring time elapsed with clock_monotonic
@@ -45,5 +42,3 @@ class Timer {
struct timespec _startTime = {};
};
#endif // JAK_V2_TIMER_H
+2 -2
View File
@@ -1,8 +1,8 @@
#pragma once
#include "common/util/assert.h"
#include <vector>
#include <string>
#include "common/util/assert.h"
/*!
* A simple prefix tree. It works similarly to a map, but also supports fast lookups by prefix with
@@ -182,4 +182,4 @@ T* Trie<T>::operator[](const std::string& str) {
template <typename T>
std::vector<T*> Trie<T>::lookup_prefix(const std::string& str) const {
return m_root.lookup_prefix(str.c_str());
}
}
+3 -8
View File
@@ -1,24 +1,19 @@
#pragma once
/*!
* @file assert.h
* Wrapper around <cassert>.
* Make sure this file is always the last one included.
*/
#if defined NDEBUG && defined _WIN32
#pragma push_macro("NDEBUG")
#if defined NDEBUG
#undef NDEBUG
#undef assert
#include <cassert>
#pragma pop_macro("NDEBUG")
#define NDEBUG 1
#else
#include <cassert>
#endif
#define ASSERT assert
+2 -2
View File
@@ -1,8 +1,8 @@
#include "common/util/assert.h"
#include <cstring>
#include "dgo_util.h"
#include "common/versions.h"
#include "third-party/fmt/core.h"
#include "common/util/assert.h"
/*!
* Assert false if the char[] has non-null data after the null terminated string.
@@ -50,4 +50,4 @@ std::string get_object_file_name(const std::string& original_name, u8* data, int
}
return original_name;
}
}
+2 -2
View File
@@ -1,6 +1,6 @@
#include "common/log/log.h"
#include "common/util/assert.h"
#include "json_util.h"
#include "common/util/assert.h"
/*!
* Strip out // and / * comments
@@ -107,4 +107,4 @@ Range<int> parse_json_optional_integer_range(const nlohmann::json& json) {
} else {
throw std::runtime_error("Invalid json as input to parse_json_optional_integer_range");
}
}
}
+1 -1
View File
@@ -5,8 +5,8 @@
*/
#include "InstructionDecode.h"
#include "common/util/assert.h"
#include "decompiler/ObjectFile/LinkedObjectFile.h"
#include "common/util/assert.h"
namespace decompiler {
// utility class to extract fields of an opcode.
+1 -1
View File
@@ -3,8 +3,8 @@
* Utilities for checking if an instruction matches some criteria.
*/
#include "common/util/assert.h"
#include "InstructionMatching.h"
#include "common/util/assert.h"
namespace decompiler {
/*!
+2 -2
View File
@@ -1,9 +1,9 @@
#include "common/util/assert.h"
#include <algorithm>
#include <stdexcept>
#include <optional>
#include "common/common_types.h"
#include "InstructionParser.h"
#include "common/util/assert.h"
namespace decompiler {
InstructionParser::InstructionParser() {
@@ -487,4 +487,4 @@ std::string ParsedProgram::print() {
}
return result;
}
} // namespace decompiler
} // namespace decompiler
+1 -1
View File
@@ -4,9 +4,9 @@
*/
#include "Register.h"
#include "common/util/assert.h"
#include <stdexcept>
#include "third-party/fmt/core.h"
#include "common/util/assert.h"
namespace decompiler {
namespace Reg {
+1 -1
View File
@@ -6,8 +6,8 @@
*/
#include <cstdint>
#include "common/util/assert.h"
#include <string>
#include "common/util/assert.h"
namespace decompiler {
// Namespace for register name constants
+1 -1
View File
@@ -1,8 +1,8 @@
#include <algorithm>
#include "common/util/assert.h"
#include "BasicBlocks.h"
#include "decompiler/ObjectFile/LinkedObjectFile.h"
#include "decompiler/Disasm/InstructionMatching.h"
#include "common/util/assert.h"
namespace decompiler {
/*!
+1 -1
View File
@@ -1,9 +1,9 @@
#include "common/util/assert.h"
#include "common/goos/PrettyPrinter.h"
#include "decompiler/Disasm/InstructionMatching.h"
#include "decompiler/ObjectFile/LinkedObjectFile.h"
#include "CfgVtx.h"
#include "Function.h"
#include "common/util/assert.h"
namespace decompiler {
/////////////////////////////////////////
-4
View File
@@ -1,8 +1,5 @@
#pragma once
#ifndef JAK_DISASSEMBLER_CFGVTX_H
#define JAK_DISASSEMBLER_CFGVTX_H
#include <string>
#include <vector>
#include "common/util/assert.h"
@@ -394,4 +391,3 @@ std::shared_ptr<ControlFlowGraph> build_cfg(const LinkedObjectFile& file,
const CondWithElseLengthHack& cond_with_else_hack,
const std::unordered_set<int>& blocks_ending_in_asm_br);
} // namespace decompiler
#endif // JAK_DISASSEMBLER_CFGVTX_H
+2 -2
View File
@@ -1,4 +1,3 @@
#include "common/util/assert.h"
#include <vector>
#include "Function.h"
#include "common/log/log.h"
@@ -9,6 +8,7 @@
#include "decompiler/IR/IR.h"
#include "decompiler/IR2/Form.h"
#include "common/util/BitUtils.h"
#include "common/util/assert.h"
namespace decompiler {
namespace {
@@ -765,4 +765,4 @@ BlockTopologicalSort Function::bb_topo_sort() {
std::string Function::name() const {
return guessed_name.to_string();
}
} // namespace decompiler
} // namespace decompiler
+2 -3
View File
@@ -2,9 +2,8 @@
#include <string>
#include <vector>
#include <stdexcept>
#include "common/util/assert.h"
#include "third-party/fmt/core.h"
#include "common/util/assert.h"
namespace decompiler {
class DecompWarnings {
@@ -110,4 +109,4 @@ class DecompWarnings {
std::vector<Warning> m_warnings;
bool m_used_lq_sq = false;
};
} // namespace decompiler
} // namespace decompiler
+3 -1
View File
@@ -1,7 +1,8 @@
#pragma once
#ifndef JAK_IR_H
#define JAK_IR_H
#include "common/util/assert.h"
#include <utility>
#include <memory>
#include <unordered_map>
@@ -10,6 +11,7 @@
#include "common/type_system/TypeSpec.h"
#include "decompiler/util/DecompilerTypeSystem.h"
#include "decompiler/util/TP_Type.h"
#include "common/util/assert.h"
namespace goos {
class Object;
+1 -1
View File
@@ -1,4 +1,3 @@
#include "common/util/assert.h"
#include <utility>
#include <stdexcept>
#include "common/goal_constants.h"
@@ -8,6 +7,7 @@
#include "AtomicOp.h"
#include "OpenGoalMapping.h"
#include "Form.h"
#include "common/util/assert.h"
namespace decompiler {
/////////////////////////////
+1 -1
View File
@@ -2,13 +2,13 @@
#include <string>
#include <optional>
#include "common/util/assert.h"
#include <utility>
#include "common/goos/Object.h"
#include "decompiler/Disasm/Register.h"
#include "decompiler/Disasm/Instruction.h"
#include "decompiler/IR2/IR2_common.h"
#include "Env.h"
#include "common/util/assert.h"
namespace decompiler {
class FormElement;
+1 -1
View File
@@ -1,7 +1,7 @@
#include <stdexcept>
#include <unordered_set>
#include <algorithm>
#include <decompiler/util/DecompilerTypeSystem.h>
#include "decompiler/util/DecompilerTypeSystem.h"
#include "Env.h"
#include "Form.h"
#include "decompiler/analysis/atomic_op_builder.h"
+3 -3
View File
@@ -2,14 +2,14 @@
#include <string>
#include <vector>
#include "common/util/assert.h"
#include <common/goos/Object.h>
#include "common/goos/Object.h"
#include "decompiler/util/TP_Type.h"
#include "decompiler/util/StackSpillMap.h"
#include "decompiler/Disasm/Register.h"
#include "decompiler/IR2/IR2_common.h"
#include "decompiler/analysis/reg_usage.h"
#include "decompiler/config.h"
#include "common/util/assert.h"
namespace decompiler {
class LinkedObjectFile;
@@ -234,4 +234,4 @@ class Env {
StackSpillMap m_stack_spill_map;
};
} // namespace decompiler
} // namespace decompiler
+1 -1
View File
@@ -2,7 +2,6 @@
#include <string>
#include <optional>
#include "common/util/assert.h"
#include <utility>
#include <map>
#include "common/goos/Object.h"
@@ -11,6 +10,7 @@
#include "decompiler/IR2/IR2_common.h"
#include "Env.h"
#include "AtomicOp.h"
#include "common/util/assert.h"
namespace decompiler {
+1 -2
View File
@@ -1,10 +1,9 @@
#pragma once
#include "common/util/assert.h"
#include "common/common_types.h"
#include "decompiler/IR2/Form.h"
#include "decompiler/util/data_decompile.h"
#include "common/util/assert.h"
namespace decompiler {
struct BitfieldManip {
+1 -1
View File
@@ -4,7 +4,6 @@
*/
#include <algorithm>
#include "common/util/assert.h"
#include <cstring>
#include <numeric>
#include "decompiler/IR/IR.h"
@@ -15,6 +14,7 @@
#include "third-party/json.hpp"
#include "common/log/log.h"
#include "common/goos/PrettyPrinter.h"
#include "common/util/assert.h"
namespace decompiler {
/*!
@@ -4,13 +4,13 @@
* This implements a decoder for the GOAL linking format.
*/
#include "common/util/assert.h"
#include <cstring>
#include "LinkedObjectFileCreation.h"
#include "decompiler/config.h"
#include "decompiler/util/DecompilerTypeSystem.h"
#include "common/link_types.h"
#include "common/util/BitUtils.h"
#include "common/util/assert.h"
namespace decompiler {
// There are three link versions:
+1 -1
View File
@@ -8,8 +8,8 @@
#include <cstdint>
#include <string>
#include <cstring>
#include "common/util/assert.h"
#include "common/common_types.h"
#include "common/util/assert.h"
namespace decompiler {
class LinkedWord {
+1 -1
View File
@@ -7,7 +7,6 @@
* (there may be different object files with the same name sometimes)
*/
#include "common/util/assert.h"
#include <string>
#include <unordered_map>
#include <vector>
@@ -16,6 +15,7 @@
#include "common/common_types.h"
#include "decompiler/data/TextureDB.h"
#include "decompiler/analysis/symbol_def_map.h"
#include "common/util/assert.h"
namespace decompiler {
/*!
+2 -2
View File
@@ -3,8 +3,8 @@
#include "VuDisassembler.h"
#include "third-party/fmt/core.h"
#include "common/util/assert.h"
#include "common/util/print_float.h"
#include "common/util/assert.h"
namespace decompiler {
@@ -733,4 +733,4 @@ void VuDisassembler::name_labels() {
m_label_names.at(label_idx) = fmt::format("L{}", idx++);
}
}
} // namespace decompiler
} // namespace decompiler
+2 -3
View File
@@ -1,7 +1,6 @@
#include "common/util/assert.h"
#include "third-party/fmt/core.h"
#include "VuInstruction.h"
#include "common/util/assert.h"
namespace decompiler {
VuInstructionAtom VuInstructionAtom::make_vf(int idx) {
@@ -89,4 +88,4 @@ VuInstruction VuInstruction::make_fp_constant(u32 value) {
result.kind = VuInstrK::FP_CONSTANT;
return result;
}
} // namespace decompiler
} // namespace decompiler
+2 -1
View File
@@ -20,11 +20,12 @@
#include <unordered_map>
#include <vector>
#include "common/util/assert.h"
#include "decompiler/Disasm/Register.h"
#include "decompiler/IR2/IR2_common.h"
#include "decompiler/util/TP_Type.h"
#include "common/util/assert.h"
namespace decompiler {
class Function;
+2 -2
View File
@@ -1,11 +1,11 @@
#pragma once
#include "common/util/assert.h"
#include <cstring>
#include <vector>
#include <string>
#include <stdexcept>
#include "common/common_types.h"
#include "decompiler/ObjectFile/LinkedWord.h"
#include "common/util/assert.h"
namespace decompiler {
class LinkedWordReader {
@@ -41,4 +41,4 @@ class LinkedWordReader {
const std::vector<LinkedWord>* m_words = nullptr;
u32 m_offset = 0;
};
} // namespace decompiler
} // namespace decompiler
+2 -2
View File
@@ -3,12 +3,12 @@
* Utility class to read a .STR file and extract the full file name.
*/
#include "common/util/assert.h"
#include <cstring>
#include "common/util/FileUtil.h"
#include "game/common/overlord_common.h"
#include "game/common/str_rpc_types.h"
#include "StrFileReader.h"
#include "common/util/assert.h"
namespace decompiler {
StrFileReader::StrFileReader(const std::string& file_path) {
@@ -180,4 +180,4 @@ std::string StrFileReader::get_full_name(const std::string& short_name) const {
return result;
}
} // namespace decompiler
} // namespace decompiler
+2 -2
View File
@@ -1,7 +1,7 @@
#include "TextureDB.h"
#include "common/util/assert.h"
#include "third-party/fmt/core.h"
#include "common/util/assert.h"
namespace decompiler {
@@ -37,4 +37,4 @@ void TextureDB::add_texture(u32 tpage,
}
}
} // namespace decompiler
} // namespace decompiler
+2 -2
View File
@@ -14,7 +14,7 @@
* check duplicate names
*/
#include <common/util/FileUtil.h>
#include "common/util/FileUtil.h"
#include "tpage.h"
#include "common/versions.h"
#include "decompiler/ObjectFile/ObjectFileDB.h"
@@ -703,4 +703,4 @@ TPageResultStats process_tpage(ObjectFileData& data, TextureDB& texture_db) {
}
return stats;
}
} // namespace decompiler
} // namespace decompiler
+1 -1
View File
@@ -1,10 +1,10 @@
#include "extract_tfrag.h"
#include "common/dma/dma.h"
#include "common/util/assert.h"
#include "decompiler/util/Error.h"
#include "decompiler/ObjectFile/LinkedObjectFile.h"
#include "common/util/FileUtil.h"
#include "common/dma/gs.h"
#include "common/util/assert.h"
namespace decompiler {
namespace {
+1 -1
View File
@@ -1,7 +1,7 @@
#include <stdexcept>
#include "common/util/assert.h"
#include "DataParser.h"
#include "third-party/fmt/core.h"
#include "common/util/assert.h"
/*
* Allowable lines:
+1 -1
View File
@@ -1,11 +1,11 @@
#pragma once
#include <string>
#include "common/util/assert.h"
#include <stdexcept>
#include "common/log/log.h"
#include "common/type_system/TypeSpec.h"
#include "common/common_types.h"
#include "decompiler/Disasm/Register.h"
#include "common/util/assert.h"
namespace decompiler {
/*!
+2 -2
View File
@@ -1,8 +1,8 @@
#include "Shader.h"
#include "common/util/assert.h"
#include "common/util/FileUtil.h"
#include "common/log/log.h"
#include "game/graphics/pipelines/opengl.h"
#include "common/util/assert.h"
Shader::Shader(const std::string& shader_name) {
// read the shader source
@@ -79,4 +79,4 @@ ShaderLibrary::ShaderLibrary() {
at(ShaderId::BUFFERED_TCC1) = {"buffered_tcc1"};
at(ShaderId::TFRAG3) = {"tfrag3"};
at(ShaderId::TFRAG3_NO_TEX) = {"tfrag3_no_tex"};
}
}
+1 -2
View File
@@ -1,8 +1,7 @@
#include "game/graphics/sceGraphicsInterface.h"
#include "common/util/assert.h"
#include "game/graphics/gfx.h"
#include <cstdio>
#include "common/util/assert.h"
/*!
* Wait for rendering to complete.
+2 -2
View File
@@ -1,8 +1,8 @@
#include "TextureConverter.h"
#include "common/util/assert.h"
#include "third-party/fmt/core.h"
#include "common/util/FileUtil.h"
#include "common/texture/texture_conversion.h"
#include "common/util/assert.h"
TextureConverter::TextureConverter() {
m_vram.resize(4 * 1024 * 1024);
@@ -200,4 +200,4 @@ void TextureConverter::download_rgba8888(u8* result,
void TextureConverter::serialize(Serializer& ser) {
ser.from_pod_vector(&m_vram);
}
}
+2 -2
View File
@@ -4,11 +4,11 @@
#include "third-party/fmt/core.h"
#include "third-party/imgui/imgui.h"
#include "common/util/assert.h"
#include "common/util/FileUtil.h"
#include "common/util/Timer.h"
#include "common/log/log.h"
#include "game/graphics/pipelines/opengl.h"
#include "common/util/assert.h"
////////////////////////////////
// Extraction of textures
@@ -443,4 +443,4 @@ TextureRecord* TexturePool::get_random_texture() {
}
}
return nullptr;
}
}
+1 -1
View File
@@ -5,9 +5,9 @@
* Representation of a GOAL pointer which can be converted to/from a C pointer.
*/
#include "common/util/assert.h"
#include "game/runtime.h"
#include "common/common_types.h"
#include "common/util/assert.h"
/*!
* GOAL pointer to a T. Represented as a 32-bit unsigned offset from g_ee_main_mem.
+2 -2
View File
@@ -4,13 +4,13 @@
* DONE!
*/
#include "common/util/assert.h"
#include <cstring>
#include <cstdio>
#include "game/sce/sif_ee.h"
#include "fileio.h"
#include "kprint.h"
#include "common/versions.h"
#include "common/util/assert.h"
namespace {
// buffer for file paths. This might be static char buffer[512]. Maybe 633 is the line number?
@@ -518,4 +518,4 @@ s32 FileSave(char* name, u8* data, s32 size) {
sceClose(fd);
return 0;
}
}
+1 -1
View File
@@ -6,11 +6,11 @@
#include <cstring>
#include <cstdio>
#include "common/util/assert.h"
#include "game/sce/deci2.h"
#include "game/system/deci_common.h" // todo, reorganize to avoid this include
#include "kdsnetm.h"
#include "kprint.h"
#include "common/util/assert.h"
using namespace ee;
+2 -2
View File
@@ -7,7 +7,6 @@
*/
#include <cstring>
#include "common/util/assert.h"
#include <cstdio>
#include <common/versions.h>
#include "klink.h"
@@ -18,6 +17,7 @@
#include "common/symbols.h"
#include "common/goal_constants.h"
#include "game/mips2c/mips2c_table.h"
#include "common/util/assert.h"
namespace {
// turn on printf's for debugging linking issues.
@@ -912,4 +912,4 @@ c_rellink3__FPvP12link_segmentPUc
c_symlink2__FPvUiPUc
c_symlink3__FPvUiPUc
update_goal_fns__Fv
*/
*/
+1 -1
View File
@@ -7,7 +7,6 @@
#include <string>
#include <cstring>
#include "common/util/assert.h"
#include "kmachine.h"
#include "kboot.h"
#include "kprint.h"
@@ -38,6 +37,7 @@
#include "game/system/vm/vm.h"
#include "game/system/newpad.h"
#include "game/sce/libscf.h"
#include "common/util/assert.h"
using namespace ee;
/*!
+1 -1
View File
@@ -7,7 +7,6 @@
#include <cmath>
#include <cstdarg>
#include <cstdio>
#include "common/util/assert.h"
#include "common/goal_constants.h"
#include "common/common_types.h"
@@ -23,6 +22,7 @@
#include "klisten.h"
#include "klink.h"
#include "common/symbols.h"
#include "common/util/assert.h"
///////////
// SDATA
+1 -1
View File
@@ -4,7 +4,6 @@
*/
#include <cstring>
#include "common/util/assert.h"
#include "kscheme.h"
#include "common/common_types.h"
#include "common/goal_constants.h"
@@ -24,6 +23,7 @@
#include "common/log/log.h"
#include "common/util/Timer.h"
#include "game/mips2c/mips2c_table.h"
#include "common/util/assert.h"
//! Controls link mode when EnableMethodSet = 0, MasterDebug = 1, DiskBoot = 0. Will enable a
//! warning message if EnableMethodSet = 1
+2 -2
View File
@@ -5,9 +5,9 @@
#include "common/common_types.h"
#include "game/mips2c/mips2c_table.h"
#include "common/util/assert.h"
#include "common/util/BitUtils.h"
#include "third-party/fmt/core.h"
#include "common/util/assert.h"
// This file contains utility functions for code generated by the mips2c pass.
// This is only useful for
@@ -1050,4 +1050,4 @@ inline void load_vfs_from_tf_regs(const void* tf_regs_sym, ExecutionContext* c)
u8* c_addr_of_vf1 = g_ee_main_mem + goal_addr_of_vf1;
memcpy(&c->vfs[1], c_addr_of_vf1, 31 * 16);
}
} // namespace Mips2C
} // namespace Mips2C
+1 -1
View File
@@ -10,13 +10,13 @@
*/
#include <cstring>
#include "common/util/assert.h"
#include "fake_iso.h"
#include "game/sce/iop.h"
#include "isocommon.h"
#include "overlord.h"
#include "common/util/FileUtil.h"
#include "common/log/log.h"
#include "common/util/assert.h"
using namespace iop;
+1 -1
View File
@@ -5,7 +5,6 @@
*/
#include "common/log/log.h"
#include <assert.h>
#include <cstring>
#include <cstdio>
#include "iso.h"
@@ -17,6 +16,7 @@
#include "dma.h"
#include "fake_iso.h"
#include "game/common/dgo_rpc_types.h"
#include "common/util/assert.h"
using namespace iop;
+2 -2
View File
@@ -1,8 +1,8 @@
#include "iso_api.h"
#include "game/sce/iop.h"
#include "common/log/log.h"
#include "common/util/assert.h"
#include "sbank.h"
#include "common/util/assert.h"
using namespace iop;
@@ -83,4 +83,4 @@ void LoadSoundBank(const char* bank_name, SoundBank* bank) {
cmd.bank = bank;
SendMbx(iso_mbx, &cmd);
SleepThread(); // wait for finish.
}
}
+1 -1
View File
@@ -1,10 +1,10 @@
#include <cstring>
#include <cstdio>
#include "common/util/assert.h"
#include "common/log/log.h"
#include "game/sce/iop.h"
#include "iso_queue.h"
#include "isocommon.h"
#include "common/util/assert.h"
using namespace iop;
+2 -2
View File
@@ -3,10 +3,10 @@
* Common ISO utilities.
*/
#include <assert.h>
#include "common/common_types.h"
#include <cstring>
#include "isocommon.h"
#include "common/util/assert.h"
/*!
* Convert file name to "ISO Name"
@@ -193,4 +193,4 @@ void ISONameFromAnimationName(char* dst, const char* src) {
// append file extension
strcpy(dst + 8, "STR");
}
}
+2 -2
View File
@@ -5,7 +5,6 @@
*/
#include <cstring>
#include "common/util/assert.h"
#include <cstdio>
#include "common/common_types.h"
#include "game/common/ramdisk_rpc_types.h"
@@ -13,6 +12,7 @@
#include "iso.h"
#include "iso_api.h"
#include "game/sce/iop.h"
#include "common/util/assert.h"
// Note - the RAMDISK code supports having multiple files, but it appears only one file can ever be
// used at a time.
@@ -185,4 +185,4 @@ void* RPC_Ramdisk(unsigned int fno, void* data, int size) {
printf("[OVERLORD RAMDISK] Unsupported fno\n"); // ADDED
}
return nullptr;
}
}
+2 -2
View File
@@ -1,7 +1,7 @@
#include <assert.h>
#include "soundcommon.h"
#include "common/util/assert.h"
void PrintBankInfo(void* buffer) {
(void)buffer;
assert(false);
}
}
+2 -2
View File
@@ -1,6 +1,5 @@
#include <cstring>
#include <cstdio>
#include "common/util/assert.h"
#include "srpc.h"
#include "game/sce/iop.h"
#include "game/common/loader_rpc_types.h"
@@ -8,6 +7,7 @@
#include "common/versions.h"
#include "sbank.h"
#include "iso_api.h"
#include "common/util/assert.h"
using namespace iop;
@@ -94,4 +94,4 @@ void* RPC_Loader(unsigned int /*fno*/, void* data, int size) {
}
}
return nullptr;
}
}
+1 -1
View File
@@ -4,7 +4,6 @@
* Supports loading a file directly to the EE, or loading chunks of a chunked file.
*/
#include "common/util/assert.h"
#include <cstring>
#include "stream.h"
#include "game/sce/iop.h"
@@ -12,6 +11,7 @@
#include "game/common/play_rpc_types.h"
#include "game/overlord/isocommon.h"
#include "game/overlord/iso_api.h"
#include "common/util/assert.h"
using namespace iop;
+1 -1
View File
@@ -8,7 +8,7 @@
#include <sys/mman.h>
#elif _WIN32
#include <io.h>
#include <third-party/mman/mman.h>
#include "third-party/mman/mman.h"
#include <Windows.h>
#endif
+1 -1
View File
@@ -3,12 +3,12 @@
* Implementation of SCE DECI2 library.
*/
#include "common/util/assert.h"
#include <cstdio>
#include <cstring>
#include "common/log/log.h"
#include "deci2.h"
#include "game/system/Deci2Server.h"
#include "common/util/assert.h"
namespace ee {
+1 -1
View File
@@ -1,7 +1,7 @@
#include "common/util/assert.h"
#include <cstring>
#include "iop.h"
#include "game/system/iop_thread.h"
#include "common/util/assert.h"
namespace iop {
/*!
+2 -2
View File
@@ -3,8 +3,8 @@
* Stub implementation of the EE CD/DVD library
*/
#include "common/util/assert.h"
#include "libcdvd_ee.h"
#include "common/util/assert.h"
namespace ee {
@@ -59,4 +59,4 @@ int sceCdGetDiskType() {
return SCECdIllegalMedia;
}
}
} // namespace ee
} // namespace ee
+1 -1
View File
@@ -1,8 +1,8 @@
#include "common/util/assert.h"
#include "libpad.h"
#include "game/kernel/kmachine.h"
#include "game/graphics/gfx.h"
#include "common/util/assert.h"
/*!
* @file libpad.cpp
+1 -1
View File
@@ -1,11 +1,11 @@
#include <cstring>
#include "common/util/assert.h"
#include <cstdio>
#include <unordered_map>
#include "common/util/FileUtil.h"
#include "sif_ee.h"
#include "game/system/iop_thread.h"
#include "game/runtime.h"
#include "common/util/assert.h"
namespace ee {
+1 -1
View File
@@ -1,6 +1,6 @@
#include <stdexcept>
#include "common/util/assert.h"
#include "stubs.h"
#include "common/util/assert.h"
namespace ee {
+1 -1
View File
@@ -5,7 +5,6 @@
*/
#include <cstdio>
#include "common/util/assert.h"
#include <utility>
// TODO - i think im not including the dependency right..?
@@ -24,6 +23,7 @@
#include "common/listener_common.h"
#include "common/versions.h"
#include "Deci2Server.h"
#include "common/util/assert.h"
Deci2Server::Deci2Server(std::function<bool()> shutdown_callback) {
buffer = new char[BUFFER_SIZE];
+2 -2
View File
@@ -1,7 +1,7 @@
#include "common/util/assert.h"
#include <cstring>
#include "IOP_Kernel.h"
#include "game/sce/iop.h"
#include "common/util/assert.h"
/*!
* Create a new thread. Will not run the thread.
@@ -316,4 +316,4 @@ IOP_Kernel::~IOP_Kernel() {
if (iso_disc_file) {
fclose(iso_disc_file);
}
}
}
+1 -1
View File
@@ -10,8 +10,8 @@
#include <mutex>
#include <condition_variable>
#include <atomic>
#include "common/util/assert.h"
#include "common/common_types.h"
#include "common/util/assert.h"
class IOP_Kernel;
namespace iop {
+1
View File
@@ -1904,3 +1904,4 @@
("water-anim.o" "water-anim")
("lava.o" "lava")
)
+67 -67
View File
@@ -254,12 +254,12 @@
(defun file-stream-read-symbol ((file file-stream))
(file-stream-seek-past-whitespace file)
(file-stream-read-word file)
(cond
((string= *pc-temp-string* "#f") #f)
((string= *pc-temp-string* "#t") #t)
((string= *pc-temp-string* "aspect4x3") 'aspect4x3)
((string= *pc-temp-string* "aspect16x9") 'aspect16x9)
((string= *pc-temp-string* "borderless") 'borderless)
(case-str *pc-temp-string*
(("#f") #f)
(("#t") #t)
(("aspect4x3") 'aspect4x3)
(("aspect16x9") 'aspect16x9)
(("borderless") 'borderless)
(else #t)
)
)
@@ -326,85 +326,85 @@
(let ((version PC_KERNEL_VERSION))
(with-settings-scope (file)
(file-stream-read-word file)
(cond
((string= *pc-temp-string* "settings")
(case-str *pc-temp-string*
(("settings")
(set! version (file-stream-read-int file))
(dosettings (file)
(cond
((string= *pc-temp-string* "fps") (set! (-> obj target-fps) (file-stream-read-int file)))
((string= *pc-temp-string* "size")
(case-str *pc-temp-string*
(("fps") (set! (-> obj target-fps) (file-stream-read-int file)))
(("size")
(set! (-> obj width) (file-stream-read-int file))
(set! (-> obj height) (file-stream-read-int file))
(set-size! obj (-> obj width) (-> obj height))
(set-aspect! obj (-> obj width) (-> obj height))
)
((string= *pc-temp-string* "aspect")
(("aspect")
(set! (-> obj aspect-custom-x) (file-stream-read-int file))
(set! (-> obj aspect-custom-y) (file-stream-read-int file))
)
((string= *pc-temp-string* "aspect-auto") (set! (-> obj aspect-ratio-auto?) (file-stream-read-symbol file)))
((string= *pc-temp-string* "aspect-game") (set! (-> *setting-control* default aspect-ratio) (file-stream-read-symbol file)))
((string= *pc-temp-string* "fullscreen") (set-fullscreen! obj (file-stream-read-symbol file)))
((string= *pc-temp-string* "letterbox") (set! (-> obj letterbox?) (file-stream-read-symbol file)))
((string= *pc-temp-string* "vsync") (set! (-> obj vsync?) (file-stream-read-symbol file)))
((string= *pc-temp-string* "font-scale") (set! (-> obj font-scale) (file-stream-read-float file)))
((string= *pc-temp-string* "audio-latency-ms") (set! (-> obj audio-latency-ms) (file-stream-read-int file)))
((string= *pc-temp-string* "audio-pan-override") (set! (-> obj audio-pan-override) (file-stream-read-float file)))
((string= *pc-temp-string* "audio-volume-override") (set! (-> obj audio-volume-override) (file-stream-read-float file)))
((string= *pc-temp-string* "audio-channel-nb") (set! (-> obj audio-channel-nb) (file-stream-read-int file)))
((string= *pc-temp-string* "gfx-renderer") (set! (-> obj gfx-renderer) (the-as pc-gfx-renderer (file-stream-read-int file))))
((string= *pc-temp-string* "gfx-resolution") (set! (-> obj gfx-resolution) (file-stream-read-float file)))
((string= *pc-temp-string* "gfx-anisotropy") (set! (-> obj gfx-anisotropy) (file-stream-read-float file)))
((string= *pc-temp-string* "shrub-dist-mod") (set! (-> obj shrub-dist-mod) (file-stream-read-float file)))
((string= *pc-temp-string* "lod-dist-mod") (set! (-> obj lod-dist-mod) (file-stream-read-float file)))
((string= *pc-temp-string* "lod-force-tfrag") (set! (-> obj lod-force-tfrag) (file-stream-read-int file)))
((string= *pc-temp-string* "lod-force-tie") (set! (-> obj lod-force-tie) (file-stream-read-int file)))
((string= *pc-temp-string* "lod-force-ocean") (set! (-> obj lod-force-ocean) (file-stream-read-int file)))
((string= *pc-temp-string* "lod-force-actor") (set! (-> obj lod-force-actor) (file-stream-read-int file)))
((string= *pc-temp-string* "subtitle-language") (set! (-> obj subtitle-language) (the-as pc-subtitle-lang (file-stream-read-int file))))
((string= *pc-temp-string* "stick-deadzone") (set! (-> obj stick-deadzone) (file-stream-read-float file)))
((string= *pc-temp-string* "ps2-read-speed?") (set! (-> obj ps2-read-speed?) (file-stream-read-symbol file)))
((string= *pc-temp-string* "ps2-parts?") (set! (-> obj ps2-parts?) (file-stream-read-symbol file)))
((string= *pc-temp-string* "ps2-music?") (set! (-> obj ps2-music?) (file-stream-read-symbol file)))
((string= *pc-temp-string* "ps2-se?") (set! (-> obj ps2-se?) (file-stream-read-symbol file)))
((string= *pc-temp-string* "ps2-hints?") (set! (-> obj ps2-hints?) (file-stream-read-symbol file)))
((string= *pc-temp-string* "ps2-lod-dist?") (set! (-> obj ps2-lod-dist?) (file-stream-read-symbol file)))
((string= *pc-temp-string* "music-fade?") (set! (-> obj music-fade?) (file-stream-read-symbol file)))
((string= *pc-temp-string* "use-vis?") (set! (-> obj use-vis?) (file-stream-read-symbol file)))
((string= *pc-temp-string* "skip-movies?") (set! (-> obj skip-movies?) (file-stream-read-symbol file)))
((string= *pc-temp-string* "subtitles?") (set! (-> obj subtitles?) (file-stream-read-symbol file)))
((string= *pc-temp-string* "hinttitles?") (set! (-> obj hinttitles?) (file-stream-read-symbol file)))
((string= *pc-temp-string* "scenes-seen")
(("aspect-auto") (set! (-> obj aspect-ratio-auto?) (file-stream-read-symbol file)))
(("aspect-game") (set! (-> *setting-control* default aspect-ratio) (file-stream-read-symbol file)))
(("fullscreen") (set-fullscreen! obj (file-stream-read-symbol file)))
(("letterbox") (set! (-> obj letterbox?) (file-stream-read-symbol file)))
(("vsync") (set! (-> obj vsync?) (file-stream-read-symbol file)))
(("font-scale") (set! (-> obj font-scale) (file-stream-read-float file)))
(("audio-latency-ms") (set! (-> obj audio-latency-ms) (file-stream-read-int file)))
(("audio-pan-override") (set! (-> obj audio-pan-override) (file-stream-read-float file)))
(("audio-volume-override") (set! (-> obj audio-volume-override) (file-stream-read-float file)))
(("audio-channel-nb") (set! (-> obj audio-channel-nb) (file-stream-read-int file)))
(("gfx-renderer") (set! (-> obj gfx-renderer) (the-as pc-gfx-renderer (file-stream-read-int file))))
(("gfx-resolution") (set! (-> obj gfx-resolution) (file-stream-read-float file)))
(("gfx-anisotropy") (set! (-> obj gfx-anisotropy) (file-stream-read-float file)))
(("shrub-dist-mod") (set! (-> obj shrub-dist-mod) (file-stream-read-float file)))
(("lod-dist-mod") (set! (-> obj lod-dist-mod) (file-stream-read-float file)))
(("lod-force-tfrag") (set! (-> obj lod-force-tfrag) (file-stream-read-int file)))
(("lod-force-tie") (set! (-> obj lod-force-tie) (file-stream-read-int file)))
(("lod-force-ocean") (set! (-> obj lod-force-ocean) (file-stream-read-int file)))
(("lod-force-actor") (set! (-> obj lod-force-actor) (file-stream-read-int file)))
(("subtitle-language") (set! (-> obj subtitle-language) (the-as pc-subtitle-lang (file-stream-read-int file))))
(("stick-deadzone") (set! (-> obj stick-deadzone) (file-stream-read-float file)))
(("ps2-read-speed?") (set! (-> obj ps2-read-speed?) (file-stream-read-symbol file)))
(("ps2-parts?") (set! (-> obj ps2-parts?) (file-stream-read-symbol file)))
(("ps2-music?") (set! (-> obj ps2-music?) (file-stream-read-symbol file)))
(("ps2-se?") (set! (-> obj ps2-se?) (file-stream-read-symbol file)))
(("ps2-hints?") (set! (-> obj ps2-hints?) (file-stream-read-symbol file)))
(("ps2-lod-dist?") (set! (-> obj ps2-lod-dist?) (file-stream-read-symbol file)))
(("music-fade?") (set! (-> obj music-fade?) (file-stream-read-symbol file)))
(("use-vis?") (set! (-> obj use-vis?) (file-stream-read-symbol file)))
(("skip-movies?") (set! (-> obj skip-movies?) (file-stream-read-symbol file)))
(("subtitles?") (set! (-> obj subtitles?) (file-stream-read-symbol file)))
(("hinttitles?") (set! (-> obj hinttitles?) (file-stream-read-symbol file)))
(("scenes-seen")
(dotimes (i 197)
(set! (-> obj scenes-seen i) (file-stream-read-int file))
)
)
((string= *pc-temp-string* "fixes")
(("fixes")
(dosettings (file)
(cond
((string= *pc-temp-string* "crash-sagecage") (set! (-> obj fixes crash-sagecage) (file-stream-read-symbol file)))
((string= *pc-temp-string* "crash-dma") (set! (-> obj fixes crash-dma) (file-stream-read-symbol file)))
((string= *pc-temp-string* "crash-light-eco") (set! (-> obj fixes crash-light-eco) (file-stream-read-symbol file)))
((string= *pc-temp-string* "lockout-pelican") (set! (-> obj fixes lockout-pelican) (file-stream-read-symbol file)))
((string= *pc-temp-string* "lockout-pipegame") (set! (-> obj fixes lockout-pipegame) (file-stream-read-symbol file)))
((string= *pc-temp-string* "lockout-gambler") (set! (-> obj fixes lockout-gambler) (file-stream-read-symbol file)))
((string= *pc-temp-string* "fix-movies") (set! (-> obj fixes fix-movies) (file-stream-read-symbol file)))
((string= *pc-temp-string* "fix-credits") (set! (-> obj fixes fix-credits) (file-stream-read-symbol file)))
(case-str *pc-temp-string*
(("crash-sagecage") (set! (-> obj fixes crash-sagecage) (file-stream-read-symbol file)))
(("crash-dma") (set! (-> obj fixes crash-dma) (file-stream-read-symbol file)))
(("crash-light-eco") (set! (-> obj fixes crash-light-eco) (file-stream-read-symbol file)))
(("lockout-pelican") (set! (-> obj fixes lockout-pelican) (file-stream-read-symbol file)))
(("lockout-pipegame") (set! (-> obj fixes lockout-pipegame) (file-stream-read-symbol file)))
(("lockout-gambler") (set! (-> obj fixes lockout-gambler) (file-stream-read-symbol file)))
(("fix-movies") (set! (-> obj fixes fix-movies) (file-stream-read-symbol file)))
(("fix-credits") (set! (-> obj fixes fix-credits) (file-stream-read-symbol file)))
)
)
)
((string= *pc-temp-string* "secrets")
(("secrets")
(dosettings (file)
(cond
((string= *pc-temp-string* "hard-rats?") (set! (-> obj secrets hard-rats?) (file-stream-read-symbol file)))
((string= *pc-temp-string* "hero-mode?") (set! (-> obj secrets hero-mode?) (file-stream-read-symbol file)))
((string= *pc-temp-string* "hud-map?") (set! (-> obj secrets hud-map?) (file-stream-read-symbol file)))
((string= *pc-temp-string* "hud-counters?") (set! (-> obj secrets hud-counters?) (file-stream-read-symbol file)))
((string= *pc-temp-string* "art") (set! (-> obj secrets art) (the-as pc-jak1-concept-art (file-stream-read-int file))))
((string= *pc-temp-string* "hard-fish-hiscore") (set! (-> obj secrets hard-fish-hiscore) (file-stream-read-int file)))
((string= *pc-temp-string* "hard-rats-hiscore") (set! (-> obj secrets hard-rats-hiscore) (file-stream-read-int file)))
((string= *pc-temp-string* "hard-rats-hiwave") (set! (-> obj secrets hard-rats-hiwave) (file-stream-read-int file)))
((string= *pc-temp-string* "music")
(case-str *pc-temp-string*
(("hard-rats?") (set! (-> obj secrets hard-rats?) (file-stream-read-symbol file)))
(("hero-mode?") (set! (-> obj secrets hero-mode?) (file-stream-read-symbol file)))
(("hud-map?") (set! (-> obj secrets hud-map?) (file-stream-read-symbol file)))
(("hud-counters?") (set! (-> obj secrets hud-counters?) (file-stream-read-symbol file)))
(("art") (set! (-> obj secrets art) (the-as pc-jak1-concept-art (file-stream-read-int file))))
(("hard-fish-hiscore") (set! (-> obj secrets hard-fish-hiscore) (file-stream-read-int file)))
(("hard-rats-hiscore") (set! (-> obj secrets hard-rats-hiscore) (file-stream-read-int file)))
(("hard-rats-hiwave") (set! (-> obj secrets hard-rats-hiwave) (file-stream-read-int file)))
(("music")
(dotimes (i 30)
(set! (-> obj secrets music i) (file-stream-read-int file))
)
@@ -412,7 +412,7 @@
)
)
)
((string= *pc-temp-string* "panic")
(("panic")
(when (file-stream-read-symbol file)
(file-stream-close file)
(reset obj)
+9 -3
View File
@@ -423,7 +423,7 @@
`(none)
)
(defmacro case (switch &rest cases)
(defmacro case (switch &key (comp =) &rest cases)
"A switch-case construct. switch is saved onto a local variable and compared against each case, sequentially.
else can be used like the 'default' case, but it must be the last one."
@@ -444,11 +444,11 @@
)
;; if the list is made up of a single condition
( (= (length conditions) 1)
`((= sw ,(first conditions)) ,@body)
`((,comp sw ,(first conditions)) ,@body)
)
;; otherwise it is made up of multiple conditions, or them together!
(#t
`((or ,@(apply (lambda (c) `(= sw ,c)) conditions)) ,@body)
`((or ,@(apply (lambda (c) `(,comp sw ,c)) conditions)) ,@body)
)
)
@@ -461,6 +461,12 @@
)
)
(defmacro case-str (switch &rest cases)
"Same as case, but for string comparisons instead."
`(case ,switch ,@cases :comp string=)
)
;;;;;;;;;;;;;;;;;;;
;; Math Macros
;;;;;;;;;;;;;;;;;;;
+2 -2
View File
@@ -1,10 +1,10 @@
#pragma once
#include <string>
#include "common/util/assert.h"
#include "common/common_types.h"
#include "common/util/BitUtils.h"
#include "third-party/fmt/core.h"
#include "common/util/assert.h"
struct U128 {
U128() = default;
@@ -84,4 +84,4 @@ class ConstantValue {
protected:
u8 m_value[16] = {0};
int m_size;
};
};
+2 -2
View File
@@ -1,11 +1,11 @@
#pragma once
#include "common/util/assert.h"
#include <vector>
#include <string>
#include <set>
#include "common/util/Trie.h"
#include "common/goos/Object.h"
#include "common/util/assert.h"
/*!
* Info about a single symbol, representing one of:
@@ -169,4 +169,4 @@ class SymbolInfoMap {
private:
Trie<std::vector<SymbolInfo>> m_map;
};
};
+2 -2
View File
@@ -1,8 +1,8 @@
#include <cstring>
#include <algorithm>
#include "common/util/assert.h"
#include "DataObjectGenerator.h"
#include "common/link_types.h"
#include "common/util/assert.h"
namespace {
template <typename T>
@@ -265,4 +265,4 @@ void DataObjectGenerator::add_strings() {
link_word_to_word(source, target_word);
}
}
}
}
+1 -1
View File
@@ -5,10 +5,10 @@
#include <optional>
#include <memory>
#include <unordered_map>
#include "common/util/assert.h"
#include "common/common_types.h"
#include "goalc/emitter/Instruction.h"
#include "goalc/debugger/disassemble.h"
#include "common/util/assert.h"
class FunctionEnv;
+1 -1
View File
@@ -8,11 +8,11 @@
#include "common/goal_constants.h"
#include "common/symbols.h"
#include "common/util/Timer.h"
#include "common/util/assert.h"
#include "goalc/debugger/disassemble.h"
#include "goalc/emitter/Register.h"
#include "goalc/listener/Listener.h"
#include "third-party/fmt/core.h"
#include "common/util/assert.h"
/*!
* Is the target halted? If we don't know or aren't connected, returns false.
+2 -3
View File
@@ -1,6 +1,5 @@
#include "common/util/assert.h"
#include "CallingConvention.h"
#include "common/util/assert.h"
CallingConvention get_function_calling_convention(const TypeSpec& function_type,
const TypeSystem& type_system) {
@@ -54,4 +53,4 @@ std::vector<emitter::Register> get_arg_registers(const TypeSystem& type_system,
}
}
return result;
}
}
+2 -2
View File
@@ -9,7 +9,7 @@
#ifdef __linux__
#include <sys/mman.h>
#elif _WIN32
#include <third-party/mman/mman.h>
#include "third-party/mman/mman.h"
#endif
#include <cstdio>
@@ -146,4 +146,4 @@ CodeTester::~CodeTester() {
munmap(code_buffer, code_buffer_capacity);
}
}
} // namespace emitter
} // namespace emitter
+1 -1
View File
@@ -1,9 +1,9 @@
#pragma once
#include "common/util/assert.h"
#include "Register.h"
#include "Instruction.h"
#include <stdexcept>
#include "common/util/assert.h"
namespace emitter {
class IGen {
+1 -1
View File
@@ -3,8 +3,8 @@
#ifndef JAK_INSTRUCTION_H
#define JAK_INSTRUCTION_H
#include "common/util/assert.h"
#include "common/common_types.h"
#include "common/util/assert.h"
namespace emitter {
/*!
+1 -1
View File
@@ -5,12 +5,12 @@
* Representation of an x86-64 Register.
*/
#include "common/util/assert.h"
#include <array>
#include <vector>
#include <string>
#include "common/common_types.h"
#include "common/goal_constants.h"
#include "common/util/assert.h"
namespace emitter {
+1 -1
View File
@@ -21,7 +21,6 @@
#include "common/cross_sockets/xsocket.h"
#include <stdexcept>
#include "common/util/assert.h"
#include <cstring>
#include <chrono>
#include <thread>
@@ -30,6 +29,7 @@
#include "common/versions.h"
#include "third-party/fmt/core.h"
#include "common/util/assert.h"
using namespace versions;
constexpr bool debug_listener = false;
+2 -2
View File
@@ -1,10 +1,10 @@
#include "common/util/assert.h"
#include <algorithm>
#include <stdexcept>
#include "MemoryMap.h"
#include "third-party/fmt/core.h"
#include "common/link_types.h"
#include "common/util/BitUtils.h"
#include "common/util/assert.h"
namespace listener {
std::string LoadEntry::print() const {
@@ -120,4 +120,4 @@ bool MemoryMap::lookup(const std::string& obj_name, u8 seg_id, MemoryMapEntry* o
}
return false;
}
} // namespace listener
} // namespace listener

Some files were not shown because too many files have changed in this diff Show More