Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 569 for escapers (0.14 sec)

  1. test/closure3.dir/main.go

    			if y(40) != 41 {
    				ppanic("y(40) != 41")
    			}
    		}()
    	}
    
    	{
    		y := func(x int) int { // ERROR "can inline main.func14" "func literal does not escape"
    			return x + 2
    		}
    		y, ok = map[int]func(int) int{ // ERROR "does not escape"
    			0: func(x int) int { return x + 1 }, // ERROR "can inline main.func15" "func literal escapes"
    		}[0]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 17 19:36:29 UTC 2023
    - 8.3K bytes
    - Viewed (0)
  2. test/escape_goto.go

    // license that can be found in the LICENSE file.
    
    // Test escape analysis for goto statements.
    
    package escape
    
    var x bool
    
    func f1() {
    	var p *int
    loop:
    	if x {
    		goto loop
    	}
    	// BAD: We should be able to recognize that there
    	// aren't any more "goto loop" after here.
    	p = new(int) // ERROR "escapes to heap"
    	_ = p
    }
    
    func f2() {
    	var p *int
    	if x {
    	loop:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jul 28 21:41:07 UTC 2021
    - 677 bytes
    - Viewed (0)
  3. 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)
  4. src/html/template/html.go

    }
    
    // attrEscaper escapes for inclusion in quoted attribute values.
    func attrEscaper(args ...any) string {
    	s, t := stringify(args...)
    	if t == contentTypeHTML {
    		return htmlReplacer(stripTags(s), htmlNormReplacementTable, true)
    	}
    	return htmlReplacer(s, htmlReplacementTable, true)
    }
    
    // rcdataEscaper escapes for inclusion in an RCDATA element body.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 02 19:42:28 UTC 2023
    - 7.3K bytes
    - Viewed (0)
  5. src/syscall/exec_windows.go

    func EscapeArg(s string) string {
    	if len(s) == 0 {
    		return `""`
    	}
    	for i := 0; i < len(s); i++ {
    		switch s[i] {
    		case '"', '\\', ' ', '\t':
    			// Some escaping required.
    			b := make([]byte, 0, len(s)+2)
    			b = appendEscapeArg(b, s)
    			return string(b)
    		}
    	}
    	return s
    }
    
    // appendEscapeArg escapes the string s, as per escapeArg,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 28 18:29:48 UTC 2023
    - 10.3K bytes
    - Viewed (0)
  6. test/fixedbugs/bug068.go

    package main
    
    const c = '\'';  // this works
    const s = "\'";  // ERROR "invalid|escape"
    
    /*
    There is no reason why the escapes need to be different inside strings and chars.
    
    uetli:~/go/test/bugs gri$ 6g bug068.go
    bug068.go:6: unknown escape sequence: '
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 17 04:49:30 UTC 2012
    - 520 bytes
    - Viewed (0)
  7. test/escape_level.go

    	p0 := &i
    	p1 := &p0
    	p2 := *p1
    	sink = p2
    }
    
    func level9() {
    	i := 0
    	p0 := &i
    	p1 := &p0
    	p2 := *p1
    	sink = *p2 // ERROR "\*p2 escapes to heap"
    }
    
    func level10() {
    	i := 0
    	p0 := &i
    	p1 := *p0
    	p2 := &p1
    	sink = *p2 // ERROR "\*p2 escapes to heap"
    }
    
    func level11() {
    	i := 0
    	p0 := &i
    	p1 := &p0
    	p2 := **p1 // ERROR "moved to heap: p2"
    	sink = &p2
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 03 17:52:06 UTC 2019
    - 1.8K bytes
    - Viewed (0)
  8. src/mime/quotedprintable/example_test.go

    }
    
    func ExampleNewWriter() {
    	w := quotedprintable.NewWriter(os.Stdout)
    	w.Write([]byte("These symbols will be escaped: = \t"))
    	w.Close()
    
    	// Output:
    	// These symbols will be escaped: =3D =09
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 20 18:41:18 UTC 2020
    - 1K bytes
    - Viewed (0)
  9. test/uintptrescapes2.go

    }
    
    func TestF4() {
    	var v2 int                                // ERROR "moved to heap"
    	F4(0, 1, uintptr(unsafe.Pointer(&v2)), 2) // ERROR "live at call to newobject: .?autotmp" "live at call to F4: .?autotmp" "escapes to heap" "stack object .autotmp_[0-9]+ unsafe.Pointer$"
    }
    
    func TestM2() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 24 18:24:24 UTC 2021
    - 2.2K bytes
    - Viewed (0)
  10. test/fixedbugs/issue42284.dir/a.go

    func (T) M() {} // ERROR "can inline T.M"
    
    func E() I { // ERROR "can inline E"
    	return T(0) // ERROR "T\(0\) escapes to heap"
    }
    
    func F(i I) I { // ERROR "can inline F" "leaking param: i to result ~r0 level=0"
    	i = nil
    	return i
    }
    
    func g() {
    	h := E() // ERROR "inlining call to E" "T\(0\) does not escape"
    	h.M()    // ERROR "devirtualizing h.M to T" "inlining call to T.M"
    
    	// BAD: T(0) could be stack allocated.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 20 18:09:45 UTC 2023
    - 750 bytes
    - Viewed (0)
Back to top