mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-07 12:33:42 +00:00
runtime: move *task.DeferFrame here
This is a refactor that makes the next commit simpler. Perhaps it should have been like this from the beginning but I didn't like all the casts.
This commit is contained in:
committed by
Ron Evans
parent
49e22fe678
commit
159f0051bb
@@ -23,19 +23,7 @@ type Task struct {
|
||||
|
||||
// DeferFrame stores a pointer to the (stack allocated) defer frame of the
|
||||
// goroutine that is used for the recover builtin.
|
||||
DeferFrame *DeferFrame
|
||||
}
|
||||
|
||||
// DeferFrame is a stack allocated object that stores information for the
|
||||
// current "defer frame", which is used in functions that use the `defer`
|
||||
// keyword.
|
||||
// The compiler knows the JumpPC struct offset.
|
||||
type DeferFrame struct {
|
||||
JumpSP unsafe.Pointer // stack pointer to return to
|
||||
JumpPC unsafe.Pointer // pc to return to
|
||||
Previous *DeferFrame // previous recover buffer pointer
|
||||
Panicking bool // true iff this defer frame is panicking
|
||||
PanicValue interface{} // panic value, might be nil for panic(nil) for example
|
||||
DeferFrame unsafe.Pointer
|
||||
}
|
||||
|
||||
// getGoroutineStackSize is a compiler intrinsic that returns the stack size for
|
||||
|
||||
Reference in New Issue
Block a user