Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for NewIfStmt (0.21 sec)

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

    	// if n > len(frm) { n = len(frm) }
    	nif := ir.NewIfStmt(base.Pos, nil, nil, nil)
    
    	nif.Cond = ir.NewBinaryExpr(base.Pos, ir.OGT, nlen, ir.NewUnaryExpr(base.Pos, ir.OLEN, nr))
    	nif.Body.Append(ir.NewAssignStmt(base.Pos, nlen, ir.NewUnaryExpr(base.Pos, ir.OLEN, nr)))
    	l = append(l, nif)
    
    	// if to.ptr != frm.ptr { memmove( ... ) }
    	ne := ir.NewIfStmt(base.Pos, ir.NewBinaryExpr(base.Pos, ir.ONE, nto, nfrm), nil, nil)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 22:35:22 UTC 2024
    - 31.2K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/walk/switch.go

    			for i := lo; i < hi; i++ {
    				nif := ir.NewIfStmt(base.Pos, nil, nil, nil)
    				leaf(i, nif)
    				base.Pos = base.Pos.WithNotStmt()
    				nif.Cond = typecheck.Expr(nif.Cond)
    				nif.Cond = typecheck.DefaultLit(nif.Cond, nil)
    				out.Append(nif)
    				out = &nif.Else
    			}
    			return
    		}
    
    		half := lo + n/2
    		nif := ir.NewIfStmt(base.Pos, nil, nil, nil)
    		nif.Cond = less(half)
    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/cmd/compile/internal/walk/assign.go

    	newLen := typecheck.TempAt(base.Pos, ir.CurFunc, types.Types[types.TINT])
    	nodes.Append(ir.NewAssignStmt(base.Pos, newLen, ir.NewBinaryExpr(base.Pos, ir.OADD, oldLen, num)))
    
    	// if uint(newLen) <= uint(oldCap)
    	nif := ir.NewIfStmt(base.Pos, nil, nil, nil)
    	nuint := typecheck.Conv(newLen, types.Types[types.TUINT])
    	scapuint := typecheck.Conv(oldCap, types.Types[types.TUINT])
    	nif.Cond = ir.NewBinaryExpr(base.Pos, ir.OLE, nuint, scapuint)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:09:06 UTC 2024
    - 20.3K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/walk/select.go

    	if ncas == 2 && dflt != nil {
    		cas := cases[0]
    		if cas == dflt {
    			cas = cases[1]
    		}
    
    		n := cas.Comm
    		ir.SetPos(n)
    		r := ir.NewIfStmt(base.Pos, nil, nil, nil)
    		r.SetInit(cas.Init())
    		var cond ir.Node
    		switch n.Op() {
    		default:
    			base.Fatalf("select %v", n.Op())
    
    		case ir.OSEND:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 01:53:41 UTC 2023
    - 7.8K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/walk/range.go

    		nind := ir.NewIndexExpr(base.Pos, ha, hv1)
    		nind.SetBounded(true)
    		body = append(body, ir.NewAssignStmt(base.Pos, hv2, typecheck.Conv(nind, types.RuneType)))
    
    		// if hv2 < utf8.RuneSelf
    		nif := ir.NewIfStmt(base.Pos, nil, nil, nil)
    		nif.Cond = ir.NewBinaryExpr(base.Pos, ir.OLT, hv2, ir.NewInt(base.Pos, utf8.RuneSelf))
    
    		// hv1++
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 20 14:52:33 UTC 2023
    - 17.6K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/walk/convert.go

    		init.Append(ir.NewAssignStmt(base.Pos, typeWord, typecheck.Conv(typecheck.Conv(itab, types.Types[types.TUNSAFEPTR]), typeWord.Type())))
    		nif := ir.NewIfStmt(base.Pos, typecheck.Expr(ir.NewBinaryExpr(base.Pos, ir.ONE, typeWord, typecheck.NodNil())), nil, nil)
    		nif.Body = []ir.Node{ir.NewAssignStmt(base.Pos, typeWord, itabType(typeWord))}
    		init.Append(nif)
    
    		// Build the result.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 09 17:28:22 UTC 2023
    - 18.2K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/walk/order.go

    	// freezes the counter when it reaches the value of 255. However, a range
    	// of experiments showed that that decreases overall performance.
    	o.append(ir.NewIfStmt(base.Pos,
    		ir.NewBinaryExpr(base.Pos, ir.OEQ, counter, ir.NewInt(base.Pos, 0xff)),
    		[]ir.Node{ir.NewAssignStmt(base.Pos, counter, ir.NewInt(base.Pos, 1))},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 02:00:33 UTC 2024
    - 42.7K bytes
    - Viewed (0)
Back to top