Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for makeTypeAssertDescriptor (0.33 sec)

  1. src/cmd/compile/internal/walk/expr.go

    		// This kind of conversion needs a runtime call. Allocate
    		// a descriptor for that call.
    		n.Descriptor = makeTypeAssertDescriptor(n.Type(), n.Op() == ir.ODOTTYPE2)
    	}
    	return n
    }
    
    func makeTypeAssertDescriptor(target *types.Type, canFail bool) *obj.LSym {
    	// When converting from an interface to a non-empty interface. Needs a runtime call.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:01 UTC 2024
    - 27.6K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/walk/convert.go

    		// Fixed (not loaded from a dictionary) type.
    		ta := ir.NewTypeAssertExpr(base.Pos, c, toType)
    		ta.SetOp(ir.ODOTTYPE2)
    		// Allocate a descriptor for this conversion to pass to the runtime.
    		ta.Descriptor = makeTypeAssertDescriptor(toType, true)
    		rhs = ta
    	} else {
    		ta := ir.NewDynamicTypeAssertExpr(base.Pos, ir.ODYNAMICDOTTYPE2, c, n.TypeWord)
    		rhs = ta
    	}
    	rhs.SetType(toType)
    	rhs.SetTypecheck(1)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 09 17:28:22 UTC 2023
    - 18.2K bytes
    - Viewed (0)
Back to top