diff options
author | Ayke van Laethem <[email protected]> | 2022-06-20 14:40:35 +0200 |
---|---|---|
committer | Ron Evans <[email protected]> | 2022-06-24 11:10:24 +0200 |
commit | e1052f921c0d845fb6257d1347a97af4e4d8dfd9 (patch) | |
tree | 29f73031c52f24e224d5fd0425b26eb4e8aaa07b /testdata/atomic.txt | |
parent | 6dff85c756ca571e7e6b11263a310323fb367593 (diff) | |
download | tinygo-e1052f921c0d845fb6257d1347a97af4e4d8dfd9.tar.gz tinygo-e1052f921c0d845fb6257d1347a97af4e4d8dfd9.zip |
compiler: define atomic intrinsic functions directly
This changes the compiler from treating calls to sync/atomic.* functions
as special calls (emitted directly at the call site) to actually
defining their declarations when there is no Go SSA implementation. And
rely on the inliner to inline these very small functions.
This works a bit better in practice. For example, this makes it possible
to use these functions in deferred function calls.
This commit is a bit large because it also needs to refactor a few
things to make it possible to define such intrinsic functions.
Diffstat (limited to 'testdata/atomic.txt')
-rw-r--r-- | testdata/atomic.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/testdata/atomic.txt b/testdata/atomic.txt index d1f2ab293..a03f292ce 100644 --- a/testdata/atomic.txt +++ b/testdata/atomic.txt @@ -33,3 +33,4 @@ StoreUint32: 20 StoreUint64: 20 StoreUintptr: 20 StorePointer: true +deferred atomic add: 8 |