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
{{ message }}
This repository was archived by the owner on Nov 4, 2023. It is now read-only.
Im not sure what exactly causes this, but it seems that some local variables that are optimized away does not end up in the exception frame.
Unless those locals are used ABOVE the try, like getting its address, they will have an invalid state (the one prior to entering Try) when re-entering the scope after a Throw.
minified sample:
FrameworkBRL.StandardIOSuperStrictFunctionBail()
Throw"BAIL"EndFunctionFunctionTryFail()
Local x:Int=10Try
x :* 2
Bail()
Catch e:Object
Print e.ToString() +" x == "+ x +" should be 20"EndTryEndFunctionFunctionTryOk()
Local x:Int=10Local p:BytePtr=Varptr x ' taking the address solidifies the variableTry
x :* 2
Bail()
Catch e:Object
Print e.ToString() +" x == "+ x +" should be 20"EndTryEndFunction
TryFail()
TryOk()
output (win32):
BAIL x == 10 should be 20
BAIL x == 20 should be 20
expected output:
BAIL x == 20 should be 20
BAIL x == 20 should be 20
Im not sure what exactly causes this, but it seems that some local variables that are optimized away does not end up in the exception frame.
Unless those locals are used ABOVE the try, like getting its address, they will have an invalid state (the one prior to entering Try) when re-entering the scope after a Throw.
minified sample:
output (win32):
expected output: