mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-16 10:43:29 +00:00
compiler: simplify interface lowering
This commit simplifies the IR a little bit: instead of calling pseudo-functions runtime.interfaceImplements and runtime.interfaceMethod, real declared functions are being called that are then defined in the interface lowering pass. This should simplify the interaction between various transformation passes. It also reduces the number of lines of code, which is generally a good thing.
This commit is contained in:
committed by
Ron Evans
parent
90076f9401
commit
a4afc3b4b0
@@ -38,6 +38,12 @@ func ExternalInt64AsPtr(mod llvm.Module) error {
|
||||
// coroutine lowering.
|
||||
continue
|
||||
}
|
||||
if !fn.GetStringAttributeAtIndex(-1, "tinygo-methods").IsNil() {
|
||||
// These are internal functions (interface method call, interface
|
||||
// type assert) that will be lowered by the interface lowering pass.
|
||||
// Don't transform them.
|
||||
continue
|
||||
}
|
||||
|
||||
hasInt64 := false
|
||||
paramTypes := []llvm.Type{}
|
||||
|
||||
Reference in New Issue
Block a user