mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-08 21:13:39 +00:00
compiler: implement recover()
Doesn't do anything useful yet as running deferred calls are not executed during panic. Only implemented to get code to compile.
This commit is contained in:
@@ -1787,6 +1787,8 @@ func (c *Compiler) parseBuiltin(frame *Frame, args []ssa.Value, callName string)
|
||||
c.createRuntimeCall("printnl", nil, "")
|
||||
}
|
||||
return llvm.Value{}, nil // print() or println() returns void
|
||||
case "recover":
|
||||
return c.createRuntimeCall("_recover", nil, ""), nil
|
||||
case "ssa:wrapnilchk":
|
||||
// TODO: do an actual nil check?
|
||||
return c.parseExpr(frame, args[0])
|
||||
|
||||
Reference in New Issue
Block a user