tinygo/compiler
Ayke van Laethem b5e29bf0c1 compiler: refactor IR generation
This is the first commit in a series to refactor the compiler. The
intention is to make sure every function to be compiled eventually has
its own IR builder. This will make it much easier to do other
refactorings in the future:

  * Most code won't depend (directly) on the central Compiler object,
    perhaps making it possible to eliminate it in the future. Right now
    it's embedded in the `builder` struct but individual fields from the
    `Compiler` can easily be moved into the `builder` object.
  * Some functions are not directly exposed in Go SSA, they are wrapper
    functions for something. At the moment they are included in the list
    of functions to be compiled with the reachability analysis
    (SimpleDCE) in the ir package, but eventually this reachability
    analys will be removed. At that point, it would be very convenient
    to be able to simply build a function with a new IR builder.

The `compilerContext` struct makes sure that it is not possible for
`builder` methods to accidentally use global state such as the global IR
builder. It is a transitional mechanism and may be removed when
finished.
2020-03-25 20:17:46 +01:00
..
ircheck compiler: move IR checker to separate package 2020-03-21 15:45:25 +01:00
llvmutil compiler/llvmutil: move constant pointer packs into constant globals 2020-02-24 23:27:04 +01:00
asserts.go compiler: merge some redundant assertion code 2020-03-13 16:15:36 -07:00
calls.go compiler: refactor IR generation 2020-03-25 20:17:46 +01:00
channel.go compiler,runtime: check for channel size limits 2020-03-13 16:15:36 -07:00
compiler.go compiler: refactor IR generation 2020-03-25 20:17:46 +01:00
defer.go compiler: fix deferred calls to exported functions 2020-02-27 16:35:31 +01:00
errors.go compiler: refactor IR generation 2020-03-25 20:17:46 +01:00
func.go compiler: refactor IR generation 2020-03-25 20:17:46 +01:00
gc.go compiler: move GC passes to the transform package 2019-11-25 09:14:31 +01:00
goroutine.go refactor coroutine lowering and tasks 2020-03-17 12:16:10 +01:00
inlineasm.go compiler,riscv: implement CSR operations as intrinsics 2020-01-10 08:04:13 +01:00
interface.go compiler: refactor IR generation 2020-03-25 20:17:46 +01:00
interrupt.go all: add compiler support for interrupts 2020-01-20 21:19:12 +01:00
llvm.go compiler: refactor func lowering to the transform package 2019-12-04 22:19:49 +01:00
map.go compiler,runtime: support operations on nil map 2020-02-26 20:42:01 +01:00
sizes.go compiler: don't crash when encountering types.Invalid 2019-12-30 13:40:37 +01:00
symbol.go compiler: do not emit debug info for extern globals 2020-01-20 20:30:42 +01:00
syscall.go Add initial FreeBSD support 2019-12-29 10:48:28 +01:00
volatile.go compiler: implement volatile operations as compiler builtins 2019-05-14 12:24:01 +02:00