mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-18 19:44:00 +00:00
compiler: really define runtime/volatile.* functions
This makes them available to deferred calls, among others.
This commit is contained in:
committed by
Ron Evans
parent
e1052f921c
commit
1ceb63d14c
@@ -20,6 +20,10 @@ import (
|
||||
func (b *builder) defineIntrinsicFunction() {
|
||||
name := b.fn.RelString(nil)
|
||||
switch {
|
||||
case strings.HasPrefix(name, "runtime/volatile.Load"):
|
||||
b.createVolatileLoad()
|
||||
case strings.HasPrefix(name, "runtime/volatile.Store"):
|
||||
b.createVolatileStore()
|
||||
case strings.HasPrefix(name, "sync/atomic.") && token.IsExported(b.fn.Name()):
|
||||
b.createFunctionStart()
|
||||
returnValue := b.createAtomicOp(b.fn.Name())
|
||||
|
||||
Reference in New Issue
Block a user