Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 143 for importerOf (0.19 sec)

  1. src/cmd/go/internal/load/test.go

    		if preal.Internal.PGOProfile != "" && p.Internal.PGOProfile == "" {
    			split()
    		}
    	}
    
    	// Do search to find cycle.
    	// importerOf maps each import path to its importer nearest to p.
    	importerOf := map[*Package]*Package{}
    	for _, p := range ptest.Internal.Imports {
    		importerOf[p] = nil
    	}
    
    	// q is a breadth-first queue of packages to search for target.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 14:01:23 UTC 2024
    - 28.2K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. tensorflow/compiler/mlir/lite/experimental/tac/tac_module.h

      };
    
      virtual ~TacModule() = default;
    
      explicit TacModule(const Options& options) : options_(options) {}
    
      void SetImporter(std::unique_ptr<TacImporter> importer) {
        importer_ = std::move(importer);
      }
    
      void SetExporter(std::unique_ptr<TacExporter> exporter) {
        exporter_ = std::move(exporter);
      }
    
      // Returns pointer to the TargetHardware that is identified by 'hardware_name'
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 08 01:19:25 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/experimental/tac/tac_module.cc

        const_backends_.emplace_back(backend.get());
    
      if (!importer_) {
        return absl::Status(absl::StatusCode::kFailedPrecondition,
                            "Null Importer provided");
      }
      if (!exporter_) {
        return absl::Status(absl::StatusCode::kFailedPrecondition,
                            "Null Exporter provided");
      }
    
      auto module_status = importer_->Import();
      if (!module_status.ok()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 08 01:19:25 UTC 2023
    - 5.6K bytes
    - Viewed (0)
  6. src/go/types/resolver_test.go

    func (imp *resolveTestImporter) ImportFrom(path, srcDir string, mode ImportMode) (*Package, error) {
    	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
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  7. src/cmd/go/testdata/script/generate_invalid.txt

    package syntax
    //go:generate echo Fail c
    
    -- importerr/a.go --
    // Go file which imports non-existing package.
    // Go generate should process this file.
    
    package importerr
    //go:generate echo Success a
    import "foo"
    
    -- importerr/b.go --
    // Go file which imports non-existing package.
    // Go generate should process this file.
    
    //go:generate echo Success b
    package importerr
    import "bar"
    
    -- importerr/c.go --
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Sep 09 01:48:44 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  8. 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)
  9. src/go/internal/srcimporter/srcimporter_test.go

    	flag.Parse()
    	build.Default.GOROOT = testenv.GOROOT(nil)
    	os.Exit(m.Run())
    }
    
    const maxTime = 2 * time.Second
    
    var importer = New(&build.Default, token.NewFileSet(), make(map[string]*types.Package))
    
    func doImport(t *testing.T, path, srcDir string) {
    	t0 := time.Now()
    	if _, err := importer.ImportFrom(path, srcDir, 0); err != nil {
    		// don't report an error if there's no buildable Go files
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 12:00:02 UTC 2023
    - 6.5K bytes
    - Viewed (0)
  10. 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)
Back to top