mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-06 03:53:42 +00:00
target/wasm_unknown: remove bulk memory and use imported memory for extreme tinyness
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
//go:build tinygo.wasm && !custommalloc
|
||||
//go:build tinygo.wasm && !(custommalloc || wasm_unknown)
|
||||
|
||||
package runtime
|
||||
|
||||
|
||||
@@ -31,10 +31,9 @@ func abort() {
|
||||
|
||||
//go:linkname syscall_Exit syscall.Exit
|
||||
func syscall_Exit(code int) {
|
||||
//proc_exit(uint32(code))
|
||||
}
|
||||
|
||||
// TinyGo does not yet support any form of parallelism on WebAssembly, so these
|
||||
// There is not yet any support for any form of parallelism on WebAssembly, so these
|
||||
// can be left empty.
|
||||
|
||||
//go:linkname procPin sync/atomic.runtime_procPin
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
|
||||
package runtime
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
)
|
||||
import "unsafe"
|
||||
|
||||
type timeUnit int64
|
||||
|
||||
@@ -21,10 +19,6 @@ func _start() {
|
||||
run()
|
||||
}
|
||||
|
||||
// Read the command line arguments from WASI.
|
||||
// For example, they can be passed to a program with wasmtime like this:
|
||||
//
|
||||
// wasmtime run ./program.wasm arg1 arg2
|
||||
func init() {
|
||||
__wasm_call_ctors()
|
||||
}
|
||||
@@ -39,7 +33,8 @@ func nanosecondsToTicks(ns int64) timeUnit {
|
||||
return timeUnit(ns)
|
||||
}
|
||||
|
||||
const timePrecisionNanoseconds = 1000 // TODO: how can we determine the appropriate `precision`?
|
||||
// with the wasm32-unknown-unknown target there is no way to determine any `precision`
|
||||
const timePrecisionNanoseconds = 1000
|
||||
|
||||
func sleepTicks(d timeUnit) {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user