|
|
@@ -160,8 +160,7 @@ let rec move_inits = function
|
|
|
Program (init_func :: decls, ann)
|
|
|
end
|
|
|
|
|
|
- (* DISABLED, interleaved declarations and assignments are allowed in the
|
|
|
- * intermediate representation
|
|
|
+ (* Split local variable initialisations in declaration and assignment *)
|
|
|
| FunDef (export, ret_type, name, params, Block body, ann) ->
|
|
|
let rec place_inits inits = function
|
|
|
| VarDecs lst :: tl ->
|
|
|
@@ -173,7 +172,6 @@ let rec move_inits = function
|
|
|
in
|
|
|
let body = Block (place_inits [] body) in
|
|
|
FunDef (export, ret_type, name, params, body, ann)
|
|
|
- *)
|
|
|
|
|
|
| node -> transform_children move_inits node
|
|
|
|