tinygo/testdata
Ayke van Laethem 5c0a337c4f cgo: implement rudimentary C array decaying
This is just a first step. It's not complete, but it gets some real
world C code to parse.

This signature, from the ESP-IDF:

    esp_err_t esp_wifi_get_mac(wifi_interface_t ifx, uint8_t mac[6]);

Was previously converted to something like this (pseudocode):

    C.esp_err_t esp_wifi_get_mac(ifx C.wifi_interface_t, mac [6]uint8)

But this is not correct. C array parameters will decay. The array is
passed by reference instead of by value. Instead, this would be the
correct signature:

    C.esp_err_t esp_wifi_get_mac(ifx C.wifi_interface_t, mac *uint8)

So that it can be called like this (using CGo):

    var mac [6]byte
    errCode := C.esp_wifi_get_mac(C.ESP_IF_WIFI_AP, &mac[0])

This stores the result in the 6-element array mac.
2021-09-29 13:38:33 +02:00
..
cgo cgo: implement rudimentary C array decaying 2021-09-29 13:38:33 +02:00
alias.go
alias.txt
atomic.go
atomic.txt
binop.go
binop.txt
calls.go compiler: fix "fragment covers entire variable" bug 2021-03-29 10:16:59 +02:00
calls.txt
channel.go compiler: fix a few crashes due to named types 2020-05-27 16:14:41 +02:00
channel.txt runtime: add cap and len support for chans 2020-05-12 01:17:27 +02:00
env.go wasm: add support for the crypto/rand package 2021-08-05 19:01:14 +02:00
env.txt wasm: add support for the crypto/rand package 2021-08-05 19:01:14 +02:00
filesystem.go main: clean up tests 2021-04-09 18:33:48 +02:00
filesystem.txt main: clean up tests 2021-04-09 18:33:48 +02:00
float.go
float.txt
gc.go
gc.txt
go1.17.go compiler: add support for new language features of Go 1.17 2021-08-30 09:18:58 +02:00
go1.17.txt compiler: add support for new language features of Go 1.17 2021-08-30 09:18:58 +02:00
goroutines.go transform: improve GC stack slot pass to work around a bug 2021-08-04 20:06:59 +02:00
goroutines.txt main: rename goroutine tests 2021-05-26 20:21:08 +02:00
init.go interp: don't ignore array indices for untyped objects 2021-07-14 07:55:05 +02:00
init.txt interp: don't ignore array indices for untyped objects 2021-07-14 07:55:05 +02:00
init_multi.go
init_multi.txt
interface.go
interface.txt
json.go transform: optimize reflect.Type Implements() method 2021-03-28 14:00:37 +02:00
json.txt transform: optimize reflect.Type Implements() method 2021-03-28 14:00:37 +02:00
ldflags.go main: implement -ldflags="-X ..." 2021-04-09 18:33:48 +02:00
ldflags.txt main: implement -ldflags="-X ..." 2021-04-09 18:33:48 +02:00
map.go interp: remove map support 2021-04-21 07:37:22 +02:00
map.txt interp: remove map support 2021-04-21 07:37:22 +02:00
math.go
math.txt
print.go
print.txt
rand.go wasm: add support for the crypto/rand package 2021-08-05 19:01:14 +02:00
rand.txt wasm: add support for the crypto/rand package 2021-08-05 19:01:14 +02:00
reflect.go reflect: add StructField.IsExported method 2021-08-30 09:18:58 +02:00
reflect.txt reflect: add StructField.IsExported method 2021-08-30 09:18:58 +02:00
slice.go
slice.txt compiler: compare slice against nil 2018-10-20 17:22:51 +02:00
sort.go
sort.txt implement reflect.Swapper 2020-10-23 21:37:35 +02:00
stdlib.go os: implement process related functions 2021-06-25 16:14:47 +02:00
stdlib.txt
string.go
string.txt compiler,runtime: implement []rune to string conversion 2019-08-11 15:45:35 +02:00
structs.go
structs.txt
testing.go testing: add support for the -test.v flag 2021-08-13 08:53:40 +02:00
testing.txt testing: add support for the -test.v flag 2021-08-13 08:53:40 +02:00
zeroalloc.go
zeroalloc.txt