Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for int64Val (0.3 sec)

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

    	bits := int32(8 * n.Type().Size())
    
    	if ir.IsSmallIntConst(n) {
    		v := ir.Int64Val(n)
    		return 0 <= v && v < max
    	}
    
    	switch n.Op() {
    	case ir.OAND, ir.OANDNOT:
    		n := n.(*ir.BinaryExpr)
    		v := int64(-1)
    		switch {
    		case ir.IsSmallIntConst(n.X):
    			v = ir.Int64Val(n.X)
    		case ir.IsSmallIntConst(n.Y):
    			v = ir.Int64Val(n.Y)
    			if n.Op() == ir.OANDNOT {
    				v = ^v
    				if !sign {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:01 UTC 2024
    - 27.6K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/typecheck/expr.go

    	n.Cap = DefaultLit(Expr(n.Cap), types.Types[types.TINT])
    
    	if ir.IsConst(n.Len, constant.Int) && ir.Int64Val(n.Len) < 0 {
    		base.Fatalf("len for OSLICEHEADER must be non-negative")
    	}
    
    	if ir.IsConst(n.Cap, constant.Int) && ir.Int64Val(n.Cap) < 0 {
    		base.Fatalf("cap for OSLICEHEADER must be non-negative")
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/typexpr.go

    		}
    		return -1
    	}
    
    	if isUntyped(x.typ) || isInteger(x.typ) {
    		if val := constant.ToInt(x.val); val.Kind() == constant.Int {
    			if representableConst(val, check, Typ[Int], nil) {
    				if n, ok := constant.Int64Val(val); ok && n >= 0 {
    					return n
    				}
    			}
    		}
    	}
    
    	var msg string
    	if isInteger(x.typ) {
    		msg = "invalid array length %s"
    	} else {
    		msg = "array length %s must be integer"
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  4. src/go/types/typexpr.go

    		}
    		return -1
    	}
    
    	if isUntyped(x.typ) || isInteger(x.typ) {
    		if val := constant.ToInt(x.val); val.Kind() == constant.Int {
    			if representableConst(val, check, Typ[Int], nil) {
    				if n, ok := constant.Int64Val(val); ok && n >= 0 {
    					return n
    				}
    			}
    		}
    	}
    
    	var msg string
    	if isInteger(x.typ) {
    		msg = "invalid array length %s"
    	} else {
    		msg = "array length %s must be integer"
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 16.3K bytes
    - Viewed (0)
  5. src/go/types/stmt.go

    	// and string values, so only create Go values for these
    	// types.
    	switch val.Kind() {
    	case constant.Int:
    		if x, ok := constant.Int64Val(val); ok {
    			return x
    		}
    		if x, ok := constant.Uint64Val(val); ok {
    			return x
    		}
    	case constant.Float:
    		if x, ok := constant.Float64Val(val); ok {
    			return x
    		}
    	case constant.String:
    		return constant.StringVal(val)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.6K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/stmt.go

    	// and string values, so only create Go values for these
    	// types.
    	switch val.Kind() {
    	case constant.Int:
    		if x, ok := constant.Int64Val(val); ok {
    			return x
    		}
    		if x, ok := constant.Uint64Val(val); ok {
    			return x
    		}
    	case constant.Float:
    		if x, ok := constant.Float64Val(val); ok {
    			return x
    		}
    	case constant.String:
    		return constant.StringVal(val)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.7K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/staticinit/sched.go

    			ir.OSTR2BYTES,
    			ir.OSTR2RUNES:
    			return true
    		}
    		return false
    	}
    	return !ir.Any(n, bad)
    }
    
    func getlit(lit ir.Node) int {
    	if ir.IsSmallIntConst(lit) {
    		return int(ir.Int64Val(lit))
    	}
    	return -1
    }
    
    func isvaluelit(n ir.Node) bool {
    	return n.Op() == ir.OARRAYLIT || n.Op() == ir.OSTRUCTLIT
    }
    
    func subst(n ir.Node, m map[*ir.Name]ir.Node) (ir.Node, bool) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 17:16:14 UTC 2024
    - 30.7K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/walk/order.go

    	case nt.IsInteger() && kt.IsInteger():
    		// can directly convert (e.g. int32 to uint32)
    		if n.Op() == ir.OLITERAL && nt.IsSigned() {
    			// avoid constant overflow error
    			n = ir.NewConstExpr(constant.MakeUint64(uint64(ir.Int64Val(n))), n)
    			n.SetType(kt)
    			return n
    		}
    		return typecheck.Expr(ir.NewConvExpr(pos, ir.OCONV, kt, n))
    	default:
    		// Unsafe cast through memory.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 02:00:33 UTC 2024
    - 42.7K bytes
    - Viewed (0)
  9. src/flag/flag.go

    	return CommandLine.Int(name, value, usage)
    }
    
    // Int64Var defines an int64 flag with specified name, default value, and usage string.
    // The argument p points to an int64 variable in which to store the value of the flag.
    func (f *FlagSet) Int64Var(p *int64, name string, value int64, usage string) {
    	f.Var(newInt64Value(value, p), name, usage)
    }
    
    // Int64Var defines an int64 flag with specified name, default value, and usage string.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 18:38:24 UTC 2024
    - 39.7K bytes
    - Viewed (0)
  10. pkg/controlplane/apiserver/options/options.go

    	fs.BoolVar(&s.EnableLogsHandler, "enable-logs-handler", s.EnableLogsHandler,
    		"If true, install a /logs handler for the apiserver logs.")
    	fs.MarkDeprecated("enable-logs-handler", "This flag will be removed in v1.19")
    
    	fs.Int64Var(&s.MaxConnectionBytesPerSec, "max-connection-bytes-per-sec", s.MaxConnectionBytesPerSec, ""+
    		"If non-zero, throttle each user connection to this number of bytes/sec. "+
    		"Currently only applies to long-running requests.")
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Apr 27 12:19:56 UTC 2024
    - 15.4K bytes
    - Viewed (0)
Back to top