Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 67 for cdecl (0.04 sec)

  1. src/runtime/syscall_windows.go

    //
    // On 386, if cdecl is true, the returned C function will use the
    // cdecl calling convention; otherwise, it will use stdcall. On amd64,
    // it always uses fastcall. On arm, it always uses the ARM convention.
    //
    //go:linkname compileCallback syscall.compileCallback
    func compileCallback(fn eface, cdecl bool) (code uintptr) {
    	if GOARCH != "386" {
    		// cdecl is only meaningful on 386.
    		cdecl = false
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 20:12:46 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  2. src/runtime/syscall_windows_test.go

    	}
    }
    
    type cbFunc struct {
    	goFunc any
    }
    
    func (f cbFunc) cName(cdecl bool) string {
    	name := "stdcall"
    	if cdecl {
    		name = "cdecl"
    	}
    	t := reflect.TypeOf(f.goFunc)
    	for i := 0; i < t.NumIn(); i++ {
    		name += "_" + t.In(i).Name()
    	}
    	return name
    }
    
    func (f cbFunc) cSrc(w io.Writer, cdecl bool) {
    	// Construct a C function that takes a callback with
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 31 16:31:35 UTC 2023
    - 32.5K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/decl.go

    	saved := obj.color_
    	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 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 29.6K bytes
    - Viewed (0)
  4. 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)
  5. src/go/types/resolver.go

    			case funcDecl:
    				name := d.decl.Name.Name
    				obj := NewFunc(d.decl.Name.Pos(), pkg, name, nil) // signature set later
    				hasTParamError := false                           // avoid duplicate type parameter errors
    				if d.decl.Recv.NumFields() == 0 {
    					// regular function
    					if d.decl.Recv != nil {
    						check.error(d.decl.Recv, BadRecv, "method has no receiver")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 16:22:59 UTC 2024
    - 26.1K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/resolver.go

    		if seen[tname] {
    			return false, nil
    		}
    
    		// we're done if tdecl defined tname as a new type
    		// (rather than an alias)
    		tdecl := check.objMap[tname].tdecl // must exist for objects in package scope
    		if !tdecl.Alias {
    			return ptr, tname
    		}
    
    		// otherwise, continue resolving
    		typ = tdecl.Type
    		if seen == nil {
    			seen = make(map[*TypeName]bool)
    		}
    		seen[tname] = true
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 14:10:44 UTC 2024
    - 26.3K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/printf/printf.go

    // Otherwise it may be a Print wrapper.
    func maybePrintfWrapper(info *types.Info, decl ast.Decl) *printfWrapper {
    	// Look for functions with final argument type ...interface{}.
    	fdecl, ok := decl.(*ast.FuncDecl)
    	if !ok || fdecl.Body == nil {
    		return nil
    	}
    	fn, ok := info.Defs[fdecl.Name].(*types.Func)
    	// Type information may be incomplete.
    	if !ok {
    		return nil
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 32.5K bytes
    - Viewed (0)
  8. test/map.go

    		f := float32(i)
    		{
    			_, b := mib[i]
    			if !b {
    				panic(fmt.Sprintf("tuple existence decl: mib[%d]\n", i))
    			}
    			_, b = mib[i]
    			if !b {
    				panic(fmt.Sprintf("tuple existence assign: mib[%d]\n", i))
    			}
    		}
    		{
    			_, b := mii[i]
    			if !b {
    				panic(fmt.Sprintf("tuple existence decl: mii[%d]\n", i))
    			}
    			_, b = mii[i]
    			if !b {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 06 21:02:55 UTC 2014
    - 14.9K bytes
    - Viewed (0)
  9. src/cmd/doc/pkg.go

    				// Now print the consts, vars, and constructors.
    				for _, c := range typ.Consts {
    					if decl := pkg.oneLineNode(c.Decl); decl != "" {
    						pkg.Printf(indent+"%s\n", decl)
    					}
    				}
    				for _, v := range typ.Vars {
    					if decl := pkg.oneLineNode(v.Decl); decl != "" {
    						pkg.Printf(indent+"%s\n", decl)
    					}
    				}
    				for _, constructor := range typ.Funcs {
    					if isExported(constructor.Name) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 08 20:15:52 UTC 2024
    - 32K bytes
    - Viewed (0)
  10. src/go/doc/reader.go

    		}
    	}
    
    	*values = append(*values, &Value{
    		Doc:   decl.Doc.Text(),
    		Names: specNames(decl.Specs),
    		Decl:  decl,
    		order: r.order,
    	})
    	if r.mode&PreserveAST == 0 {
    		decl.Doc = nil // doc consumed - remove from AST
    	}
    	// Note: It's important that the order used here is global because the cleanupTypes
    	// methods may move values associated with types back into the global list. If the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 27.5K bytes
    - Viewed (0)
Back to top