Граф коммитов

6 коммитов

Автор SHA1 Сообщение Дата
waj334
848c3e55a9
compiler: implement func value and builtin defers
Co-authored-by: Justin A. Wilson <maker.pro.game@gmail.com>
2020-07-31 01:48:57 +02:00
Jaden Weiss
6896b0014b compiler: fix deferred calls to exported functions
Previously using defer with an exported function generated an invalid function call due to differences between TinyGo's calling convention and the C calling convention.
2020-02-27 16:35:31 +01:00
Jaden Weiss
eee1b995f6 revise defer to use heap allocations when running a variable number of times 2019-12-30 18:12:40 +01:00
seph
a4cd3bb77c Test for functional argument passing (#336)
* Test for functional argument passing
2019-05-13 14:40:58 +02:00
Ayke van Laethem
a531caa2e9
compiler: implement deferring of interface calls 2018-11-03 20:21:43 +01:00
Ayke van Laethem
82be43f4e6
compiler: implement deferring of immediately-applied closures
This is a common operation:

    freevar := ...
    defer func() {
        println("I am deferred:", freevar)
    }()

The function is thus an immediately applied closure. Only this form is
currently supported, support for regular (fat) function pointers should
be trivial to add but is not currently implemented as it wasn't
necessary to get fmt to compile.
2018-10-22 14:06:51 +02:00