mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-09 21:43:40 +00:00
compiler: reimplement interface type asserts
This is a big reimplementation that simplifies the compiler a lot. Instead of storing the method set in metadata and lowering the type asserts as a whole program pass, this change just puts the list of methods in the type code (and a separate global for the interface type).
This commit is contained in:
@@ -65,7 +65,6 @@ func Optimize(mod llvm.Module, config *compileopts.Config) []error {
|
||||
|
||||
// Run TinyGo-specific optimization passes.
|
||||
OptimizeStringToBytes(mod)
|
||||
OptimizeReflectImplements(mod)
|
||||
maxStackSize := config.MaxStackAlloc()
|
||||
OptimizeAllocs(mod, nil, maxStackSize, nil)
|
||||
err = LowerInterfaces(mod, config)
|
||||
|
||||
Reference in New Issue
Block a user