Sfoglia il codice sorgente

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

Taddeus Kroes 12 anni fa
parent
commit
49585e8d11
1 ha cambiato i file con 6 aggiunte e 0 eliminazioni
  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)