Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for CallStmt (0.2 sec)

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

    func (check *Checker) isTerminating(s syntax.Stmt, label string) bool {
    	switch s := s.(type) {
    	default:
    		panic("unreachable")
    
    	case *syntax.DeclStmt, *syntax.EmptyStmt, *syntax.SendStmt,
    		*syntax.AssignStmt, *syntax.CallStmt:
    		// no chance
    
    	case *syntax.LabeledStmt:
    		return check.isTerminating(s.Stmt, s.Label.Value)
    
    	case *syntax.ExprStmt:
    		// calling the predeclared (possibly parenthesized) panic() function is terminating
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 22 19:32:17 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/syntax/positions.go

    		// case *LabeledStmt:
    		// case *BlockStmt:
    		// case *ExprStmt:
    		case *SendStmt:
    			m = n.Chan
    		// case *DeclStmt:
    		case *AssignStmt:
    			m = n.Lhs
    		// case *BranchStmt:
    		// case *CallStmt:
    		// case *ReturnStmt:
    		// case *IfStmt:
    		// case *ForStmt:
    		// case *SwitchStmt:
    		// case *SelectStmt:
    
    		// helper nodes
    		case *RangeClause:
    			if n.Lhs != nil {
    				m = n.Lhs
    				continue
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 17:49:19 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/syntax/tokens.go

    	// empty line comment to exclude it from .String
    	tokenCount //
    )
    
    const (
    	// for BranchStmt
    	Break       = _Break
    	Continue    = _Continue
    	Fallthrough = _Fallthrough
    	Goto        = _Goto
    
    	// for CallStmt
    	Go    = _Go
    	Defer = _Defer
    )
    
    // Make sure we have at most 64 tokens so we can use them in a set.
    const _ uint64 = 1 << (tokenCount - 1)
    
    // contains reports whether tok is in tokset.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 20 14:52:38 UTC 2023
    - 2.6K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/syntax/nodes_test.go

    	{"BranchStmt", `@break`},
    	{"BranchStmt", `@break L`},
    	{"BranchStmt", `@continue`},
    	{"BranchStmt", `@continue L`},
    	{"BranchStmt", `@fallthrough`},
    	{"BranchStmt", `@goto L`},
    
    	{"CallStmt", `@defer f()`},
    	{"CallStmt", `@go f()`},
    
    	{"ReturnStmt", `@return`},
    	{"ReturnStmt", `@return x`},
    	{"ReturnStmt", `@return a, b, a + b*f(1, 2, 3)`},
    
    	{"IfStmt", `@if cond {}`},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 02 18:45:06 UTC 2023
    - 8.7K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/syntax/walk.go

    		w.node(n.Lhs)
    		if n.Rhs != nil {
    			w.node(n.Rhs)
    		}
    
    	case *BranchStmt:
    		if n.Label != nil {
    			w.node(n.Label)
    		}
    		// Target points to nodes elsewhere in the syntax tree
    
    	case *CallStmt:
    		w.node(n.Call)
    
    	case *ReturnStmt:
    		if n.Results != nil {
    			w.node(n.Results)
    		}
    
    	case *IfStmt:
    		if n.Init != nil {
    			w.node(n.Init)
    		}
    		w.node(n.Cond)
    		w.node(n.Then)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 17 19:55:04 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/syntax/nodes.go

    		// or *ForStmt for breaks and continues, depending on the context of
    		// the branch. Target is not set for fallthroughs.
    		Target Stmt
    		stmt
    	}
    
    	CallStmt struct {
    		Tok     token // Go or Defer
    		Call    Expr
    		DeferAt Expr // argument to runtime.deferprocat
    		stmt
    	}
    
    	ReturnStmt struct {
    		Results Expr // nil means no explicit return values
    		stmt
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 20 14:52:38 UTC 2023
    - 9K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/syntax/parser.go

    	// and reject that more efficiently though.
    	return p.pexpr(nil, true)
    }
    
    // callStmt parses call-like statements that can be preceded by 'defer' and 'go'.
    func (p *parser) callStmt() *CallStmt {
    	if trace {
    		defer p.trace("callStmt")()
    	}
    
    	s := new(CallStmt)
    	s.pos = p.pos()
    	s.Tok = p.tok // _Defer or _Go
    	p.next()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 62.9K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/rangefunc/rewrite.go

    	f(func() {
    		runtime.deferprocat(func() { print("A") }, #defers)
    	})
    
    For this rewriting phase, we insert the explicit initialization of
    #defers and then attach the #defers variable to the CallStmt
    representing the defer. That variable will be propagated to the
    backend and will cause the backend to compile the defer using
    deferprocat instead of an ordinary deferproc.
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:05:44 UTC 2024
    - 41.6K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/syntax/printer.go

    			//           check once we enable that again.
    			p.print(n.Op, n.Op) // ++ or --
    		} else {
    			p.print(blank, n.Op, _Assign, blank)
    			p.print(n.Rhs)
    		}
    
    	case *CallStmt:
    		p.print(n.Tok, blank, n.Call)
    
    	case *ReturnStmt:
    		p.print(_Return)
    		if n.Results != nil {
    			p.print(blank, n.Results)
    		}
    
    	case *BranchStmt:
    		p.print(n.Tok)
    		if n.Label != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 24 07:17:27 UTC 2023
    - 21.5K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/types2/stmt.go

    			return
    		}
    
    		var x operand
    		check.binary(&x, nil, lhs[0], rhs[0], s.Op)
    		check.assignVar(lhs[0], nil, &x, "assignment")
    
    	case *syntax.CallStmt:
    		kind := "go"
    		if s.Tok == syntax.Defer {
    			kind = "defer"
    		}
    		check.suspendedCall(kind, s.Call)
    
    	case *syntax.ReturnStmt:
    		res := check.sig.results
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.7K bytes
    - Viewed (0)
Back to top