mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-10 14:03:39 +00:00
compiler: refactor interface creation and calling
This commit is contained in:
committed by
Ron Evans
parent
fc0ac9af8e
commit
ce84f77c8d
@@ -1333,7 +1333,7 @@ func (c *Compiler) parseFunctionCall(frame *Frame, args []ssa.Value, llvmFn, con
|
||||
|
||||
func (c *Compiler) parseCall(frame *Frame, instr *ssa.CallCommon) (llvm.Value, error) {
|
||||
if instr.IsInvoke() {
|
||||
fnCast, args := c.getInvokeCall(frame, instr)
|
||||
fnCast, args := frame.getInvokeCall(instr)
|
||||
return c.createCall(fnCast, args, ""), nil
|
||||
}
|
||||
|
||||
@@ -1629,7 +1629,7 @@ func (c *Compiler) parseExpr(frame *Frame, expr ssa.Value) (llvm.Value, error) {
|
||||
return c.parseMakeClosure(frame, expr)
|
||||
case *ssa.MakeInterface:
|
||||
val := frame.getValue(expr.X)
|
||||
return c.parseMakeInterface(val, expr.X.Type(), expr.Pos()), nil
|
||||
return frame.createMakeInterface(val, expr.X.Type(), expr.Pos()), nil
|
||||
case *ssa.MakeMap:
|
||||
return c.emitMakeMap(frame, expr)
|
||||
case *ssa.MakeSlice:
|
||||
|
||||
Reference in New Issue
Block a user