mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 00:57:44 -04:00
Mark OpenGOAL regions in IR2 output and cleanup some now irrelevant settings (#1237)
* remove redundant vscode settings and duplicate goalc atoms * decompiler: add some region markers for OpenGOAL blocks
This commit is contained in:
parent
d136aec00f
commit
8574e10653
313
.vscode/settings.json
vendored
313
.vscode/settings.json
vendored
|
@ -1,316 +1,3 @@
|
|||
{
|
||||
"terminal.integrated.scrollback": 32000,
|
||||
"files.associations": {
|
||||
"*ir2.asm": "Plain Text",
|
||||
"*.gc": "lisp",
|
||||
"*.gs": "lisp",
|
||||
"*.gd": "lisp",
|
||||
"*.gp": "lisp"
|
||||
},
|
||||
"highlight.maxMatches": 50000, // Maximum number of matches to decorate per regex, in order not to crash the app with accidental cathastropic regexes
|
||||
"highlight.regexes": {
|
||||
"(\\.function.*)": {
|
||||
"filterFileRegex": ".*ir2\\.asm",
|
||||
"decorations": [
|
||||
{
|
||||
"overviewRulerColor": "transparent",
|
||||
"color": "#41f041",
|
||||
"fontWeight": "bold"
|
||||
}
|
||||
]
|
||||
},
|
||||
"(<uninitialized>)": {
|
||||
"filterFileRegex": ".*ir2\\.asm",
|
||||
"decorations": [
|
||||
{
|
||||
"overviewRulerColor": "transparent",
|
||||
"color": "#c72855"
|
||||
}
|
||||
]
|
||||
},
|
||||
"(.*Flagged as asm.*)": {
|
||||
"filterFileRegex": ".*ir2\\.asm",
|
||||
"decorations": [
|
||||
{
|
||||
"overviewRulerColor": "yellow",
|
||||
"color": "yellow",
|
||||
"fontWeight": "bold"
|
||||
}
|
||||
]
|
||||
},
|
||||
"(INFO:.*)": {
|
||||
"filterFileRegex": ".*ir2\\.asm",
|
||||
"decorations": [
|
||||
{
|
||||
"overviewRulerColor": "transparent",
|
||||
"color": "yellow",
|
||||
"fontWeight": "bold"
|
||||
}
|
||||
]
|
||||
},
|
||||
"(lwu .., 4\\(..\\).*)(dma-buffer)": {
|
||||
"filterFileRegex": ".*ir2\\.asm",
|
||||
"decorations": [
|
||||
{},
|
||||
{
|
||||
"overviewRulerColor": "transparent",
|
||||
"color": "red"
|
||||
}
|
||||
]
|
||||
},
|
||||
"(\\d+\\(sp\\))": {
|
||||
"filterFileRegex": ".*ir2\\.asm",
|
||||
"decorations": [
|
||||
{
|
||||
"overviewRulerColor": "transparent",
|
||||
"color": "#00ff08"
|
||||
}
|
||||
]
|
||||
},
|
||||
"(sp, -?\\d+ )": {
|
||||
"filterFileRegex": ".*ir2\\.asm",
|
||||
"decorations": [
|
||||
{
|
||||
"overviewRulerColor": "transparent",
|
||||
"color": "#00ff08"
|
||||
}
|
||||
]
|
||||
},
|
||||
"( \\d+\\(sp\\))": {
|
||||
"filterFileRegex": ".*ir2\\.asm",
|
||||
"decorations": [
|
||||
{
|
||||
"overviewRulerColor": "transparent",
|
||||
"color": "#00ff08",
|
||||
"fontWeight": "bold"
|
||||
}
|
||||
]
|
||||
},
|
||||
"(at op \\d+)": {
|
||||
"filterFileRegex": ".*ir2\\.asm",
|
||||
"decorations": [
|
||||
{
|
||||
"overviewRulerColor": "transparent",
|
||||
"color": "#4de0ff"
|
||||
}
|
||||
]
|
||||
},
|
||||
"(.*;; )(\\[\\s*\\d+\\])": {
|
||||
"filterFileRegex": ".*ir2\\.asm",
|
||||
"decorations": [
|
||||
{},
|
||||
{
|
||||
"overviewRulerColor": "transparent",
|
||||
"color": "#4de0ff"
|
||||
}
|
||||
]
|
||||
},
|
||||
"(lw.+, )(.+\\(s7\\))": {
|
||||
"filterFileRegex": ".*ir2\\.asm",
|
||||
"decorations": [
|
||||
{},
|
||||
{
|
||||
"overviewRulerColor": "transparent",
|
||||
"color": "magenta"
|
||||
}
|
||||
]
|
||||
},
|
||||
"(lwu t9)": {
|
||||
"filterFileRegex": ".*ir2\\.asm",
|
||||
"decorations": [
|
||||
{
|
||||
"overviewRulerColor": "transparent",
|
||||
"color": "magenta"
|
||||
}
|
||||
]
|
||||
},
|
||||
"(dsll32 v1, s5, 30)": {
|
||||
"filterFileRegex": ".*ir2\\.asm",
|
||||
"decorations": [
|
||||
{
|
||||
"overviewRulerColor": "transparent",
|
||||
"color": "magenta"
|
||||
}
|
||||
]
|
||||
},
|
||||
"(jalr)": {
|
||||
"filterFileRegex": ".*ir2\\.asm",
|
||||
"decorations": [
|
||||
{
|
||||
"overviewRulerColor": "transparent",
|
||||
"color": "magenta"
|
||||
}
|
||||
]
|
||||
},
|
||||
"(L\\d+)": {
|
||||
"filterFileRegex": ".*ir2\\.asm",
|
||||
"decorations": [
|
||||
{
|
||||
"overviewRulerColor": "transparent",
|
||||
"color": "#f0d541"
|
||||
}
|
||||
]
|
||||
},
|
||||
"(B\\d+:)": {
|
||||
"filterFileRegex": ".*ir2\\.asm",
|
||||
"decorations": [
|
||||
{
|
||||
"overviewRulerColor": "transparent",
|
||||
"color": "#f07341"
|
||||
}
|
||||
]
|
||||
},
|
||||
"([\\s\\(])(at)([\\s\\),:-])": {
|
||||
"filterFileRegex": ".*ir2\\.asm",
|
||||
"decorations": [
|
||||
{},
|
||||
{
|
||||
"overviewRulerColor": "transparent",
|
||||
"color": "red"
|
||||
}
|
||||
]
|
||||
},
|
||||
"([\\s\\(])(gp)([\\s\\),:-])": {
|
||||
"filterFileRegex": ".*ir2\\.asm",
|
||||
"decorations": [
|
||||
{},
|
||||
{
|
||||
"overviewRulerColor": "transparent",
|
||||
"color": "#64c5e3"
|
||||
}
|
||||
]
|
||||
},
|
||||
"([\\s\\(])(v0)([\\s\\),:-])": {
|
||||
"filterFileRegex": ".*ir2\\.asm",
|
||||
"decorations": [
|
||||
{},
|
||||
{
|
||||
"overviewRulerColor": "transparent",
|
||||
"color": "#c6c1e6"
|
||||
}
|
||||
]
|
||||
},
|
||||
"([\\s\\(])(v1)([\\s\\),:-])": {
|
||||
"filterFileRegex": ".*ir2\\.asm",
|
||||
"decorations": [
|
||||
{},
|
||||
{
|
||||
"overviewRulerColor": "transparent",
|
||||
"color": "#dae6be"
|
||||
}
|
||||
]
|
||||
},
|
||||
"([\\s\\(])(s6)([\\s\\),:-])": {
|
||||
"filterFileRegex": ".*ir2\\.asm",
|
||||
"decorations": [
|
||||
{},
|
||||
{
|
||||
"overviewRulerColor": "transparent",
|
||||
"color": "#41f0b0"
|
||||
}
|
||||
]
|
||||
},
|
||||
"([\\s\\(])(a0)([\\s\\),:-])": {
|
||||
"filterFileRegex": ".*ir2\\.asm",
|
||||
"decorations": [
|
||||
{},
|
||||
{
|
||||
"overviewRulerColor": "transparent",
|
||||
"color": "pink"
|
||||
}
|
||||
]
|
||||
},
|
||||
"([\\s\\(])(a1)([\\s\\),:-])": {
|
||||
"filterFileRegex": ".*ir2\\.asm",
|
||||
"decorations": [
|
||||
{},
|
||||
{
|
||||
"overviewRulerColor": "transparent",
|
||||
"color": "#e065bb"
|
||||
}
|
||||
]
|
||||
},
|
||||
"([\\s\\(])(a2)([\\s\\),:-])": {
|
||||
"filterFileRegex": ".*ir2\\.asm",
|
||||
"decorations": [
|
||||
{},
|
||||
{
|
||||
"overviewRulerColor": "transparent",
|
||||
"color": "#6dd1a6"
|
||||
}
|
||||
]
|
||||
},
|
||||
"([\\s\\(])(a3)([\\s\\),:-])": {
|
||||
"filterFileRegex": ".*ir2\\.asm",
|
||||
"decorations": [
|
||||
{},
|
||||
{
|
||||
"overviewRulerColor": "transparent",
|
||||
"color": "#bad192"
|
||||
}
|
||||
]
|
||||
},
|
||||
"([\\s\\(])(t0)([\\s\\),:-])": {
|
||||
"filterFileRegex": ".*ir2\\.asm",
|
||||
"decorations": [
|
||||
{},
|
||||
{
|
||||
"overviewRulerColor": "transparent",
|
||||
"color": "#b56b82"
|
||||
}
|
||||
]
|
||||
},
|
||||
"([\\s\\(])(t1)([\\s\\),:-])": {
|
||||
"filterFileRegex": ".*ir2\\.asm",
|
||||
"decorations": [
|
||||
{},
|
||||
{
|
||||
"overviewRulerColor": "transparent",
|
||||
"color": "#6d32ba"
|
||||
}
|
||||
]
|
||||
},
|
||||
"([\\s\\(])(t2)([\\s\\),:-])": {
|
||||
"filterFileRegex": ".*ir2\\.asm",
|
||||
"decorations": [
|
||||
{},
|
||||
{
|
||||
"overviewRulerColor": "transparent",
|
||||
"color": "#db9267"
|
||||
}
|
||||
]
|
||||
},
|
||||
"([\\s\\(])(t3)([\\s\\),:-])": {
|
||||
"filterFileRegex": ".*ir2\\.asm",
|
||||
"decorations": [
|
||||
{},
|
||||
{
|
||||
"overviewRulerColor": "transparent",
|
||||
"color": "#92db67"
|
||||
}
|
||||
]
|
||||
},
|
||||
"(WARN: Unsupported.*)": {
|
||||
"filterFileRegex": ".*ir2\\.asm",
|
||||
"decorations": [
|
||||
{
|
||||
"overviewRulerColor": "#ea00ff",
|
||||
"color": "#ea00ff",
|
||||
"fontWeight": "bold",
|
||||
"filterFileRegex": ".*ir2\\.asm"
|
||||
}
|
||||
]
|
||||
},
|
||||
"(WARN: (?!Unsupported).*)": {
|
||||
"filterFileRegex": ".*ir2\\.asm",
|
||||
"decorations": [
|
||||
{
|
||||
"overviewRulerColor": "red",
|
||||
"color": "red",
|
||||
"fontWeight": "bold",
|
||||
"filterFileRegex": ".*ir2\\.asm"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -649,7 +649,7 @@ std::string ObjectFileDB::ir2_to_file(ObjectFileData& data, const Config& config
|
|||
}
|
||||
|
||||
if (func.ir2.top_form && func.ir2.env.has_local_vars()) {
|
||||
result += '\n';
|
||||
result += "\n;;-*-OpenGOAL-Start-*-\n\n";
|
||||
if (func.ir2.env.has_local_vars()) {
|
||||
if (!func.ir2.print_debug_forms) {
|
||||
result += ";; expression building failed part way through, function may be weird\n";
|
||||
|
@ -659,8 +659,7 @@ std::string ObjectFileDB::ir2_to_file(ObjectFileData& data, const Config& config
|
|||
result += ";; no variable information\n";
|
||||
result += pretty_print::to_string(func.ir2.top_form->to_form(func.ir2.env));
|
||||
}
|
||||
|
||||
result += '\n';
|
||||
result += "\n\n;;-*-OpenGOAL-End-*-\n\n";
|
||||
} else if (func.ir2.atomic_ops_succeeded) {
|
||||
auto& ao = func.ir2.atomic_ops;
|
||||
for (size_t i = 0; i < ao->ops.size(); i++) {
|
||||
|
@ -700,6 +699,8 @@ std::string ObjectFileDB::ir2_to_file(ObjectFileData& data, const Config& config
|
|||
result += func.ir2.debug_form_string;
|
||||
result += '\n';
|
||||
}
|
||||
|
||||
result += ";; .endfunction\n\n";
|
||||
}
|
||||
|
||||
// print data
|
||||
|
@ -723,6 +724,8 @@ std::string ObjectFileDB::ir2_to_file(ObjectFileData& data, const Config& config
|
|||
result += "; " + data.linked_data.get_goal_string(seg, i) + "\n";
|
||||
}
|
||||
}
|
||||
|
||||
result += '\n';
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
|
@ -127,10 +127,6 @@ const std::unordered_map<
|
|||
{".ppach", &Compiler::compile_asm_ppach},
|
||||
{".psubw", &Compiler::compile_asm_psubw},
|
||||
|
||||
{".por", &Compiler::compile_asm_por},
|
||||
{".pnor", &Compiler::compile_asm_pnor},
|
||||
{".pand", &Compiler::compile_asm_pand},
|
||||
|
||||
// BLOCK FORMS
|
||||
{"top-level", &Compiler::compile_top_level},
|
||||
{"begin", &Compiler::compile_begin},
|
||||
|
|
Loading…
Reference in a new issue