Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for interfaceSwitch (0.28 sec)

  1. test/codegen/switch.go

    func interfaceSwitch(x any) int {
    	// amd64:`CALL\truntime.interfaceSwitch`,`MOVL\t16\(AX\)`,`MOVQ\t8\(.*\)(.*\*8)`
    	// arm64:`CALL\truntime.interfaceSwitch`,`LDAR`,`MOVWU\t16\(R0\)`,`MOVD\t\(R.*\)\(R.*\)`
    	switch x.(type) {
    	case I:
    		return 1
    	case J:
    		return 2
    	default:
    		return 3
    	}
    }
    
    func interfaceSwitch2(x K) int {
    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. src/cmd/compile/internal/walk/switch.go

    		if len(interfaceCases) > 0 {
    
    			// Build an internal/abi.InterfaceSwitch descriptor to pass to the runtime.
    			lsym := types.LocalPkg.Lookup(fmt.Sprintf(".interfaceSwitch.%d", interfaceSwitchGen)).LinksymABI(obj.ABI0)
    			interfaceSwitchGen++
    			c := rttype.NewCursor(lsym, 0, rttype.InterfaceSwitch)
    			c.Field("Cache").WritePtr(typecheck.LookupRuntimeVar("emptyInterfaceSwitchCache"))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:01 UTC 2024
    - 30.1K bytes
    - Viewed (0)
  3. src/internal/abi/switch.go

    // Copyright 2023 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package abi
    
    type InterfaceSwitch struct {
    	Cache  *InterfaceSwitchCache
    	NCases int
    
    	// Array of NCases elements.
    	// Each case must be a non-empty interface type.
    	Cases [1]*InterfaceType
    }
    
    type InterfaceSwitchCache 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

    	DeferprocStack    *obj.LSym
    	Deferreturn       *obj.LSym
    	Duffcopy          *obj.LSym
    	Duffzero          *obj.LSym
    	GCWriteBarrier    [8]*obj.LSym
    	Goschedguarded    *obj.LSym
    	Growslice         *obj.LSym
    	InterfaceSwitch   *obj.LSym
    	Memmove           *obj.LSym
    	Msanread          *obj.LSym
    	Msanwrite         *obj.LSym
    	Msanmove          *obj.LSym
    	Newobject         *obj.LSym
    	Newproc           *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/internal/goobj/builtinlist.go

    	{"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},
    	{"runtime.makemap", 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)
  6. src/runtime/iface.go

    var emptyTypeAssertCache = abi.TypeAssertCache{Mask: 0}
    
    // interfaceSwitch compares t against the list of cases in s.
    // If t matches case i, interfaceSwitch returns the case index i and
    // an itab for the pair <t, s.Cases[i]>.
    // If there is no match, return N,nil, where N is the number
    // of cases.
    func interfaceSwitch(s *abi.InterfaceSwitch, t *_type) (int, *itab) {
    	cases := unsafe.Slice(&s.Cases[0], s.NCases)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 22.5K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/typecheck/_builtin/runtime.go

    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.
    func ifaceeq(tab *uintptr, x, y unsafe.Pointer) (ret bool)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 21:08:03 UTC 2024
    - 10.6K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/typecheck/builtin.go

    	{"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},
    	{"makemap64", funcTag, 77},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 21:08:03 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/ssagen/ssa.go

    	ir.Syms.Goschedguarded = typecheck.LookupRuntimeFunc("goschedguarded")
    	ir.Syms.Growslice = typecheck.LookupRuntimeFunc("growslice")
    	ir.Syms.InterfaceSwitch = typecheck.LookupRuntimeFunc("interfaceSwitch")
    	ir.Syms.Memmove = typecheck.LookupRuntimeFunc("memmove")
    	ir.Syms.Msanread = typecheck.LookupRuntimeFunc("msanread")
    	ir.Syms.Msanwrite = typecheck.LookupRuntimeFunc("msanwrite")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 19:44:43 UTC 2024
    - 284.9K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/walk/stmt.go

    	// the value received.
    	case ir.ORECV:
    		n := n.(*ir.UnaryExpr)
    		return walkRecv(n)
    
    	case ir.OBREAK,
    		ir.OCONTINUE,
    		ir.OFALL,
    		ir.OGOTO,
    		ir.OLABEL,
    		ir.OJUMPTABLE,
    		ir.OINTERFACESWITCH,
    		ir.ODCL,
    		ir.OCHECKNIL:
    		return n
    
    	case ir.OBLOCK:
    		n := n.(*ir.BlockStmt)
    		walkStmtList(n.List)
    		return n
    
    	case ir.OCASE:
    		base.Errorf("case statement out of place")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 06 15:42:30 UTC 2023
    - 4.7K bytes
    - Viewed (0)
Back to top