Pārlūkot izejas kodu

deal with TArrayDecl side-effect order as well (closes #5667)

Simon Krajewski 9 gadi atpakaļ
vecāks
revīzija
6011415a97
1 mainītis faili ar 4 papildinājumiem un 0 dzēšanām
  1. 4 0
      src/optimization/analyzerTexpr.ml

+ 4 - 0
src/optimization/analyzerTexpr.ml

@@ -776,6 +776,10 @@ module Fusion = struct
 							let el = handle_el (List.map snd fl) in
 							if not !found && (has_state_write ir || has_any_field_write ir) then raise Exit;
 							{e with eexpr = TObjectDecl (List.map2 (fun (s,_) e -> s,e) fl el)}
+						| TArrayDecl el ->
+							let el = handle_el el in
+							if not !found && (has_state_write ir || has_any_field_write ir) then raise Exit;
+							{e with eexpr = TArrayDecl el}
 						| TBinop(OpAssign,({eexpr = TArray(e1,e2)} as ea),e3) ->
 							let e1 = replace e1 in
 							let e2 = replace e2 in