Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 144 for newInt (0.16 sec)

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

    		//     panicmakeslicecap()
    		// }
    		nif := ir.NewIfStmt(base.Pos, ir.NewBinaryExpr(base.Pos, ir.OGT, typecheck.Conv(l, types.Types[types.TUINT64]), ir.NewInt(base.Pos, i)), nil, nil)
    		niflen := ir.NewIfStmt(base.Pos, ir.NewBinaryExpr(base.Pos, ir.OLT, l, ir.NewInt(base.Pos, 0)), nil, nil)
    		niflen.Body = []ir.Node{mkcall("panicmakeslicelen", nil, init)}
    		nif.Body.Append(niflen, mkcall("panicmakeslicecap", nil, init))
    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/complit.go

    		lhs.RType = n.RType
    
    		zero := ir.NewAssignStmt(base.Pos, i, ir.NewInt(base.Pos, 0))
    		cond := ir.NewBinaryExpr(base.Pos, ir.OLT, i, ir.NewInt(base.Pos, tk.NumElem()))
    		incr := ir.NewAssignStmt(base.Pos, i, ir.NewBinaryExpr(base.Pos, ir.OADD, i, ir.NewInt(base.Pos, 1)))
    
    		var body ir.Node = ir.NewAssignStmt(base.Pos, lhs, rhs)
    		body = typecheck.Stmt(body)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 19:03:54 UTC 2023
    - 19.5K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/walk/switch.go

    		func(i int) ir.Node {
    			return ir.NewBinaryExpr(base.Pos, ir.OLE, s.hashName, ir.NewInt(base.Pos, int64(cc[i-1].hash)))
    		},
    		func(i int, nif *ir.IfStmt) {
    			// TODO(mdempsky): Omit hash equality check if
    			// there's only one type.
    			c := cc[i]
    			nif.Cond = ir.NewBinaryExpr(base.Pos, ir.OEQ, s.hashName, ir.NewInt(base.Pos, int64(c.hash)))
    			nif.Body.Append(c.body.Take()...)
    		},
    	)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:01 UTC 2024
    - 30.1K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/walk/assign.go

    		ptr2, len2 := backingArrayPtrLen(l2)
    
    		fn := typecheck.LookupRuntime("slicecopy", ptr1.Type().Elem(), ptr2.Type().Elem())
    		ncopy = mkcall1(fn, types.Types[types.TINT], &nodes, ptr1, len1, ptr2, len2, ir.NewInt(base.Pos, elemtype.Size()))
    	} else {
    		// memmove(&s[idx], &l2[0], len(l2)*sizeof(T))
    		ix := ir.NewIndexExpr(base.Pos, s, idx)
    		ix.SetBounded(true)
    		addr := typecheck.NodAddr(ix)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:09:06 UTC 2024
    - 20.3K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/ssa/magic.go

    	d := uint64(c) << (64 - n) >> (64 - n)
    
    	C := new(big.Int).SetUint64(d)
    	s := C.BitLen()
    	M := big.NewInt(1)
    	M.Lsh(M, n+uint(s))     // 2^(n+s)
    	M.Add(M, C)             // 2^(n+s)+c
    	M.Sub(M, big.NewInt(1)) // 2^(n+s)+c-1
    	M.Div(M, C)             // ⎡2^(n+s)/c⎤
    	if M.Bit(int(n)) != 1 {
    		panic("n+1st bit isn't set")
    	}
    	M.SetBit(M, int(n), 0)
    	m := M.Uint64()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:25 UTC 2024
    - 15.8K bytes
    - Viewed (0)
  6. src/go/constant/value_test.go

    		{Bool, false, false},
    		{String, "hello", "hello"},
    
    		{Int, int64(1), int64(1)},
    		{Int, big.NewInt(10), int64(10)},
    		{Int, new(big.Int).Lsh(big.NewInt(1), 62), int64(1 << 62)},
    		dup(Int, new(big.Int).Lsh(big.NewInt(1), 63)),
    
    		{Float, big.NewFloat(0), floatVal0.val},
    		dup(Float, big.NewFloat(2.0)),
    		dup(Float, big.NewRat(1, 3)),
    	} {
    		val := Make(test.arg)
    		got := Val(val)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 15.6K bytes
    - Viewed (0)
  7. src/crypto/internal/nistec/generate.go

    			log.Fatal(err)
    		}
    
    		// If p = 3 mod 4, implement modular square root by exponentiation.
    		mod4 := new(big.Int).Mod(c.Params.P, big.NewInt(4))
    		if mod4.Cmp(big.NewInt(3)) != 0 {
    			continue
    		}
    
    		exp := new(big.Int).Add(c.Params.P, big.NewInt(1))
    		exp.Div(exp, big.NewInt(4))
    
    		tmp, err := os.CreateTemp("", "addchain-"+p)
    		if err != nil {
    			log.Fatal(err)
    		}
    		defer os.Remove(tmp.Name())
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:29:44 UTC 2024
    - 19.7K bytes
    - Viewed (0)
  8. src/encoding/asn1/asn1_test.go

    	{"tag:17", fieldParameters{tag: newInt(17)}},
    	{"optional,explicit,default:42,tag:17", fieldParameters{optional: true, explicit: true, defaultValue: newInt64(42), tag: newInt(17)}},
    	{"optional,explicit,default:42,tag:17,rubbish1", fieldParameters{optional: true, explicit: true, application: false, defaultValue: newInt64(42), tag: newInt(17), stringType: 0, timeType: 0, set: false, omitEmpty: false}},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 29 18:24:36 UTC 2023
    - 43.6K bytes
    - Viewed (0)
  9. pkg/registry/core/service/ipallocator/ipallocator.go

    // but using netip.Addr instead of net.IP
    func addOffsetAddress(address netip.Addr, offset uint64) (netip.Addr, error) {
    	addressBytes := address.AsSlice()
    	addressBig := big.NewInt(0).SetBytes(addressBytes)
    	r := big.NewInt(0).Add(addressBig, big.NewInt(int64(offset))).Bytes()
    	// r must be 4 or 16 bytes depending of the ip family
    	// bigInt conversion to bytes will not take this into consideration
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 31 21:05:04 UTC 2023
    - 17K bytes
    - Viewed (0)
  10. pkg/registry/core/service/ipallocator/bitmap.go

    		// Allocate() it - we don't ever want to be able to release it.
    		max--
    	}
    
    	// Don't use the network's ".0" address, but don't just Allocate() it - we
    	// don't ever want to be able to release it.
    	base.Add(base, big.NewInt(1))
    	max--
    
    	// cidr with whole mask can be negative
    	if max < 0 {
    		max = 0
    	}
    
    	r := Range{
    		net:     cidr,
    		base:    base,
    		max:     maximum(0, int(max)),
    		family:  family,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 25 20:32:40 UTC 2023
    - 10.8K bytes
    - Viewed (0)
Back to top