mirror of
https://github.com/open-goal/jak-project
synced 2026-07-11 15:28:58 -04:00
[decompiler] automatically label things when possible (#784)
* improve label system * clean up menu * debug menu working, still need to fix tests * fix tests and clean up
This commit is contained in:
@@ -342,8 +342,12 @@ TEST_F(DataDecompTest, FloatArray) {
|
||||
" .word 0x0\n"
|
||||
" .word 0x3f800000\n\n";
|
||||
auto parsed = parse_data(input);
|
||||
auto decomp = decompile_at_label_with_hint({"(pointer float)", true, 7}, parsed.label("L63"),
|
||||
parsed.labels, {parsed.words}, *dts, nullptr);
|
||||
LabelInfo info;
|
||||
info.result_type = TypeSpec("pointer", {TypeSpec("float")});
|
||||
info.array_size = 7;
|
||||
info.is_value = false;
|
||||
auto decomp = decompile_at_label_with_hint(info, parsed.label("L63"), parsed.labels,
|
||||
{parsed.words}, *dts, nullptr);
|
||||
check_forms_equal(decomp.print(),
|
||||
"(new 'static 'array float 7\n"
|
||||
"1.0 0.0 1.0 0.0 1.0 0.0 1.0)");
|
||||
|
||||
Reference in New Issue
Block a user