Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for methodValues (0.21 sec)

  1. src/reflect/makefunc.go

    	// v.Type returns the actual type of the method value.
    	ftyp := (*funcType)(unsafe.Pointer(v.Type().(*rtype)))
    
    	code := methodValueCallCodePtr()
    
    	// methodValue contains a stack map for use by the runtime
    	_, _, abid := funcLayout(ftyp, nil)
    	fv := &methodValue{
    		makeFuncCtxt: makeFuncCtxt{
    			fn:      code,
    			stack:   abid.stackPtrs,
    			argLen:  abid.stackCallArgsSize,
    			regPtrs: abid.inRegPtrs,
    		},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 15:20:05 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  2. src/runtime/stkframe.go

    	switch funcname(f) {
    	case "reflect.makeFuncStub", "reflect.methodValueCall":
    		// These take a *reflect.methodValue as their
    		// context register and immediately save it to 0(SP).
    		// Get the methodValue from 0(SP).
    		arg0 := frame.sp + sys.MinFrameSize
    
    		minSP := frame.fp
    		if !usesLR {
    			// The CALL itself pushes a word.
    			// Undo that adjustment.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 15:10:48 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  3. schema/schema.go

    		callbackTypeBeforeDelete, callbackTypeAfterDelete,
    		callbackTypeAfterFind,
    	}
    	for _, cbName := range callbackTypes {
    		if methodValue := callBackToMethodValue(modelValue, cbName); methodValue.IsValid() {
    			switch methodValue.Type().String() {
    			case "func(*gorm.DB) error": // TODO hack
    				reflect.Indirect(reflect.ValueOf(schema)).FieldByName(string(cbName)).SetBool(true)
    			default:
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 10:52:33 UTC 2024
    - 13.7K bytes
    - Viewed (0)
  4. doc/go1.17_spec.html

    <a href="#Function_literals">function literal</a> or
    <a href="#Method_values">method value</a>.
    </p>
    
    <p>
    It is legal to derive a function value from a method of an interface type.
    The resulting function takes an explicit receiver of that interface type.
    </p>
    
    <h3 id="Method_values">Method values</h3>
    
    <p>
    If the expression <code>x</code> has static type <code>T</code> and
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 11 20:22:45 UTC 2024
    - 211.6K bytes
    - Viewed (0)
  5. doc/go_spec.html

    <a href="#Function_literals">function literal</a> or
    <a href="#Method_values">method value</a>.
    </p>
    
    <p>
    It is legal to derive a function value from a method of an interface type.
    The resulting function takes an explicit receiver of that interface type.
    </p>
    
    <h3 id="Method_values">Method values</h3>
    
    <p>
    If the expression <code>x</code> has static type <code>T</code> and
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 21:07:21 UTC 2024
    - 281.5K bytes
    - Viewed (1)
  6. src/reflect/value.go

    // section of frame is set.
    //
    // regs contains the argument values passed in registers and will contain
    // the values returned from ctxt.fn in registers.
    func callMethod(ctxt *methodValue, frame unsafe.Pointer, retValid *bool, regs *abi.RegArgs) {
    	rcvr := ctxt.rcvr
    	rcvrType, valueFuncType, methodFn := methodReceiver("call", rcvr, ctxt.method)
    
    	// There are two ABIs at play here.
    	//
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:17:41 UTC 2024
    - 119.9K bytes
    - Viewed (0)
  7. src/reflect/all_test.go

    	}
    }
    
    func (k KeepMethodLive) Method2(i int) {
    	clobber()
    	ValueOf(k).MethodByName("Method1").Interface().(func(i int))(i)
    }
    
    func TestKeepMethodLive(t *testing.T) {
    	// Test that we keep methodValue live as long as it is
    	// referenced on the stack.
    	KeepMethodLive{}.Method1(10)
    }
    
    // clobber tries to clobber unreachable memory.
    func clobber() {
    	runtime.GC()
    	for i := 1; i < 32; i++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 218.8K bytes
    - Viewed (0)
Back to top