Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for Innermost (0.26 sec)

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

    	return cmpPos(s.pos, pos) <= 0 && cmpPos(pos, s.end) < 0
    }
    
    // Innermost returns the innermost (child) scope containing
    // pos. If pos is not within any scope, the result is nil.
    // The result is also nil for the Universe scope.
    // The result is guaranteed to be valid only if the type-checked
    // AST has complete position information.
    func (s *Scope) Innermost(pos syntax.Pos) *Scope {
    	// Package scopes do not have extents since they may be
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 20:08:23 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  2. src/go/types/scope.go

    	return cmpPos(s.pos, pos) <= 0 && cmpPos(pos, s.end) < 0
    }
    
    // Innermost returns the innermost (child) scope containing
    // pos. If pos is not within any scope, the result is nil.
    // The result is also nil for the Universe scope.
    // The result is guaranteed to be valid only if the type-checked
    // AST has complete position information.
    func (s *Scope) Innermost(pos token.Pos) *Scope {
    	// Package scopes do not have extents since they may be
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 20:08:23 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  3. src/cmd/internal/obj/util.go

    }
    
    // InnermostLineNumber returns a string containing the line number for the
    // innermost inlined function (if any inlining) at p's position
    func (p *Prog) InnermostLineNumber() string {
    	return p.Ctxt.InnermostPos(p.Pos).LineNumber()
    }
    
    // InnermostLineNumberHTML returns a string containing the line number for the
    // innermost inlined function (if any inlining) at p's position
    func (p *Prog) InnermostLineNumberHTML() string {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 15:44:14 UTC 2024
    - 17.5K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/decl.go

    	obj.color_ = black
    	fdecl := decl.fdecl
    	check.funcType(sig, fdecl.Recv, fdecl.TParamList, fdecl.Type)
    	obj.color_ = saved
    
    	// Set the scope's extent to the complete "func (...) { ... }"
    	// so that Scope.Innermost works correctly.
    	sig.scope.pos = fdecl.Pos()
    	sig.scope.end = syntax.EndPos(fdecl)
    
    	if len(fdecl.TParamList) > 0 && fdecl.Body == nil {
    		check.softErrorf(fdecl, BadDecl, "generic function is missing function body")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 29.6K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/copylock/copylock.go

    func (path typePath) String() string {
    	n := len(path)
    	var buf bytes.Buffer
    	for i := range path {
    		if i > 0 {
    			fmt.Fprint(&buf, " contains ")
    		}
    		// The human-readable path is in reverse order, outermost to innermost.
    		fmt.Fprint(&buf, path[n-i-1])
    	}
    	return buf.String()
    }
    
    func lockPathRhs(pass *analysis.Pass, x ast.Expr) typePath {
    	x = astutil.Unparen(x) // ignore parens on rhs
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/rangefunc/rewrite.go

    		}
    
    # Nested Loops
    
    So far we've only considered a single loop. If a function contains a
    sequence of loops, each can be translated individually. But loops can
    be nested. It would work to translate the innermost loop and then
    translate the loop around it, and so on, except that there'd be a lot
    of rewriting of rewritten code and the overall traversals could end up
    taking time quadratic in the depth of the nesting. To avoid all that,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:05:44 UTC 2024
    - 41.6K bytes
    - Viewed (0)
  7. src/go/types/decl.go

    	saved := obj.color_
    	obj.color_ = black
    	fdecl := decl.fdecl
    	check.funcType(sig, fdecl.Recv, fdecl.Type)
    	obj.color_ = saved
    
    	// Set the scope's extent to the complete "func (...) { ... }"
    	// so that Scope.Innermost works correctly.
    	sig.scope.pos = fdecl.Pos()
    	sig.scope.end = fdecl.End()
    
    	if fdecl.Type.TypeParams.NumFields() > 0 && fdecl.Body == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 31K bytes
    - Viewed (0)
  8. src/cmd/vendor/golang.org/x/tools/internal/analysisinternal/analysis.go

    		if _, ok = seen[obj]; ok {
    			return true
    		}
    		seen[obj] = struct{}{}
    		// Find the scope for the given position. Then, check whether the object
    		// exists within the scope.
    		innerScope := pkg.Scope().Innermost(pos)
    		if innerScope == nil {
    			return true
    		}
    		_, foundObj := innerScope.LookupParent(ident.Name, pos)
    		if foundObj != obj {
    			return true
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 11.7K bytes
    - Viewed (0)
  9. src/cmd/vendor/golang.org/x/tools/internal/typesinternal/errorcode.go

    	// MisplacedBreak occurs when a break statement is not within a for, switch,
    	// or select statement of the innermost function definition.
    	//
    	// Example:
    	//  func f() {
    	//  	break
    	//  }
    	MisplacedBreak
    
    	// MisplacedContinue occurs when a continue statement is not within a for
    	// loop of the innermost function definition.
    	//
    	// Example:
    	//  func sumeven(n int) int {
    	//  	proceed := func() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 34K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/ir/func.go

    	CanDelayResults bool
    }
    
    // A Mark represents a scope boundary.
    type Mark struct {
    	// Pos is the position of the token that marks the scope
    	// change.
    	Pos src.XPos
    
    	// Scope identifies the innermost scope to the right of Pos.
    	Scope ScopeID
    }
    
    // A ScopeID represents a lexical scope within a function.
    type ScopeID int32
    
    const (
    	funcDupok      = 1 << iota // duplicate definitions ok
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:05:44 UTC 2024
    - 21.1K bytes
    - Viewed (0)
Back to top