tinygo/compiler
Ayke van Laethem 4e8453167f all: refactor reflect package
This is a big commit that changes the way runtime type information is stored in
the binary. Instead of compressing it and storing it in a number of sidetables,
it is stored similar to how the Go compiler toolchain stores it (but still more
compactly).

This has a number of advantages:

  * It is much easier to add new features to reflect support. They can simply
    be added to these structs without requiring massive changes (especially in
    the reflect lowering pass).
  * It removes the reflect lowering pass, which was a large amount of hard to
    understand and debug code.
  * The reflect lowering pass also required merging all LLVM IR into one
    module, which is terrible for performance especially when compiling large
    amounts of code. See issue 2870 for details.
  * It is (probably!) easier to reason about for the compiler.

The downside is that it increases code size a bit, especially when reflect is
involved. I hope to fix some of that in later patches.
2023-02-17 22:54:34 +01:00
..
ircheck all: remove pointer ElementType calls 2022-10-19 22:23:19 +02:00
llvmutil compiler: move some llvmutil code into the compiler 2023-01-18 08:24:42 +01:00
testdata all: refactor reflect package 2023-02-17 22:54:34 +01:00
alias.go all: add type parameter to CreateCall 2022-10-19 22:23:19 +02:00
asserts.go compiler: add support for new unsafe slice/string functions 2023-01-17 08:38:54 +01:00
atomic.go all: add type parameter to CreateLoad 2022-10-19 22:23:19 +02:00
calls.go all: remove pointer ElementType calls 2022-10-19 22:23:19 +02:00
channel.go compiler: fix stack overflow when creating recursive pointer types 2022-12-22 17:45:05 +01:00
compiler.go all: refactor reflect package 2023-02-17 22:54:34 +01:00
compiler_test.go compiler: add support for new unsafe slice/string functions 2023-01-17 08:38:54 +01:00
defer.go all: refactor reflect package 2023-02-17 22:54:34 +01:00
errors.go all: fix staticcheck warnings 2021-09-27 15:47:12 +02:00
func.go ci: add support for LLVM 15 2022-10-19 22:23:19 +02:00
gc.go wasm: avoid miscompile with ThinLTO 2023-01-18 08:24:42 +01:00
goroutine.go compiler: move some llvmutil code into the compiler 2023-01-18 08:24:42 +01:00
inlineasm.go all: add type parameter to CreateCall 2022-10-19 22:23:19 +02:00
interface.go all: refactor reflect package 2023-02-17 22:54:34 +01:00
interrupt.go all: replace llvm.Const* calls with builder.Create* calls 2022-10-19 22:23:19 +02:00
intrinsics.go ci: add support for LLVM 15 2022-10-19 22:23:19 +02:00
llvm.go wasm: avoid miscompile with ThinLTO 2023-01-18 08:24:42 +01:00
map.go compiler,runtime: make keySize and valueSize uintptr 2023-01-18 09:48:00 +01:00
sizes.go compiler: fix unsafe.Sizeof for chan and map values 2022-09-01 03:53:27 +02:00
symbol.go avr: support ThinLTO 2022-11-18 18:40:38 +01:00
syscall.go all: add type parameter to CreateCall 2022-10-19 22:23:19 +02:00
volatile.go all: add type parameter to CreateLoad 2022-10-19 22:23:19 +02:00