Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for declareParams (0.16 sec)

  1. src/cmd/compile/internal/typecheck/dcl.go

    // Target.Funcs.
    //
    // Before returning, it sets CurFunc to fn. When the caller is done
    // constructing fn, it must call FinishFuncBody to restore CurFunc.
    func DeclFunc(fn *ir.Func) {
    	fn.DeclareParams(true)
    	fn.Nname.Defn = fn
    	Target.Funcs = append(Target.Funcs, fn)
    
    	funcStack = append(funcStack, ir.CurFunc)
    	ir.CurFunc = fn
    }
    
    // FinishFuncBody restores ir.CurFunc to its state before the last
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 14 13:15:50 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/ssa/export_test.go

    }
    
    func (c *Conf) Frontend() Frontend {
    	if c.fe == nil {
    		pkg := types.NewPkg("my/import/path", "path")
    		fn := ir.NewFunc(src.NoXPos, src.NoXPos, pkg.Lookup("function"), types.NewSignature(nil, nil, nil))
    		fn.DeclareParams(true)
    		fn.LSym = &obj.LSym{Name: "my/import/path.function"}
    
    		c.fe = TestFrontend{
    			t:    c.tb,
    			ctxt: c.config.ctxt,
    			f:    fn,
    		}
    	}
    	return c.fe
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 21:19:39 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/ir/func.go

    	e.SetTypecheck(1)
    	return e
    }
    
    // DeclareParams creates Names for all of the parameters in fn's
    // signature and adds them to fn.Dcl.
    //
    // If setNname is true, then it also sets types.Field.Nname for each
    // parameter.
    func (fn *Func) DeclareParams(setNname bool) {
    	if fn.Dcl != nil {
    		base.FatalfAt(fn.Pos(), "%v already has Dcl", fn)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:05:44 UTC 2024
    - 21.1K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/typecheck/stmt.go

    		}
    	}
    
    	// Create a new wrapper function without parameters or results.
    	wrapperFn := ir.NewClosureFunc(pos, pos, op, types.NewSignature(nil, nil, nil), ir.CurFunc, Target)
    	wrapperFn.DeclareParams(true)
    	wrapperFn.SetWrapper(true)
    
    	// argps collects the list of operands within the call expression
    	// that must be evaluated at the go/defer statement.
    	var argps []*ir.Node
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 20 15:10:54 UTC 2023
    - 17.8K bytes
    - Viewed (0)
Back to top