Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 36 for generic (0.41 sec)

  1. src/cmd/compile/internal/types2/alias.go

    func (a *Alias) Underlying() Type { return unalias(a).Underlying() }
    
    // Origin returns the generic Alias type of which a is an instance.
    // If a is not an instance of a generic alias, Origin returns a.
    func (a *Alias) Origin() *Alias { return a.orig }
    
    // TypeParams returns the type parameters of the alias type a, or nil.
    // A generic Alias and its instances have the same type parameters.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 5K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/types2/api_predicates.go

    // uninstantiated generic type.
    func ConvertibleTo(V, T Type) bool {
    	x := operand{mode: value, typ: V}
    	return x.convertibleTo(nil, T, nil) // check not needed for non-constant x
    }
    
    // Implements reports whether type V implements interface T.
    //
    // The behavior of Implements is unspecified if V is Typ[Invalid] or an uninstantiated
    // generic type.
    func Implements(V Type, T *Interface) bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 08 16:36:08 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  3. doc/next/2-language.md

    For details see the [language spec](/ref/spec#For_statements).
    
    <!-- go.dev/issue/46477, CL 566856, CL 586955, CL 586956 -->
    Go 1.23 includes preview support for [generic type aliases](/issue/46477).
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 05 19:56:43 UTC 2024
    - 757 bytes
    - Viewed (0)
  4. src/cmd/compile/internal/test/inst_test.go

    package test
    
    import (
    	"internal/testenv"
    	"os"
    	"path/filepath"
    	"regexp"
    	"testing"
    )
    
    // TestInst tests that only one instantiation of Sort is created, even though generic
    // Sort is used for multiple pointer types across two packages.
    func TestInst(t *testing.T) {
    	testenv.MustHaveGoBuild(t)
    	testenv.MustHaveGoRun(t)
    
    	// Build ptrsort.go, which uses package mysort.
    	var output []byte
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 06 18:07:35 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/ssa/_gen/decOps.go

    package main
    
    var decOps = []opData{}
    
    var decBlocks = []blockData{}
    
    func init() {
    	archs = append(archs, arch{
    		name:    "dec",
    		ops:     decOps,
    		blocks:  decBlocks,
    		generic: true,
    	})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 04 19:35:46 UTC 2022
    - 355 bytes
    - Viewed (0)
  6. doc/next/6-stdlib/99-minor/go/types/67143.md

    The methods [Alias.Origin], [Alias.SetTypeParams], [Alias.TypeParams],
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 21:32:30 UTC 2024
    - 150 bytes
    - Viewed (0)
  7. src/cmd/compile/internal/test/pgo_devirtualize_test.go

    		//	callee: "mult.MultClosure.func1",
    		//},
    	}
    
    	testPGODevirtualize(t, dir, want, preProfFileName)
    }
    
    // Regression test for https://go.dev/issue/65615. If a target function changes
    // from non-generic to generic we can't devirtualize it (don't know the type
    // parameters), but the compiler should not crash.
    func TestLookupFuncGeneric(t *testing.T) {
    	wd, err := os.Getwd()
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 15 21:30:35 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/typecheck/iexport.go

    //     type TypeParamType struct {
    //         Tag     itag // typeParamType
    //         Name    stringOff
    //         PkgPath stringOff
    //     }
    //
    //     // Instantiation of a generic type (like List[T2] or List[int])
    //     type InstanceType struct {
    //         Tag     itag // instanceType
    //         Pos     pos
    //         TypeArgs []typeOff
    //         BaseType typeOff
    //     }
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jul 21 02:40:02 UTC 2023
    - 6.8K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/types2/named_test.go

    		SrcInst  = pkg.Scope().Lookup("Inst").Type()
    		UserInst = mustInstantiate(b, G, Typ[Int])
    	)
    
    	tests := []struct {
    		name string
    		typ  Type
    	}{
    		{"nongeneric", T},
    		{"generic", G},
    		{"src instance", SrcInst},
    		{"user instance", UserInst},
    	}
    
    	b.Run("Underlying", func(b *testing.B) {
    		for _, test := range tests {
    			b.Run(test.name, func(b *testing.B) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 16 21:06:56 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/ssa/_gen/dec64Ops.go

    package main
    
    var dec64Ops = []opData{}
    
    var dec64Blocks = []blockData{}
    
    func init() {
    	archs = append(archs, arch{
    		name:    "dec64",
    		ops:     dec64Ops,
    		blocks:  dec64Blocks,
    		generic: true,
    	})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 04 19:35:46 UTC 2022
    - 365 bytes
    - Viewed (0)
Back to top