- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 75 for cmap (0.23 sec)
-
src/go/ast/commentmap.go
stack.push(q) } } return cmap } // Update replaces an old node in the comment map with the new node // and returns the new node. Comments that were associated with the // old node are associated with the new node. func (cmap CommentMap) Update(old, new Node) Node { if list := cmap[old]; len(list) > 0 { delete(cmap, old) cmap[new] = append(cmap[new], list...) } return new }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 8.9K bytes - Viewed (0) -
src/go/ast/commentmap_test.go
} } // verify that no comments got lost if n := len(cmap.Comments()); n != len(f.Comments) { t.Errorf("got %d comment groups in map; want %d", n, len(f.Comments)) } // support code to update test: // set genMap to true to generate res map const genMap = false if genMap { out := make([]string, 0, len(cmap)) for n, list := range cmap {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 09 15:35:30 UTC 2022 - 3.9K bytes - Viewed (0) -
src/go/ast/example_test.go
// and AST nodes. cmap := ast.NewCommentMap(fset, f, f.Comments) // Remove the first variable declaration from the list of declarations. for i, decl := range f.Decls { if gen, ok := decl.(*ast.GenDecl); ok && gen.Tok == token.VAR { copy(f.Decls[i:], f.Decls[i+1:]) f.Decls = f.Decls[:len(f.Decls)-1] break } } // Use the comment map to filter comments that don't belong anymore
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 21:44:50 UTC 2024 - 6.1K bytes - Viewed (0) -
src/cmd/gofmt/rewrite.go
} */ // rewriteFile applies the rewrite rule 'pattern -> replace' to an entire file. func rewriteFile(fileSet *token.FileSet, pattern, replace ast.Expr, p *ast.File) *ast.File { cmap := ast.NewCommentMap(fileSet, p, p.Comments) m := make(map[string]reflect.Value) pat := reflect.ValueOf(pattern) repl := reflect.ValueOf(replace) var rewriteVal func(val reflect.Value) reflect.Value
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jul 27 22:07:13 UTC 2023 - 8.1K bytes - Viewed (0) -
src/runtime/mmap.go
package runtime import "unsafe" // mmap calls the mmap system call. It is implemented in assembly. // We only pass the lower 32 bits of file offset to the // assembly routine; the higher bits (if required), should be provided // by the assembly routine as 0. // The err result is an OS error code such as ENOMEM. func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uint32) (p unsafe.Pointer, err int)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Aug 25 20:58:13 UTC 2023 - 844 bytes - Viewed (0) -
src/cmd/go/internal/mmap/mmap.go
// license that can be found in the LICENSE file. // This package is a lightly modified version of the mmap code // in github.com/google/codesearch/index. // The mmap package provides an abstraction for memory mapping files // on different platforms. package mmap import ( "os" ) // Data is mmap'ed read-only data from a file. // The backing file is never closed, so Data
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Dec 15 21:57:36 UTC 2023 - 754 bytes - Viewed (0) -
src/cmd/compile/internal/types2/map.go
package types2 // A Map represents a map type. type Map struct { key, elem Type } // NewMap returns a new map for the given key and element types. func NewMap(key, elem Type) *Map { return &Map{key: key, elem: elem} } // Key returns the key type of map m. func (m *Map) Key() Type { return m.key } // Elem returns the element type of map m. func (m *Map) Elem() Type { return m.elem }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jul 01 22:17:50 UTC 2021 - 659 bytes - Viewed (0) -
src/runtime/cgo/mmap.go
import _ "unsafe" // When using cgo, call the C library for mmap, so that we call into // any sanitizer interceptors. This supports using the memory // sanitizer with Go programs. The memory sanitizer only applies to // C/C++ code; this permits that code to see the Go code as normal // program addresses that have been initialized. // To support interceptors that look for both mmap and munmap, // also call the C library for munmap.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Aug 25 20:58:13 UTC 2023 - 1K bytes - Viewed (0) -
test/fixedbugs/issue52279.dir/lib.go
package lib type FMap[K comparable, V comparable] map[K]V //go:noinline func (m FMap[K, V]) Flip() FMap[V, K] { out := make(FMap[V, K]) return out } type MyType uint8 const ( FIRST MyType = 0 ) var typeStrs = FMap[MyType, string]{ FIRST: "FIRST", } func (self MyType) String() string { return typeStrs[self]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 10 19:15:31 UTC 2022 - 321 bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/telemetry/internal/mmap/mmap.go
// license that can be found in the LICENSE file. // This package is a lightly modified version of the mmap code // in github.com/google/codesearch/index. // The mmap package provides an abstraction for memory mapping files // on different platforms. package mmap import ( "os" ) // The backing file is never closed, so Data // remains valid for the lifetime of the process.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 30 21:40:49 UTC 2024 - 1002 bytes - Viewed (0)