Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 16 of 16 for IsBoolean (0.11 sec)

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

    	// mapaccess2* returns a typed bool, but due to spec changes,
    	// the boolean result of i.(T) is now untyped so we make it the
    	// same type as the variable on the lhs.
    	if ok := n.Lhs[1]; !ir.IsBlank(ok) && ok.Type().IsBoolean() {
    		call.Type().Field(1).Type = ok.Type()
    	}
    	n.Rhs = []ir.Node{call}
    	n.SetOp(ir.OAS2FUNC)
    
    	// don't generate a = *var if a is _
    	if ir.IsBlank(a) {
    		return walkExpr(typecheck.Stmt(n), init)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:09:06 UTC 2024
    - 20.3K bytes
    - Viewed (0)
  2. src/go/types/builtins.go

    		// assert(pred) causes a typechecker error if pred is false.
    		// The result of assert is the value of pred if there is no error.
    		// Note: assert is only available in self-test mode.
    		if x.mode != constant_ || !isBoolean(x.typ) {
    			check.errorf(x, Test, invalidArg+"%s is not a boolean constant", x)
    			return
    		}
    		if x.val.Kind() != constant.Bool {
    			check.errorf(x, Test, "internal error: value of %s should be a boolean constant", x)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 27.2K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/builtins.go

    		// assert(pred) causes a typechecker error if pred is false.
    		// The result of assert is the value of pred if there is no error.
    		// Note: assert is only available in self-test mode.
    		if x.mode != constant_ || !isBoolean(x.typ) {
    			check.errorf(x, Test, invalidArg+"%s is not a boolean constant", x)
    			return
    		}
    		if x.val.Kind() != constant.Bool {
    			check.errorf(x, Test, "internal error: value of %s should be a boolean constant", x)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 27.1K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/stmt.go

    		assert(cb.Recv() == nil)
    		switch {
    		case cb.Params().Len() > 2:
    			return bad("func must be func(yield func(...) bool): yield func has too many parameters")
    		case cb.Results().Len() != 1 || !isBoolean(cb.Results().At(0).Type()):
    			return bad("func must be func(yield func(...) bool): yield func does not return bool")
    		}
    		if cb.Params().Len() >= 1 {
    			key = cb.Params().At(0).Type()
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.7K bytes
    - Viewed (0)
  5. src/go/types/stmt.go

    		assert(cb.Recv() == nil)
    		switch {
    		case cb.Params().Len() > 2:
    			return bad("func must be func(yield func(...) bool): yield func has too many parameters")
    		case cb.Results().Len() != 1 || !isBoolean(cb.Results().At(0).Type()):
    			return bad("func must be func(yield func(...) bool): yield func does not return bool")
    		}
    		if cb.Params().Len() >= 1 {
    			key = cb.Params().At(0).Type()
    		}
    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/ssa/_gen/RISCV64.rules

    (Neq64  x y) => (Not (Eq64  x y))
    (Neq32  x y) => (Not (Eq32  x y))
    (Neq16  x y) => (Not (Eq16  x y))
    (Neq8   x y) => (Not (Eq8   x y))
    (Neq(64|32)F ...) => (FNE(D|S) ...)
    
    // Loads
    (Load <t> ptr mem) &&  t.IsBoolean()                   => (MOVBUload ptr mem)
    (Load <t> ptr mem) && ( is8BitInt(t) &&  t.IsSigned()) => (MOVBload  ptr mem)
    (Load <t> ptr mem) && ( is8BitInt(t) && !t.IsSigned()) => (MOVBUload ptr mem)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 07 14:57:07 UTC 2024
    - 40.3K bytes
    - Viewed (0)
Back to top