Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for typeAssert (0.2 sec)

  1. test/codegen/switch.go

    func interfaceCast(x any) int {
    	// amd64:`CALL\truntime.typeAssert`,`MOVL\t16\(AX\)`,`MOVQ\t8\(.*\)(.*\*1)`
    	// arm64:`CALL\truntime.typeAssert`,`LDAR`,`MOVWU\t16\(R0\)`,`MOVD\t\(R.*\)\(R.*\)`
    	if _, ok := x.(I); ok {
    		return 3
    	}
    	return 5
    }
    
    func interfaceCast2(x K) int {
    	// amd64:`CALL\truntime.typeAssert`,`MOVL\t16\(AX\)`,`MOVQ\t8\(.*\)(.*\*1)`
    	// arm64:`CALL\truntime.typeAssert`,`LDAR`,`MOVWU\t16\(R0\)`,`MOVD\t\(R.*\)\(R.*\)`
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 09 18:39:50 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  2. test/codegen/ifaces.go

    	// amd64:-`.*runtime.convI2I`
    	return T(x)
    }
    
    var NopConvertGenericIface = NopConvertGeneric[I]
    
    func ConvToM(x any) I {
    	// amd64:`CALL\truntime.typeAssert`,`MOVL\t16\(.*\)`,`MOVQ\t8\(.*\)(.*\*1)`
    	// arm64:`CALL\truntime.typeAssert`,`LDAR`,`MOVWU`,`MOVD\t\(R.*\)\(R.*\)`
    	return x.(I)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 06 17:02:53 UTC 2023
    - 621 bytes
    - Viewed (0)
  3. src/internal/abi/switch.go

    	switch goarch {
    	case "amd64", "arm64", "loong64", "mips", "mipsle", "mips64", "mips64le", "ppc64", "ppc64le", "riscv64", "s390x":
    		return true
    	default:
    		return false
    	}
    }
    
    type TypeAssert struct {
    	Cache   *TypeAssertCache
    	Inter   *InterfaceType
    	CanFail bool
    }
    type TypeAssertCache struct {
    	Mask    uintptr
    	Entries [1]TypeAssertCacheEntry
    }
    type TypeAssertCacheEntry struct {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 06 17:02:53 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/ir/symtab.go

    	Panicoverflow     *obj.LSym
    	Racefuncenter     *obj.LSym
    	Racefuncexit      *obj.LSym
    	Raceread          *obj.LSym
    	Racereadrange     *obj.LSym
    	Racewrite         *obj.LSym
    	Racewriterange    *obj.LSym
    	TypeAssert        *obj.LSym
    	WBZero            *obj.LSym
    	WBMove            *obj.LSym
    	// Wasm
    	SigPanic        *obj.LSym
    	Staticuint64s   *obj.LSym
    	Typedmemmove    *obj.LSym
    	Udiv            *obj.LSym
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 06 17:02:26 UTC 2023
    - 2K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/walk/expr.go

    	// When converting from an interface to a non-empty interface. Needs a runtime call.
    	// Allocate an internal/abi.TypeAssert descriptor for that call.
    	lsym := types.LocalPkg.Lookup(fmt.Sprintf(".typeAssert.%d", typeAssertGen)).LinksymABI(obj.ABI0)
    	typeAssertGen++
    	c := rttype.NewCursor(lsym, 0, rttype.TypeAssert)
    	c.Field("Cache").WritePtr(typecheck.LookupRuntimeVar("emptyTypeAssertCache"))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:01 UTC 2024
    - 27.6K bytes
    - Viewed (0)
  6. src/cmd/internal/goobj/builtinlist.go

    	{"runtime.convTslice", 1},
    	{"runtime.assertE2I", 1},
    	{"runtime.assertE2I2", 1},
    	{"runtime.panicdottypeE", 1},
    	{"runtime.panicdottypeI", 1},
    	{"runtime.panicnildottype", 1},
    	{"runtime.typeAssert", 1},
    	{"runtime.interfaceSwitch", 1},
    	{"runtime.ifaceeq", 1},
    	{"runtime.efaceeq", 1},
    	{"runtime.panicrangestate", 1},
    	{"runtime.deferrangefunc", 1},
    	{"runtime.rand32", 1},
    	{"runtime.makemap64", 1},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 21:08:03 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  7. src/runtime/iface.go

    	if t == nil {
    		return nil
    	}
    	return getitab(inter, t, true)
    }
    
    // typeAssert builds an itab for the concrete type t and the
    // interface type s.Inter. If the conversion is not possible it
    // panics if s.CanFail is false and returns nil if s.CanFail is true.
    func typeAssert(s *abi.TypeAssert, t *_type) *itab {
    	var tab *itab
    	if t == nil {
    		if !s.CanFail {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 22.5K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/typecheck/_builtin/runtime.go

    func assertE2I(inter *byte, typ *byte) *byte
    func assertE2I2(inter *byte, typ *byte) *byte
    func panicdottypeE(have, want, iface *byte)
    func panicdottypeI(have, want, iface *byte)
    func panicnildottype(want *byte)
    func typeAssert(s *byte, typ *byte) *byte
    
    // interface switches
    func interfaceSwitch(s *byte, t *byte) (int, *byte)
    
    // interface equality. Type/itab pointers are already known to be equal, so
    // we only need to pass one.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 21:08:03 UTC 2024
    - 10.6K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/typecheck/builtin.go

    	{"convTslice", funcTag, 66},
    	{"assertE2I", funcTag, 67},
    	{"assertE2I2", funcTag, 67},
    	{"panicdottypeE", funcTag, 68},
    	{"panicdottypeI", funcTag, 68},
    	{"panicnildottype", funcTag, 69},
    	{"typeAssert", funcTag, 67},
    	{"interfaceSwitch", funcTag, 70},
    	{"ifaceeq", funcTag, 72},
    	{"efaceeq", funcTag, 72},
    	{"panicrangestate", funcTag, 73},
    	{"deferrangefunc", funcTag, 74},
    	{"rand32", funcTag, 75},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 21:08:03 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/ssagen/ssa.go

    	ir.Syms.Racewrite = typecheck.LookupRuntimeFunc("racewrite")
    	ir.Syms.Racewriterange = typecheck.LookupRuntimeFunc("racewriterange")
    	ir.Syms.TypeAssert = typecheck.LookupRuntimeFunc("typeAssert")
    	ir.Syms.WBZero = typecheck.LookupRuntimeFunc("wbZero")
    	ir.Syms.WBMove = typecheck.LookupRuntimeFunc("wbMove")
    	ir.Syms.X86HasPOPCNT = typecheck.LookupRuntimeVar("x86HasPOPCNT")       // bool
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 19:44:43 UTC 2024
    - 284.9K bytes
    - Viewed (0)
Back to top