Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 14 of 14 for efaceeq (0.11 sec)

  1. src/go/types/object_test.go

    func TestEmbeddedMethod(t *testing.T) {
    	const src = `package p; type I interface { error }`
    	pkg := mustTypecheck(src, nil, nil)
    
    	// get original error.Error method
    	eface := Universe.Lookup("error")
    	orig, _, _ := LookupFieldOrMethod(eface.Type(), false, nil, "Error")
    	if orig == nil {
    		t.Fatalf("original error.Error not found")
    	}
    
    	// get embedded error.Error method
    	iface := pkg.Scope().Lookup("I")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 14:10:44 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  2. src/runtime/print.go

    func printstring(s string) {
    	gwrite(bytes(s))
    }
    
    func printslice(s []byte) {
    	sp := (*slice)(unsafe.Pointer(&s))
    	print("[", len(s), "/", cap(s), "]")
    	printpointer(sp.array)
    }
    
    func printeface(e eface) {
    	print("(", e._type, ",", e.data, ")")
    }
    
    func printiface(i iface) {
    	print("(", i.tab, ",", i.data, ")")
    }
    
    // hexdumpWords prints a word-oriented hex dump of [p, end).
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jan 20 03:27:26 UTC 2023
    - 5.9K bytes
    - Viewed (0)
  3. test/maplinear.go

    		nan := math.NaN()
    		for i := 0; i < n; i++ {
    			m[nan] = 1
    		}
    		if len(m) != n {
    			panic("wrong size map after nan insertion")
    		}
    	})
    
    	// ~6ms on a 1.6GHz Zeon.
    	checkLinear("eface", 10000, func(n int) {
    		m := map[interface{}]int{}
    		for i := 0; i < n; i++ {
    			m[i] = 1
    		}
    	})
    
    	// ~7ms on a 1.6GHz Zeon.
    	// Regression test for CL 119360043.
    	checkLinear("iface", 10000, func(n int) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:25 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/reflectdata/helpers.go

    	base.AssertfAt(dst.IsInterface(), n.Pos(), "want interface type, have %L", n)
    	if hasRType(n, n.TypeWord, "TypeWord") {
    		return n.TypeWord
    	}
    	if dst.IsEmptyInterface() {
    		return concreteRType(pos, src) // direct eface construction
    	}
    	if !src.IsInterface() {
    		return ITabAddrAt(pos, src, dst) // direct iface construction
    	}
    	return TypePtrAt(pos, dst) // convI2I
    }
    
    // ConvIfaceSrcRType asserts that n is a conversion from
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 12 04:50:32 UTC 2023
    - 7.1K bytes
    - Viewed (0)
Back to top