Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 730 for Importer (0.17 sec)

  1. src/go/importer/importer.go

    // with the positions of objects created by the importer.
    func For(compiler string, lookup Lookup) types.Importer {
    	return ForCompiler(token.NewFileSet(), compiler, lookup)
    }
    
    // Default returns an Importer for the compiler that built the running binary.
    // If available, the result implements [types.ImporterFrom].
    func Default() types.Importer {
    	return For(runtime.Compiler, nil)
    }
    
    // gc importer
    
    type gcimports struct {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  2. src/go/internal/gccgoimporter/importer.go

    	return
    }
    
    // An Importer resolves import paths to Packages. The imports map records
    // packages already known, indexed by package path.
    // An importer must determine the canonical package path and check imports
    // to see if it is already present in the map. If so, the Importer can return
    // the map entry. Otherwise, the importer must load the package data for the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 20 18:41:18 UTC 2020
    - 6.8K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tf2xla/tests/legalize-tf-with-tf2xla-hlo-importer.mlir

    Christian Sigg <******@****.***> 1712417263 -0700
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Apr 06 15:32:52 UTC 2024
    - 38.6K bytes
    - Viewed (0)
  4. src/go/types/resolver_test.go

    	if mode != 0 {
    		panic("mode must be 0")
    	}
    	if imp.importer == nil {
    		imp.importer = importer.Default().(ImporterFrom)
    		imp.imported = make(map[string]bool)
    	}
    	pkg, err := imp.importer.ImportFrom(path, srcDir, mode)
    	if err != nil {
    		return nil, err
    	}
    	imp.imported[path] = true
    	return pkg, nil
    }
    
    func TestResolveIdents(t *testing.T) {
    	testenv.MustHaveGoBuild(t)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  5. src/go/ast/resolve.go

    		}
    	}
    	return false
    }
    
    // An Importer resolves import paths to package Objects.
    // The imports map records the packages already imported,
    // indexed by package id (canonical import path).
    // An Importer must determine the canonical import path and
    // check the map to see if it is already present in the imports map.
    // If so, the Importer can return the map entry. Otherwise, the
    // Importer should load the package data for the given path into
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 5.4K bytes
    - Viewed (0)
  6. src/go/internal/srcimporter/srcimporter_test.go

    	}
    
    	// Reimporting a partially imported (incomplete) package is not supported (see issue #19337).
    	// Make sure we recognize the situation and report an error.
    
    	mathPkg := types.NewPackage("math", "math") // incomplete package
    	importer := New(&build.Default, token.NewFileSet(), map[string]*types.Package{mathPkg.Path(): mathPkg})
    	_, err := importer.ImportFrom("math", ".", 0)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 12:00:02 UTC 2023
    - 6.5K bytes
    - Viewed (0)
  7. src/go/types/self_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    
    	conf := Config{Importer: importer.Default()}
    	_, err = conf.Check("go/types", fset, files, nil)
    	if err != nil {
    		t.Fatal(err)
    	}
    }
    
    func BenchmarkCheck(b *testing.B) {
    	testenv.MustHaveGoBuild(b) // The Go command is needed for the importer to determine the locations of stdlib .a files.
    
    	for _, p := range []string{
    		"net/http",
    		"go/parser",
    		"go/constant",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 23 19:39:00 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types2/resolver_test.go

    	}
    
    	// resolve and type-check package AST
    	importer := new(resolveTestImporter)
    	conf := Config{Importer: importer}
    	uses := make(map[*syntax.Name]Object)
    	defs := make(map[*syntax.Name]Object)
    	_, err := conf.Check("testResolveIdents", files, &Info{Defs: defs, Uses: uses})
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	// check that all packages were imported
    	for _, name := range pkgnames {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 10 12:59:20 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  9. src/go/internal/srcimporter/srcimporter.go

    	"os/exec"
    	"path/filepath"
    	"strings"
    	"sync"
    	_ "unsafe" // for go:linkname
    )
    
    // An Importer provides the context for importing packages from source code.
    type Importer struct {
    	ctxt     *build.Context
    	fset     *token.FileSet
    	sizes    types.Sizes
    	packages map[string]*types.Package
    }
    
    // New returns a new Importer for the given context, file set, and map
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 23 18:54:32 UTC 2022
    - 8.2K bytes
    - Viewed (0)
  10. src/go/types/lookup_test.go

    	path := filepath.Join(runtime.GOROOT(), "src", "net", "http")
    
    	fset := token.NewFileSet()
    	files, err := pkgFiles(fset, path)
    	if err != nil {
    		b.Fatal(err)
    	}
    
    	conf := Config{
    		Importer: importer.Default(),
    	}
    
    	pkg, err := conf.Check("http", fset, files, nil)
    	if err != nil {
    		b.Fatal(err)
    	}
    
    	scope := pkg.Scope()
    	names := scope.Names()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 13 15:31:43 UTC 2022
    - 1.2K bytes
    - Viewed (0)
Back to top