Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for initOrder (0.18 sec)

  1. src/go/types/initorder.go

    // Source: ../../cmd/compile/internal/types2/initorder.go
    
    // Copyright 2014 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package types
    
    import (
    	"container/heap"
    	"fmt"
    	. "internal/types/errors"
    	"sort"
    )
    
    // initOrder computes the Info.InitOrder for package variables.
    func (check *Checker) initOrder() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/types2/initorder.go

    import (
    	"container/heap"
    	"fmt"
    	. "internal/types/errors"
    	"sort"
    )
    
    // initOrder computes the Info.InitOrder for package variables.
    func (check *Checker) initOrder() {
    	// An InitOrder may already have been computed if a package is
    	// built from several calls to (*Checker).Files. Clear it.
    	check.Info.InitOrder = check.Info.InitOrder[:0]
    
    	// Compute the object dependency graph and initialize
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 28 22:06:51 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/example_test.go

    		Uses:  make(map[*syntax.Name]types2.Object),
    	}
    	pkg := mustTypecheck(input, nil, &info)
    
    	// Print package-level variables in initialization order.
    	fmt.Printf("InitOrder: %v\n\n", info.InitOrder)
    
    	// For each named object, print the line and
    	// column of its definition and each of its uses.
    	fmt.Println("Defs and Uses of each named object:")
    	usesByObj := make(map[types2.Object][]string)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 28 17:58:07 UTC 2023
    - 7.1K bytes
    - Viewed (0)
  4. src/go/types/example_test.go

    	var conf types.Config
    	pkg, err := conf.Check("fib", fset, []*ast.File{f}, &info)
    	if err != nil {
    		log.Fatal(err)
    	}
    
    	// Print package-level variables in initialization order.
    	fmt.Printf("InitOrder: %v\n\n", info.InitOrder)
    
    	// For each named object, print the line and
    	// column of its definition and each of its uses.
    	fmt.Println("Defs and Uses of each named object:")
    	usesByObj := make(map[types.Object][]string)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  5. src/go/types/api.go

    	//
    	Scopes map[ast.Node]*Scope
    
    	// InitOrder is the list of package-level initializers in the order in which
    	// they must be executed. Initializers referring to variables related by an
    	// initialization dependency appear in topological order, the others appear
    	// in source order. Variables without an initialization expression do not
    	// appear in this list.
    	InitOrder []*Initializer
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 17.2K bytes
    - Viewed (0)
  6. src/go/types/generate_test.go

    	"hilbert_test.go": func(f *ast.File) { renameImportPath(f, `"cmd/compile/internal/types2"->"go/types"`) },
    	"infer.go":        func(f *ast.File) { fixTokenPos(f); fixInferSig(f) },
    	"initorder.go":    nil,
    	// "initorder.go": fixErrErrorfCall, // disabled for now due to unresolved error_ use implications for gopls
    	"instantiate.go":      func(f *ast.File) { fixTokenPos(f); fixCheckErrorfCall(f) },
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 16.5K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/types2/api.go

    	//
    	Scopes map[syntax.Node]*Scope
    
    	// InitOrder is the list of package-level initializers in the order in which
    	// they must be executed. Initializers referring to variables related by an
    	// initialization dependency appear in topological order, the others appear
    	// in source order. Variables without an initialization expression do not
    	// appear in this list.
    	InitOrder []*Initializer
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 13:48:53 UTC 2024
    - 17.4K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types2/check.go

    	check.packageObjects()
    
    	print("== processDelayed ==")
    	check.processDelayed(0) // incl. all functions
    
    	print("== cleanup ==")
    	check.cleanup()
    
    	print("== initOrder ==")
    	check.initOrder()
    
    	if !check.conf.DisableUnusedImportCheck {
    		print("== unusedImports ==")
    		check.unusedImports()
    	}
    
    	print("== recordUntyped ==")
    	check.recordUntyped()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 23.3K bytes
    - Viewed (0)
  9. src/go/types/check.go

    	check.packageObjects()
    
    	print("== processDelayed ==")
    	check.processDelayed(0) // incl. all functions
    
    	print("== cleanup ==")
    	check.cleanup()
    
    	print("== initOrder ==")
    	check.initOrder()
    
    	if !check.conf.DisableUnusedImportCheck {
    		print("== unusedImports ==")
    		check.unusedImports()
    	}
    
    	print("== recordUntyped ==")
    	check.recordUntyped()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  10. src/go/types/api_test.go

    		// number of initializers must match
    		if len(info.InitOrder) != len(test.inits) {
    			t.Errorf("package %s: got %d initializers; want %d", name, len(info.InitOrder), len(test.inits))
    			continue
    		}
    
    		// initializers must match
    		for i, want := range test.inits {
    			got := info.InitOrder[i].String()
    			if got != want {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 94.2K bytes
    - Viewed (0)
Back to top