Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for NewIfStmt (0.17 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/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