diff options
author | Ayke van Laethem <[email protected]> | 2022-06-17 16:52:52 +0200 |
---|---|---|
committer | Ron Evans <[email protected]> | 2022-06-19 11:51:12 +0200 |
commit | 159f0051bbdb5fb48e8c0af7603e154766ec0ee9 (patch) | |
tree | acec5763c8ec069dc91f7fc687958118464f68e3 /src/internal | |
parent | 49e22fe6788aada2582f36fc219b0c47cf92c616 (diff) | |
download | tinygo-159f0051bbdb5fb48e8c0af7603e154766ec0ee9.tar.gz tinygo-159f0051bbdb5fb48e8c0af7603e154766ec0ee9.zip |
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.
Diffstat (limited to 'src/internal')
-rw-r--r-- | src/internal/task/task.go | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/internal/task/task.go b/src/internal/task/task.go index 3b1bb200b..c45739097 100644 --- a/src/internal/task/task.go +++ b/src/internal/task/task.go @@ -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 |