Explorar el Código

Fixed bug where array types on global vars would not be printed properly in assembly

Taddeus Kroes hace 12 años
padre
commit
49585e8d11
Se han modificado 1 ficheros con 6 adiciones y 0 borrados
  1. 6 0
      phases/dimreduce.ml

+ 6 - 0
phases/dimreduce.ml

@@ -75,6 +75,12 @@ and dim_reduce depth = function
     Allocate (dec, [multiply dims], ann)
 
   (* Simplify array types in declarations *)
+  | GlobalDef (export, ArrayDims (ctype, _), name, None, ann) ->
+    GlobalDef (export, Array ctype, name, None, ann)
+
+  | GlobalDef (export, ArrayDims (ctype, _), name, None, ann) ->
+    GlobalDef (export, Array ctype, name, None, ann)
+
   | VarDec (ArrayDims (ctype, _), name, None, ann) ->
     VarDec (Array ctype, name, None, ann)