Browse Source

[hl] Fix debug assigns not sorted when not optimize (#12006)

Yuxiao Mao 7 months ago
parent
commit
2833046b1e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/generators/genhl.ml

+ 1 - 1
src/generators/genhl.ml

@@ -3427,7 +3427,7 @@ and make_fun ?gen_content ctx name fidx f cthis cparent =
 		regs = DynArray.to_array ctx.m.mregs.arr;
 		code = DynArray.to_array ctx.m.mops;
 		debug = make_debug ctx ctx.m.mdebug;
-		assigns = Array.of_list (List.rev ctx.m.massign);
+		assigns = Array.of_list (List.sort (fun (_,p1) (_,p2) -> p1 - p2) (List.rev ctx.m.massign));
 	} in
 	ctx.m <- old;
 	Hashtbl.add ctx.defined_funs fidx ();