tinygo/compiler
Ayke van Laethem 18b16fc151
compiler: run some optimizations after interface lowering
By running these interprocedural optimizations after interface lowering,
in particular the heap-to-stack transformation pass, interfaces can be
zero cost in some more cases.

For example, say you have the following interface:

    type Writer interface {
        Write([]byte) (int, error)
    }

and you do something with it:

    func foo(w io.Writer) {
        w.Write([]byte("foo"))
    }

this commit enables escape analysis across interface boundaries, which
means that the Write call does not cause an allocation if all
implementations of io.Writer do not let the slice escape. This enables
broader uses of interfaces, as they are now a zero-cost abstraction in
more cases.
2018-12-22 19:06:01 +01:00
..
calls.go compiler: always use fat function pointers with context 2018-12-09 18:47:39 +01:00
compiler.go compiler: pass -cflags and -ldflags to tinygo CLI command 2018-12-13 20:10:27 +01:00
defer.go compiler: always use fat function pointers with context 2018-12-09 18:47:39 +01:00
errors.go compiler: return error messages with source location 2018-12-01 17:41:15 +01:00
interface-lowering.go compiler: lower interfaces in a separate pass 2018-12-01 13:26:06 +01:00
interface.go compiler: always use fat function pointers with context 2018-12-09 18:47:39 +01:00
map.go compiler: return error messages with source location 2018-12-01 17:41:15 +01:00
optimizer.go compiler: run some optimizations after interface lowering 2018-12-22 19:06:01 +01:00
sizes.go compiler: refactor compiler into separate package 2018-09-22 20:32:28 +02:00