Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for slicebytetostring (0.72 sec)

  1. test/codegen/maps.go

    	// amd64:-`.*runtime\.slicebytetostring\(`
    	return m[string(bytes)]
    }
    
    func LookupStringConversionStructLit(m map[struct{ string }]int, bytes []byte) int {
    	// amd64:-`.*runtime\.slicebytetostring\(`
    	return m[struct{ string }{string(bytes)}]
    }
    
    func LookupStringConversionArrayLit(m map[[2]string]int, bytes []byte) int {
    	// amd64:-`.*runtime\.slicebytetostring\(`
    	return m[[2]string{string(bytes), string(bytes)}]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 23 15:51:32 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  2. src/runtime/string.go

    	return concatstrings(buf, []string{a0, a1, a2, a3, a4})
    }
    
    // slicebytetostring converts a byte slice to a string.
    // It is inserted by the compiler into generated code.
    // ptr is a pointer to the first element of the slice;
    // n is the length of the slice.
    // Buf is a fixed-size buffer for the result,
    // it is not nil if the result does not escape.
    //
    // slicebytetostring should be an internal detail,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:17:26 UTC 2024
    - 13.4K bytes
    - Viewed (0)
  3. test/codegen/strings.go

    // string types.
    
    func CountRunes(s string) int { // Issue #24923
    	// amd64:`.*countrunes`
    	return len([]rune(s))
    }
    
    func CountBytes(s []byte) int {
    	// amd64:-`.*runtime.slicebytetostring`
    	return len(string(s))
    }
    
    func ToByteSlice() []byte { // Issue #24698
    	// amd64:`LEAQ\ttype:\[3\]uint8`
    	// amd64:`CALL\truntime\.newobject`
    	// amd64:-`.*runtime.stringtoslicebyte`
    	return []byte("foo")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jul 26 17:17:28 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  4. src/cmd/internal/goobj/builtinlist.go

    	{"runtime.concatstring3", 1},
    	{"runtime.concatstring4", 1},
    	{"runtime.concatstring5", 1},
    	{"runtime.concatstrings", 1},
    	{"runtime.cmpstring", 1},
    	{"runtime.intstring", 1},
    	{"runtime.slicebytetostring", 1},
    	{"runtime.slicebytetostringtmp", 1},
    	{"runtime.slicerunetostring", 1},
    	{"runtime.stringtoslicebyte", 1},
    	{"runtime.stringtoslicerune", 1},
    	{"runtime.slicecopy", 1},
    	{"runtime.decoderune", 1},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 21:08:03 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/walk/convert.go

    		// slicerunetostring(*[32]byte, []rune) string
    		return mkcall("slicerunetostring", n.Type(), init, a, n.X)
    	}
    	// slicebytetostring(*[32]byte, ptr *byte, n int) string
    	n.X = cheapExpr(n.X, init)
    	ptr, len := backingArrayPtrLen(n.X)
    	return mkcall("slicebytetostring", n.Type(), init, a, ptr, len)
    }
    
    // walkBytesToStringTemp walks an OBYTES2STRTMP node.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 09 17:28:22 UTC 2023
    - 18.2K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/typecheck/_builtin/runtime.go

    func concatstring5(*[32]byte, string, string, string, string, string) string
    func concatstrings(*[32]byte, []string) string
    
    func cmpstring(string, string) int
    func intstring(*[4]byte, int64) string
    func slicebytetostring(buf *[32]byte, ptr *byte, n int) string
    func slicebytetostringtmp(ptr *byte, n int) string
    func slicerunetostring(*[32]byte, []rune) string
    func stringtoslicebyte(*[32]byte, string) []byte
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 21:08:03 UTC 2024
    - 10.6K bytes
    - Viewed (0)
  7. src/runtime/race/output_test.go

    package main
    func main() {
    	done := make(chan string)
    	data := make([]byte, 10)
    	go func() {
    		done <- string(data)
    	}()
    	data[0] = 1
    	<-done
    }
    `, []string{`
      runtime\.slicebytetostring\(\)
          .*/runtime/string\.go:.*
      main\.main\.func1\(\)
          .*/main.go:7`}},
    
    	// Test for https://golang.org/issue/33309
    	{"midstack_inlining_traceback", "run", "linux", "atexit_sleep_ms=0", `
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 25 20:44:25 UTC 2023
    - 9.3K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/typecheck/builtin.go

    	{"concatstring3", funcTag, 35},
    	{"concatstring4", funcTag, 36},
    	{"concatstring5", funcTag, 37},
    	{"concatstrings", funcTag, 39},
    	{"cmpstring", funcTag, 40},
    	{"intstring", funcTag, 43},
    	{"slicebytetostring", funcTag, 44},
    	{"slicebytetostringtmp", funcTag, 45},
    	{"slicerunetostring", funcTag, 48},
    	{"stringtoslicebyte", funcTag, 50},
    	{"stringtoslicerune", funcTag, 53},
    	{"slicecopy", funcTag, 54},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 21:08:03 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/typecheck/expr.go

    		if t.Elem() != types.ByteType && t.Elem() != types.Types[types.TUINT8] {
    			// If t is a slice of a user-defined byte type B (not uint8
    			// or byte), then add an extra CONVNOP from []B to []byte, so
    			// that the call to slicebytetostring() added in walk will
    			// typecheck correctly.
    			n.X = ir.NewConvExpr(n.X.Pos(), ir.OCONVNOP, types.NewSlice(types.ByteType), n.X)
    			n.X.SetTypecheck(1)
    		}
    
    	case ir.ORUNES2STR:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  10. test/escape2.go

    	x.p = &i
    	sink = x.s // ERROR "x.s escapes to heap$"
    }
    
    // String operations.
    
    func slicebytetostring0() {
    	b := make([]byte, 20) // ERROR "make\(\[\]byte, 20\) does not escape$"
    	s := string(b)        // ERROR "string\(b\) does not escape$"
    	_ = s
    }
    
    func slicebytetostring1() {
    	b := make([]byte, 20) // ERROR "make\(\[\]byte, 20\) does not escape$"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Dec 14 17:22:18 UTC 2023
    - 35.1K bytes
    - Viewed (0)
Back to top