mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-09 05:23:40 +00:00
runtime: refactor initialization code
Let each target handle its own initialization/finalization sequence instead of providing one in the runtime with hooks for memory initialization etc. This is much more flexible although it causes a little bit of code duplication.
This commit is contained in:
@@ -16,9 +16,12 @@ const tickMicros = 1024 * 32
|
||||
func systemInit()
|
||||
|
||||
//go:export Reset_Handler
|
||||
func handleReset() {
|
||||
func main() {
|
||||
systemInit()
|
||||
main()
|
||||
preinit()
|
||||
initAll()
|
||||
mainWrapper()
|
||||
abort()
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
||||
Reference in New Issue
Block a user