You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The legacy try instruction is currently not supported by the fast interpreter. I was wondering how much work it would take to fix that. It seems that most of the required code is already there.
With the following module:
(module
(tag $tag)
(func (export"main")
(try
(do (throw$tag))
(catch$tag)))
)
we currently get this error:
$ ~/sources/wizard-engine/bin/wizeng.x86-64-linux -ext:exception-handling exn.wasm
!X86_64StackError: unknown or unsupported write of value tag 00 @ 0x000076BEC0142000
in X86_64Stack.fatal() [src/engine/x86-64/X86_64Stack.v3 @ 463:29]
in X86_64Stack.writeValue() [src/engine/x86-64/X86_64Stack.v3 @ 446:38]
in X86_64Stack.findExHandler() [src/engine/x86-64/X86_64Stack.v3 @ 203:48]
in X86_64Stack.walk() [src/engine/x86-64/X86_64Stack.v3 @ 134:80]
in X86_64Stack.throw() [src/engine/x86-64/X86_64Stack.v3 @ 101:42]
in X86_64Runtime.runtime_THROW() [src/engine/x86-64/X86_64Runtime.v3 @ 143:35]
in [fast-int] #0
in [return-parent-stub]
in X86_64Stack.resume() [src/engine/x86-64/X86_64Stack.v3 @ 73:56]
in X86_64StackManager.runOnFreshStack() [src/engine/x86-64/X86_64Stack.v3 @ 1010:62]
in X86_64InterpreterOnlyStrategy.call() [src/engine/x86-64/X86_64Target.v3 @ 150:58]
in Execute.call() [src/engine/Execute.v3 @ 18:36]
in main() [src/wizeng.main.v3 @ 176:45]
Function writeValue does not support writing a reference value. But we cannot just add a case:
Indeed, the current tag is wrong: 00 when the the tag of references is 64. I tried writing a function that update the tag as well. But there seems another issue since the contents of the stack does not appear quite right, as can be seen with this second module:
Hmm. So the try and catch bytecodes should execute properly in the fast interpreter; it just seems that the method entry logic doesn't handle legacy exceptions. The writeValue() method is being used here because we're cheating with some extra slots in the frame to store the lexically-scoped exception packages (basically before exnref). Those tags are wrong because I didn't follow through and implement the bump by the number of exception slots (FuncDecl.num_ex_slots) in the fast interpreter.
The legacy try instruction is currently not supported by the fast interpreter. I was wondering how much work it would take to fix that. It seems that most of the required code is already there.
With the following module:
we currently get this error:
Function
writeValue
does not support writing a reference value. But we cannot just add a case:Indeed, the current tag is wrong:
00
when the the tag of references is64
. I tried writing a function that update the tag as well. But there seems another issue since the contents of the stack does not appear quite right, as can be seen with this second module:The text was updated successfully, but these errors were encountered: