Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 569 for escapers (0.25 sec)

  1. test/escape_param.go

    func f(x *Node) { // ERROR "leaking param content: x"
    	Sink = &Node{x.p} // ERROR "&Node{...} escapes to heap"
    }
    
    func g(x *Node) *Node { // ERROR "leaking param content: x"
    	return &Node{x.p} // ERROR "&Node{...} escapes to heap"
    }
    
    func h(x *Node) { // ERROR "leaking param: x"
    	y := &Node{x} // ERROR "&Node{...} does not escape"
    	Sink = g(y)
    	f(y)
    }
    
    // interface(in) -> out
    // See also issue 29353.
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 26 23:50:32 UTC 2021
    - 8.9K bytes
    - Viewed (0)
  2. test/escape_array.go

    	a.s = x
    	b := new(a65537) // ERROR "new\(a65537\) escapes to heap"
    	b.s = y
    }
    
    // BAD: x need not leak.
    func doesMakeSlice(x *string, y *string) { // ERROR "leaking param: x" "leaking param: y"
    	a := make([]*string, 10) // ERROR "make\(\[\]\*string, 10\) does not escape"
    	a[0] = x
    	b := make([]*string, 65537) // ERROR "make\(\[\]\*string, 65537\) escapes to heap"
    	b[0] = y
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 26 23:50:32 UTC 2021
    - 3.6K bytes
    - Viewed (0)
  3. src/net/url/url.go

    			// everything, so escape nothing.
    			return false
    		}
    	}
    
    	if mode == encodeFragment {
    		// RFC 3986 §2.2 allows not escaping sub-delims. A subset of sub-delims are
    		// included in reserved from RFC 2396 §2.2. The remaining sub-delims do not
    		// need to be escaped. To minimize potential breakage, we apply two restrictions:
    		// (1) we always escape sub-delims outside of the fragment, and (2) we always
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:53 UTC 2024
    - 36.1K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/sys/windows/exec_windows.go

    		commandLine = append(commandLine, ' ')
    		// TODO(bcmills): since we're already appending to a slice, it would be nice
    		// to avoid the intermediate allocations of EscapeArg.
    		// Perhaps we can factor out an appendEscapedArg function.
    		commandLine = append(commandLine, EscapeArg(arg)...)
    	}
    	return string(commandLine)
    }
    
    // DecomposeCommandLine breaks apart its argument command line into unescaped parts using CommandLineToArgv,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 10 16:32:44 UTC 2023
    - 7.3K bytes
    - Viewed (0)
  5. test/escape3.go

    // run
    
    // Copyright 2011 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Test the run-time behavior of escape analysis-related optimizations.
    
    package main
    
    func main() {
    	test1()
    }
    
    func test1() {
    	check1(0)
    	check1(1)
    	check1(2)
    }
    
    type T1 struct {
    	X, Y, Z int
    }
    
    func f() int {
    	return 1
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 524 bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/escape/CharEscaperBuilder.java

        }
        return result;
      }
    
      /**
       * Convert this builder into a char escaper which is just a decorator around the underlying array
       * of replacement char[]s.
       *
       * @return an escaper that escapes based on the underlying array.
       */
      public Escaper toEscaper() {
        return new CharArrayDecorator(toArray());
      }
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Jan 18 20:55:09 UTC 2022
    - 4K bytes
    - Viewed (0)
  7. test/fixedbugs/issue21709.go

    // license that can be found in the LICENSE file.
    
    // Issue 21709: range expression overly escapes.
    
    package p
    
    type S struct{}
    
    func (s *S) Inc() {} // ERROR "s does not escape"
    var N int
    
    func F1() {
    	var s S
    	for i := 0; i < N; i++ {
    		fs := []func(){ // ERROR "\[\]func\(\){...} does not escape"
    			s.Inc, // ERROR "s.Inc does not escape"
    		}
    		for _, f := range fs {
    			f()
    		}
    	}
    }
    
    func F2() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Sep 12 08:31:49 UTC 2020
    - 709 bytes
    - Viewed (0)
  8. test/escape_map.go

    // license that can be found in the LICENSE file.
    
    // Test escape analysis for maps.
    
    package escape
    
    var sink interface{}
    
    func map0() {
    	m := make(map[*int]*int) // ERROR "make\(map\[\*int\]\*int\) does not escape"
    	// BAD: i should not escape
    	i := 0 // ERROR "moved to heap: i"
    	// BAD: j should not escape
    	j := 0 // ERROR "moved to heap: j"
    	m[&i] = &j
    	_ = m
    }
    
    func map1() *int {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Sep 12 08:31:49 UTC 2020
    - 2.8K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/net/PercentEscaperTest.java

        assertUnicodeEscaping(e, "%F4%8F%BF%BF", '\uDBFF', '\uDFFF');
    
        // simple string tests
        assertEquals("", e.escape(""));
        assertEquals("safestring", e.escape("safestring"));
        assertEquals("embedded%00null", e.escape("embedded\0null"));
        assertEquals("max%EF%BF%BFchar", e.escape("max\uffffchar"));
      }
    
      /** Tests the various ways that the space character can be handled */
      public void testPlusForSpace() {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Oct 10 19:45:10 UTC 2022
    - 5.2K bytes
    - Viewed (0)
  10. test/escape_runtime_atomic.go

    func Storep() {
    	var x int // ERROR "moved to heap: x"
    	atomic.StorepNoWB(unsafe.Pointer(&ptr), unsafe.Pointer(&x))
    }
    
    func Casp1() {
    	// BAD: should always be "does not escape"
    	x := new(int) // ERROR "escapes to heap|does not escape"
    	var y int     // ERROR "moved to heap: y"
    	atomic.Casp1(&ptr, unsafe.Pointer(x), unsafe.Pointer(&y))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 874 bytes
    - Viewed (0)
Back to top