aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/runtime/runtime.go
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2019-08-13 12:35:46 +0200
committerRon Evans <[email protected]>2019-08-15 17:31:54 +0200
commit542135c357585a540b960492fd67efded9edae58 (patch)
treef074a359750fae9cfb5a8b6cd5f00b192f414562 /src/runtime/runtime.go
parent61f711ef26e48b0e3a1539c849f4a26aa8dd08f3 (diff)
downloadtinygo-542135c357585a540b960492fd67efded9edae58.tar.gz
tinygo-542135c357585a540b960492fd67efded9edae58.zip
compiler,runtime: implement stack-based scheduler
This scheduler is intended to live along the (stackless) coroutine based scheduler which is needed for WebAssembly and unsupported platforms. The stack based scheduler is somewhat simpler in implementation as it does not require full program transform passes and supports things like function pointers and interface methods out of the box with no changes. Code size is reduced in most cases, even in the case where no scheduler scheduler is used at all. I'm not exactly sure why but these changes likely allowed some further optimizations somewhere. Even RAM is slightly reduced, perhaps some global was elminated in the process as well.
Diffstat (limited to 'src/runtime/runtime.go')
-rw-r--r--src/runtime/runtime.go5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/runtime/runtime.go b/src/runtime/runtime.go
index 8657b6009..c316bf364 100644
--- a/src/runtime/runtime.go
+++ b/src/runtime/runtime.go
@@ -79,11 +79,6 @@ func memequal(x, y unsafe.Pointer, n uintptr) bool {
return true
}
-//go:linkname sleep time.Sleep
-func sleep(d int64) {
- sleepTicks(timeUnit(d / tickMicros))
-}
-
func nanotime() int64 {
return int64(ticks()) * tickMicros
}