start instruction evaluator

This commit is contained in:
Ilya Rezvov
2018-03-14 21:12:01 -07:00
parent 1b4a79655f
commit edbdeaec46
5 changed files with 82 additions and 26 deletions
+1 -1
View File
@@ -454,7 +454,7 @@ ctxFromModule locals labels returns m@Module {types, tables, mems, globals, impo
getGlobalType _ = Nothing
isFunctionValid :: Function -> Validator
isFunctionValid Function {funcType, locals, body} mod@Module {types} =
isFunctionValid Function {funcType, localTypes = locals, body} mod@Module {types} =
let FuncType params results = types !! fromIntegral funcType in
let r = safeHead results in
let ctx = ctxFromModule (params ++ locals) [r] r mod in