@@ -222,6 +222,12 @@ def $frame(state) : frame hint(show %.FRAME) hint(macro "Z%")
222222def $store((s; f)) = s
223223def $frame((s; f)) = f
224224
225+ def $sof(state) : store hint(show s)
226+ def $fof(state) : frame hint(show f)
227+
228+ def $sof(z) = $store(z)
229+ def $fof(z) = $frame(z)
230+
225231def $tagaddr(state) : tagaddr* hint(show %.MODULE.TAGS) hint(macro "Z%")
226232def $tagaddr((s; f)) = f.MODULE.TAGS
227233
@@ -237,17 +243,17 @@ def $structinst(state) : structinst* hint(show %.STRUCTS) hint(macro "Z%")
237243def $arrayinst(state) : arrayinst* hint(show %.ARRAYS) hint(macro "Z%")
238244def $exninst(state) : exninst* hint(show %.EXNS) hint(macro "Z%")
239245
240- def $moduleinst((s; f)) = f .MODULE
241- def $taginst((s; f)) = s .TAGS
242- def $globalinst((s; f)) = s .GLOBALS
243- def $meminst((s; f)) = s .MEMS
244- def $tableinst((s; f)) = s .TABLES
245- def $funcinst((s; f)) = s .FUNCS
246- def $datainst((s; f)) = s .DATAS
247- def $eleminst((s; f)) = s .ELEMS
248- def $structinst((s; f)) = s .STRUCTS
249- def $arrayinst((s; f)) = s .ARRAYS
250- def $exninst((s; f)) = s .EXNS
246+ def $moduleinst(z) = $fof(z) .MODULE
247+ def $taginst(z) = $sof(z) .TAGS
248+ def $globalinst(z) = $sof(z) .GLOBALS
249+ def $meminst(z) = $sof(z) .MEMS
250+ def $tableinst(z) = $sof(z) .TABLES
251+ def $funcinst(z) = $sof(z) .FUNCS
252+ def $datainst(z) = $sof(z) .DATAS
253+ def $eleminst(z) = $sof(z) .ELEMS
254+ def $structinst(z) = $sof(z) .STRUCTS
255+ def $arrayinst(z) = $sof(z) .ARRAYS
256+ def $exninst(z) = $sof(z) .EXNS
251257
252258
253259def $type(state, typeidx) : deftype hint(show %.TYPES[%]) hint(macro "Z%")
@@ -260,12 +266,6 @@ def $data(state, dataidx) : datainst hint(show %.DATAS[%]) hint(macro "
260266def $elem(state, tableidx) : eleminst hint(show %.ELEMS[%]) hint(macro "Z%")
261267def $local(state, localidx) : val? hint(show %.LOCALS[%]) hint(macro "Z%")
262268
263- def $sof(state) : store hint(show s)
264- def $fof(state) : frame hint(show f)
265-
266- def $sof(z) = $store(z)
267- def $fof(z) = $frame(z)
268-
269269def $type(z, x) = $fof(z).MODULE.TYPES[x]
270270def $tag(z, x) = $sof(z).TAGS[$fof(z).MODULE.TAGS[x]]
271271def $global(z, x) = $sof(z).GLOBALS[$fof(z).MODULE.GLOBALS[x]]
0 commit comments