ssa: cvtClosure remove closureCtx param
This commit is contained in:
@@ -1005,7 +1005,8 @@ func (b Builder) Call(fn Expr, args ...Expr) (ret Expr) {
|
||||
case vkClosure:
|
||||
data = b.Field(fn, 1)
|
||||
fn = b.Field(fn, 0)
|
||||
raw = fn.raw.Type
|
||||
ctx := types.NewParam(token.NoPos, nil, closureCtx, types.Typ[types.UnsafePointer])
|
||||
raw = FuncAddCtx(ctx, fn.raw.Type.(*types.Signature))
|
||||
fallthrough
|
||||
case vkFuncPtr:
|
||||
sig = raw.Underlying().(*types.Signature)
|
||||
|
||||
@@ -174,8 +174,7 @@ func Instantiate(orig types.Type, t *types.Named) (types.Type, bool) {
|
||||
}
|
||||
|
||||
func (p goTypes) cvtClosure(sig *types.Signature) *types.Struct {
|
||||
ctx := types.NewParam(token.NoPos, nil, closureCtx, types.Typ[types.UnsafePointer])
|
||||
raw := p.cvtFunc(sig, ctx)
|
||||
raw := p.cvtFunc(sig, nil)
|
||||
flds := []*types.Var{
|
||||
types.NewField(token.NoPos, nil, "f", raw, false),
|
||||
types.NewField(token.NoPos, nil, "data", types.Typ[types.UnsafePointer], false),
|
||||
|
||||
Reference in New Issue
Block a user