mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-14 16:03:41 +00:00
compiler: always use fat function pointers with context
This reduces complexity in the compiler without affecting binary sizes too much. Cortex-M0: no changes Linux x64: no changes WebAssembly: some testcases (calls, coroutines, map) are slightly bigger
This commit is contained in:
@@ -31,16 +31,16 @@ const schedulerDebug = false
|
||||
// must not be used directly, it is meant to be used as an opaque *i8 in LLVM.
|
||||
type coroutine uint8
|
||||
|
||||
//go:linkname resume llvm.coro.resume
|
||||
//go:export llvm.coro.resume
|
||||
func (t *coroutine) resume()
|
||||
|
||||
//go:linkname destroy llvm.coro.destroy
|
||||
//go:export llvm.coro.destroy
|
||||
func (t *coroutine) destroy()
|
||||
|
||||
//go:linkname done llvm.coro.done
|
||||
//go:export llvm.coro.done
|
||||
func (t *coroutine) done() bool
|
||||
|
||||
//go:linkname _promise llvm.coro.promise
|
||||
//go:export llvm.coro.promise
|
||||
func (t *coroutine) _promise(alignment int32, from bool) unsafe.Pointer
|
||||
|
||||
// Get the promise belonging to a task.
|
||||
|
||||
Reference in New Issue
Block a user