Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 32 for isChan (0.1 sec)

  1. src/cmd/compile/internal/ssagen/ssa.go

    func (s *state) referenceTypeBuiltin(n *ir.UnaryExpr, x *ssa.Value) *ssa.Value {
    	if !n.X.Type().IsMap() && !n.X.Type().IsChan() {
    		s.Fatalf("node must be a map or a channel")
    	}
    	if n.X.Type().IsChan() && n.Op() == ir.OLEN {
    		s.Fatalf("cannot inline len(chan)") // must use runtime.chanlen now
    	}
    	if n.X.Type().IsChan() && n.Op() == ir.OCAP {
    		s.Fatalf("cannot inline cap(chan)") // must use runtime.chancap now
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 19:44:43 UTC 2024
    - 284.9K bytes
    - Viewed (0)
  2. src/cmp/cmp.go

    func Less[T Ordered](x, y T) bool {
    	return (isNaN(x) && !isNaN(y)) || x < y
    }
    
    // Compare returns
    //
    //	-1 if x is less than y,
    //	 0 if x equals y,
    //	+1 if x is greater than y.
    //
    // For floating-point types, a NaN is considered less than any non-NaN,
    // a NaN is considered equal to a NaN, and -0.0 is equal to 0.0.
    func Compare[T Ordered](x, y T) int {
    	xNaN := isNaN(x)
    	yNaN := isNaN(y)
    	if xNaN {
    		if yNaN {
    			return 0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 19 16:31:02 UTC 2024
    - 2K bytes
    - Viewed (0)
  3. pkg/volume/hostpath/host_path.go

    }
    
    type hostPathTypeChecker interface {
    	Exists() bool
    	IsFile() bool
    	MakeFile() error
    	IsDir() bool
    	MakeDir() error
    	IsBlock() bool
    	IsChar() bool
    	IsSocket() bool
    	GetPath() string
    }
    
    type fileTypeChecker struct {
    	path string
    	hu   hostutil.HostUtils
    }
    
    func (ftc *fileTypeChecker) Exists() bool {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 06:17:25 UTC 2024
    - 15.3K bytes
    - Viewed (0)
  4. analysis/analysis-api/src/org/jetbrains/kotlin/analysis/api/components/KtTypeInfoProvider.kt

        public val KaType.isDouble: Boolean get() = withValidityAssertion { isClassTypeWithClassId(DefaultTypeClassIds.DOUBLE) }
        public val KaType.isChar: Boolean get() = withValidityAssertion { isClassTypeWithClassId(DefaultTypeClassIds.CHAR) }
        public val KaType.isBoolean: Boolean get() = withValidityAssertion { isClassTypeWithClassId(DefaultTypeClassIds.BOOLEAN) }
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Tue Jun 04 08:26:19 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  5. src/slices/sort_test.go

    	for i := 0; i < len(fs); i++ {
    		testfs := Clone(fs)
    		testfs[i] = math.NaN()
    
    		fmin := Min(testfs)
    		if !math.IsNaN(fmin) {
    			t.Errorf("got min %v, want NaN", fmin)
    		}
    
    		fmax := Max(testfs)
    		if !math.IsNaN(fmax) {
    			t.Errorf("got max %v, want NaN", fmax)
    		}
    	}
    }
    
    func TestMinMaxPanics(t *testing.T) {
    	intCmp := func(a, b int) int { return a - b }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 09 19:20:55 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/ssa/check.go

    			case auxFloat32:
    				canHaveAuxInt = true
    				if math.IsNaN(v.AuxFloat()) {
    					f.Fatalf("value %v has an AuxInt that encodes a NaN", v)
    				}
    				if !isExactFloat32(v.AuxFloat()) {
    					f.Fatalf("value %v has an AuxInt value that is not an exact float32", v)
    				}
    			case auxFloat64:
    				canHaveAuxInt = true
    				if math.IsNaN(v.AuxFloat()) {
    					f.Fatalf("value %v has an AuxInt that encodes a NaN", v)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 09 16:41:23 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  7. analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/evaluate/FirAnnotationValueConverter.kt

                type == null -> KaConstantValueFactory.createConstantValue(value, psi as? KtElement)
                type.isBoolean -> KaConstantValue.KaBooleanConstantValue(value as Boolean, expression)
                type.isChar -> KaConstantValue.KaCharConstantValue((value as? Char) ?: (value as Number).toInt().toChar(), expression)
                type.isByte -> KaConstantValue.KaByteConstantValue((value as Number).toByte(), expression)
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Tue Jun 11 15:45:42 UTC 2024
    - 11.7K bytes
    - Viewed (0)
  8. src/syscall/js/js_test.go

    	}
    	if dummys.Get("someFloat").Equal(dummys.Get("someInt")) {
    		t.Errorf("different values are not unequal")
    	}
    }
    
    func TestNaN(t *testing.T) {
    	if !dummys.Get("NaN").IsNaN() {
    		t.Errorf("JS NaN is not NaN")
    	}
    	if !js.ValueOf(math.NaN()).IsNaN() {
    		t.Errorf("Go NaN is not NaN")
    	}
    	if dummys.Get("NaN").Equal(dummys.Get("NaN")) {
    		t.Errorf("NaN is equal to NaN")
    	}
    }
    
    func TestUndefined(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 19 14:35:26 UTC 2024
    - 17.7K bytes
    - Viewed (0)
  9. src/syscall/js/js.go

    func Null() Value {
    	return valueNull
    }
    
    // IsNull reports whether v is the JavaScript value "null".
    func (v Value) IsNull() bool {
    	return v.ref == valueNull.ref
    }
    
    // IsNaN reports whether v is the JavaScript value "NaN".
    func (v Value) IsNaN() bool {
    	return v.ref == valueNaN.ref
    }
    
    // Global returns the JavaScript global object, usually "window" or "global".
    func Global() Value {
    	return valueGlobal
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 19 14:35:26 UTC 2024
    - 19.5K bytes
    - Viewed (0)
  10. src/slices/slices_test.go

    func equal[T comparable](v1, v2 T) bool {
    	return v1 == v2
    }
    
    // equalNaN is like == except that all NaNs are equal.
    func equalNaN[T comparable](v1, v2 T) bool {
    	isNaN := func(f T) bool { return f != f }
    	return v1 == v2 || (isNaN(v1) && isNaN(v2))
    }
    
    // offByOne returns true if integers v1 and v2 differ by 1.
    func offByOne(v1, v2 int) bool {
    	return v1 == v2+1 || v1 == v2-1
    }
    
    func TestEqualFunc(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 13:32:06 UTC 2024
    - 33.2K bytes
    - Viewed (0)
Back to top