compiler: refactor interface creation and calling

This commit is contained in:
Ayke van Laethem
2019-11-23 13:11:35 +01:00
committed by Ron Evans
parent fc0ac9af8e
commit ce84f77c8d
3 changed files with 29 additions and 29 deletions
+2 -2
View File
@@ -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: