add globals allocation

This commit is contained in:
Ilya Rezvov
2018-03-07 16:35:36 -08:00
parent 1dab371720
commit 867092c820
2 changed files with 67 additions and 22 deletions
+1 -1
View File
@@ -428,7 +428,7 @@ getFuncTypes Module {types, functions, imports} =
getFuncType _ = Nothing
ctxFromModule :: [ValueType] -> [Maybe ValueType] -> Maybe ValueType -> Module -> Ctx
ctxFromModule locals labels returns m@Module {types, functions, tables, mems, globals, imports} =
ctxFromModule locals labels returns m@Module {types, tables, mems, globals, imports} =
let tableImports = catMaybes $ map getTableType imports in
let memsImports = catMaybes $ map getMemType imports in
let globalImports = catMaybes $ map getGlobalType imports in