Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 7,522 for _case (0.04 sec)

  1. src/cmd/compile/internal/typecheck/stmt.go

    	lno := ir.SetPos(sel)
    	Stmts(sel.Init())
    	for _, ncase := range sel.Cases {
    		if ncase.Comm == nil {
    			// default
    			if def != nil {
    				base.ErrorfAt(ncase.Pos(), errors.DuplicateDefault, "multiple defaults in select (first at %v)", ir.Line(def))
    			} else {
    				def = ncase
    			}
    		} else {
    			n := Stmt(ncase.Comm)
    			ncase.Comm = n
    			oselrecv2 := func(dst, recv ir.Node, def bool) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 20 15:10:54 UTC 2023
    - 17.8K bytes
    - Viewed (0)
  2. src/runtime/select.go

    	for i, rc := range cases {
    		var j int
    		switch rc.dir {
    		case selectDefault:
    			dflt = i
    			continue
    		case selectSend:
    			j = nsends
    			nsends++
    		case selectRecv:
    			nrecvs++
    			j = len(cases) - nrecvs
    		}
    
    		sel[j] = scase{c: rc.ch, elem: rc.val}
    		orig[j] = i
    	}
    
    	// Only a default case.
    	if nsends+nrecvs == 0 {
    		return dflt, false
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 13 21:36:04 UTC 2024
    - 15K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/util/net/interface_test.go

    			if !strings.Contains(err.Error(), tc.errStrFrag) {
    				t.Errorf("case[%s]: Error string %q does not contain %q", tc.tcase, err, tc.errStrFrag)
    			}
    		} else if tc.errStrFrag != "" {
    			t.Errorf("case[%s]: Error %q expected, but not seen", tc.tcase, tc.errStrFrag)
    		} else {
    			if tc.count != len(routes) {
    				t.Errorf("case[%s]: expected %d routes, have %v", tc.tcase, tc.count, routes)
    			} else if tc.count == 1 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 10 07:29:34 UTC 2023
    - 33.2K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/walk/switch.go

    	// Now generate all the case bodies
    	for i, ncase := range sw.Cases {
    		sw.Compiled.Append(ir.NewLabelStmt(ncase.Pos(), labels[i]))
    		if caseVar := ncase.Var; caseVar != nil {
    			val := s.srcName
    			if len(ncase.List) == 1 {
    				// single type. We have to downcast the input value to the target type.
    				if ncase.List[0].Op() == ir.OTYPE { // single compile-time known type
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:01 UTC 2024
    - 30.1K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/walk/select.go

    	return typecheck.ConvNop(s, t)
    }
    
    var scase *types.Type
    
    // Keep in sync with src/runtime/select.go.
    func scasetype() *types.Type {
    	if scase == nil {
    		n := ir.NewDeclNameAt(src.NoXPos, ir.OTYPE, ir.Pkgs.Runtime.Lookup("scase"))
    		scase = types.NewNamed(n)
    		n.SetType(scase)
    		n.SetTypecheck(1)
    
    		scase.SetUnderlying(types.NewStruct([]*types.Field{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 01:53:41 UTC 2023
    - 7.8K bytes
    - Viewed (0)
  6. src/cmd/internal/obj/x86/evex.go

    	if bcst {
    		switch evex.b2 & evexBcst {
    		case evexBcstN4:
    			return 4
    		case evexBcstN8:
    			return 8
    		}
    		return 1
    	}
    
    	switch evex.b2 & evexN {
    	case evexN1:
    		return 1
    	case evexN2:
    		return 2
    	case evexN4:
    		return 4
    	case evexN8:
    		return 8
    	case evexN16:
    		return 16
    	case evexN32:
    		return 32
    	case evexN64:
    		return 64
    	case evexN128:
    		return 128
    	}
    	return 1
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 11 16:34:30 UTC 2022
    - 9.3K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/asmdecl/asmdecl.go

    				case 'D':
    					src = 8
    				}
    			}
    		case "loong64", "mips", "mipsle", "mips64", "mips64le":
    			switch op {
    			case "MOVB", "MOVBU":
    				src = 1
    			case "MOVH", "MOVHU":
    				src = 2
    			case "MOVW", "MOVWU", "MOVF":
    				src = 4
    			case "MOVV", "MOVD":
    				src = 8
    			}
    		case "s390x":
    			switch op {
    			case "MOVB", "MOVBZ":
    				src = 1
    			case "MOVH", "MOVHZ":
    				src = 2
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 22.8K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/walk/stmt.go

    		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")
    		panic("unreachable")
    
    	case ir.ODEFER:
    		n := n.(*ir.GoDeferStmt)
    		ir.CurFunc.SetHasDefer(true)
    		ir.CurFunc.NumDefers++
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 06 15:42:30 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/ir/fmt.go

    		}
    		if n.Tag != nil {
    			fmt.Fprintf(s, " %v ", n.Tag)
    		}
    		fmt.Fprintf(s, " { %v }", n.Cases)
    
    	case OCASE:
    		n := n.(*CaseClause)
    		if len(n.List) != 0 {
    			fmt.Fprintf(s, "case %.v", n.List)
    		} else {
    			fmt.Fprint(s, "default")
    		}
    		fmt.Fprintf(s, ": %v", n.Body)
    
    	case OBREAK, OCONTINUE, OGOTO, OFALL:
    		n := n.(*BranchStmt)
    		if n.Label != nil {
    			fmt.Fprintf(s, "%v %v", n.Op(), n.Label)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 05 15:20:28 UTC 2023
    - 26K bytes
    - Viewed (0)
  10. test/live.go

    	if b {
    		select { // ERROR "live at call to selectgo:( .autotmp_[0-9]+)+$" "stack object .autotmp_[0-9]+ \[4\]runtime.scase$"
    		case <-fc38():
    			printnl()
    		case fc38() <- *fi38(1): // ERROR "live at call to fc38:( .autotmp_[0-9]+)+$" "live at call to fi38:( .autotmp_[0-9]+)+$" "stack object .autotmp_[0-9]+ string$"
    			printnl()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 05 20:34:30 UTC 2023
    - 18K bytes
    - Viewed (0)
Back to top