lang: funcs: Add runner pure func execution

This adds a function runner that runs pure functions. It will hopefully
be useful for speculative execution of functions for compile time
determination of types.
This commit is contained in:
James Shubin
2019-03-01 11:08:19 -05:00
parent 5e58251026
commit b1f93b40ae
3 changed files with 331 additions and 0 deletions

View File

@@ -28,6 +28,7 @@ import (
type Info struct {
Pure bool // is the function pure? (can it be memoized?)
Memo bool // should the function be memoized? (false if too much output)
Slow bool // is the function slow? (avoid speculative execution)
Sig *types.Type // the signature of the function, must be KindFunc
Err error // is this a valid function, or was it created improperly?
}