Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for funcBody (0.13 sec)

  1. src/go/printer/nodes.go

    	case *ast.FuncLit:
    		p.setPos(x.Type.Pos())
    		p.print(token.FUNC)
    		// See the comment in funcDecl about how the header size is computed.
    		startCol := p.out.Column - len("func")
    		p.signature(x.Type)
    		p.funcBody(p.distanceFrom(x.Type.Pos(), startCol), blank, x.Body)
    
    	case *ast.ParenExpr:
    		if _, hasParens := x.X.(*ast.ParenExpr); hasParens {
    			// don't print parentheses around an already parenthesized expression
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 17 18:53:17 UTC 2023
    - 52.6K bytes
    - Viewed (0)
  2. src/go/types/stmt.go

    // This file implements typechecking of statements.
    
    package types
    
    import (
    	"go/ast"
    	"go/constant"
    	"go/token"
    	"internal/buildcfg"
    	. "internal/types/errors"
    	"sort"
    )
    
    func (check *Checker) funcBody(decl *declInfo, name string, sig *Signature, body *ast.BlockStmt, iota constant.Value) {
    	if check.conf.IgnoreFuncBodies {
    		panic("function body not ignored")
    	}
    
    	if check.conf._Trace {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.6K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/stmt.go

    package types2
    
    import (
    	"cmd/compile/internal/syntax"
    	"go/constant"
    	"internal/buildcfg"
    	. "internal/types/errors"
    	"sort"
    )
    
    func (check *Checker) funcBody(decl *declInfo, name string, sig *Signature, body *syntax.BlockStmt, iota constant.Value) {
    	if check.conf.IgnoreFuncBodies {
    		panic("function body not ignored")
    	}
    
    	if check.conf.Trace {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.7K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/syntax/parser.go

    		if context != "" {
    			msg = "expected name"
    		}
    		p.syntaxError(msg)
    		p.advance(_Lbrace, _Semi)
    	}
    
    	if p.tok == _Lbrace {
    		f.Body = p.funcBody()
    	}
    
    	return f
    }
    
    func (p *parser) funcBody() *BlockStmt {
    	p.fnest++
    	errcnt := p.errcnt
    	body := p.blockStmt("")
    	p.fnest--
    
    	// Don't check branches if there were syntax errors in the function
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 62.9K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/types2/decl.go

    	}
    
    	// function body must be type-checked after global declarations
    	// (functions implemented elsewhere have no body)
    	if !check.conf.IgnoreFuncBodies && fdecl.Body != nil {
    		check.later(func() {
    			check.funcBody(decl, obj.name, sig, fdecl.Body, nil)
    		}).describef(obj, "func %s", obj.name)
    	}
    }
    
    func (check *Checker) declStmt(list []syntax.Decl) {
    	pkg := check.pkg
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 29.6K bytes
    - Viewed (0)
  6. src/go/types/decl.go

    	}
    
    	// function body must be type-checked after global declarations
    	// (functions implemented elsewhere have no body)
    	if !check.conf.IgnoreFuncBodies && fdecl.Body != nil {
    		check.later(func() {
    			check.funcBody(decl, obj.name, sig, fdecl.Body, nil)
    		}).describef(obj, "func %s", obj.name)
    	}
    }
    
    func (check *Checker) declStmt(d ast.Decl) {
    	pkg := check.pkg
    
    	check.walkDecl(d, func(d decl) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 31K bytes
    - Viewed (0)
  7. src/go/types/expr.go

    				// body refers. Instead, type-check as soon as possible,
    				// but before the enclosing scope contents changes (go.dev/issue/22992).
    				check.later(func() {
    					check.funcBody(decl, "<function literal>", sig, e.Body, iota)
    				}).describef(e, "func literal")
    			}
    			x.mode = value
    			x.typ = sig
    		} else {
    			check.errorf(e, InvalidSyntaxTree, "invalid function literal %v", e)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 49.7K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types2/expr.go

    				// body refers. Instead, type-check as soon as possible,
    				// but before the enclosing scope contents changes (go.dev/issue/22992).
    				check.later(func() {
    					check.funcBody(decl, "<function literal>", sig, e.Body, iota)
    				}).describef(e, "func literal")
    			}
    			x.mode = value
    			x.typ = sig
    		} else {
    			check.errorf(e, InvalidSyntaxTree, "invalid function literal %v", e)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 51.7K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tf2xla/internal/mlir_bridge_pass_util.cc

        const FunctionDef* func_def = flib_def.Find(func_name);
        std::unique_ptr<FunctionBody> func_body;
        if (!FunctionDefToBodyHelper(*func_def, AttrSlice(&func_def->attr()),
                                     &flib_def, &func_body)
                 .ok())
          return false;
        if (DoesGraphContainTPUPartitionedCall(*func_body->graph)) return true;
      }
      return false;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 07 12:22:33 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  10. src/cmd/covdata/covdata.go

    		op = makeMergeOp()
    	case debugDumpMode:
    		op = makeDumpOp(debugDumpMode)
    	case textfmtMode:
    		op = makeDumpOp(textfmtMode)
    	case percentMode:
    		op = makeDumpOp(percentMode)
    	case funcMode:
    		op = makeDumpOp(funcMode)
    	case pkglistMode:
    		op = makeDumpOp(pkglistMode)
    	case subtractMode:
    		op = makeSubtractIntersectOp(subtractMode)
    	case intersectMode:
    		op = makeSubtractIntersectOp(intersectMode)
    	default:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 5.7K bytes
    - Viewed (0)
Back to top