mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-12 23:13:40 +00:00
compiler: simplify runtime.interfaceMethod signature slightly
Code size is not affected, as dead arguments are eliminated anyway. It makes future interface optimizations hopefully easier to implement.
This commit is contained in:
@@ -2272,8 +2272,9 @@ func (c *Compiler) getInvokeCall(frame *Frame, instr *ssa.CallCommon) (llvm.Valu
|
||||
llvmFnType = llvmFnType.Subtypes()[1]
|
||||
}
|
||||
|
||||
typecode := c.builder.CreateExtractValue(itf, 0, "invoke.typecode")
|
||||
values := []llvm.Value{
|
||||
itf,
|
||||
typecode,
|
||||
llvm.ConstInt(c.ctx.Int16Type(), uint64(c.ir.MethodNum(instr.Method)), false),
|
||||
}
|
||||
fn := c.createRuntimeCall("interfaceMethod", values, "invoke.func")
|
||||
|
||||
Reference in New Issue
Block a user