- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for NonNil (0.09 sec)
-
src/cmd/compile/internal/ssagen/ssa.go
return s.newValue2(ssa.OpStringMake, n.Type(), ptr, len) case ir.OSTR2BYTESTMP: n := n.(*ir.ConvExpr) str := s.expr(n.X) ptr := s.newValue1(ssa.OpStringPtr, s.f.Config.Types.BytePtr, str) if !n.NonNil() { // We need to ensure []byte("") evaluates to []byte{}, and not []byte(nil). // // TODO(mdempsky): Investigate using "len != 0" instead of "ptr != nil".
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 10 19:44:43 UTC 2024 - 284.9K bytes - Viewed (0) -
src/runtime/crash_test.go
} c <- struct{}{} }() runtime.Goexit() }() // Note: if the defer fails to run, we will get a deadlock here <-c } func TestGoNil(t *testing.T) { output := runTestProg(t, "testprog", "GoNil") want := "go of nil func value" if !strings.Contains(output, want) { t.Fatalf("output:\n%s\n\nwant output containing: %s", output, want) } } func TestMainGoroutineID(t *testing.T) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 19:46:10 UTC 2024 - 27K bytes - Viewed (0) -
src/cmd/compile/internal/walk/assign.go
ir.OANDNOT, ir.OBITNOT, ir.OCONV, ir.OCONVIFACE, ir.OCONVNOP, ir.ODIV, ir.ODOT, ir.ODOTTYPE, ir.OLITERAL, ir.OLSH, ir.OMOD, ir.OMUL, ir.ONEG, ir.ONIL, ir.OOR, ir.OOROR, ir.OPAREN, ir.OPLUS, ir.ORSH, ir.OSUB, ir.OXOR: return false } // Be conservative. return true } // expand append(l1, l2...) to
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 08 17:09:06 UTC 2024 - 20.3K bytes - Viewed (0) -
src/reflect/all_test.go
// These implement IsNil. // Wrap in extra struct to hide interface type. doNil := []any{ struct{ x *int }{}, struct{ x any }{}, struct{ x map[string]int }{}, struct{ x func() bool }{}, struct{ x chan int }{}, struct{ x []string }{}, struct{ x unsafe.Pointer }{}, } for _, ts := range doNil { ty := TypeOf(ts).Field(0).Type v := Zero(ty)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 218.8K bytes - Viewed (0)