Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 569 for escapers (0.13 sec)

  1. test/escape_struct_param1.go

    	u1 := U{&s1, &ps2}
    	u2 := &U{&s3, &ps4}  // ERROR "&U{...} does not escape$"
    	u3 := &U{&s5, &ps6}  // ERROR "&U{...} escapes to heap$"
    	v := &V{u1, u2, &u3} // ERROR "&V{...} does not escape$"
    	Ssink = v.UPiSPa()   // Ssink = &s3 (only &s3 really escapes)
    }
    
    // BAD: need fine-grained (field-sensitive) analysis to avoid spurious escape of all but &s3
    func tUPiSPb() {
    	s1 := "ant"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Sep 12 08:31:49 UTC 2020
    - 8.9K bytes
    - Viewed (0)
  2. test/escape_struct_param2.go

    	u1 := U{&s1, &ps2}
    	u2 := &U{&s3, &ps4}  // ERROR "&U{...} does not escape$"
    	u3 := &U{&s5, &ps6}  // ERROR "&U{...} escapes to heap$"
    	v := &V{u1, u2, &u3} // ERROR "&V{...} does not escape$"
    	Ssink = v.UPiSPa()   // Ssink = &s3 (only &s3 really escapes)
    }
    
    // BAD: need fine-grained (field-sensitive) analysis to avoid spurious escape of all but &s3
    func tUPiSPb() {
    	s1 := "ant"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Sep 12 08:31:49 UTC 2020
    - 8.9K bytes
    - Viewed (0)
  3. test/fixedbugs/issue12006.go

    func TFooJ1() {
    	a := int32(1)
    	b := "cat"
    	c := &a
    	FooJ(a, b, c) // ERROR "a does not escape" "b does not escape" "... argument does not escape"
    }
    
    func TFooJ2() {
    	a := int32(1) // ERROR "moved to heap: a"
    	b := "cat"
    	c := &a
    	isink = FooJ(a, b, c) // ERROR "a escapes to heap" "b escapes to heap" "... argument does not escape"
    }
    
    type fakeSlice struct {
    	l int
    	a *[4]interface{}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 26 23:50:32 UTC 2021
    - 3.8K bytes
    - Viewed (0)
  4. test/escape_slice.go

    	s := []*int{&i} // ERROR "\[\]\*int{...} escapes to heap"
    	return s
    }
    
    func slice11() {
    	i := 2
    	s := make([]int, 2, 3) // ERROR "make\(\[\]int, 2, 3\) does not escape"
    	s = make([]int, i, 3)  // ERROR "make\(\[\]int, i, 3\) does not escape"
    	s = make([]int, i, 1)  // ERROR "make\(\[\]int, i, 1\) does not escape"
    	_ = s
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 18:50:24 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  5. src/html/template/js_test.go

    	}
    
    	for _, test := range tests {
    		if s := test.escaper(input); s != test.escaped {
    			t.Errorf("%s once: want\n\t%q\ngot\n\t%q", test.name, test.escaped, s)
    			continue
    		}
    
    		// Escape it rune by rune to make sure that any
    		// fast-path checking does not break escaping.
    		var buf strings.Builder
    		for _, c := range input {
    			buf.WriteString(test.escaper(string(c)))
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 27 02:20:11 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  6. test/fixedbugs/issue17318.go

    func (e ent) String() string {
    	return fmt.Sprintf("%d", int(e)) // ERROR "... argument does not escape$" "int\(e\) escapes to heap$"
    }
    
    //go:noinline
    func foo(ops closure, j int) (err fmt.Stringer) { // ERROR "ops does not escape"
    	enqueue := func(i int) fmt.Stringer { // ERROR "func literal does not escape"
    		return ops(i, j) // ERROR "ops\(i, j\) escapes to heap$"
    	}
    	err = enqueue(4)
    	if err != nil {
    		return err
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 16 15:30:51 UTC 2019
    - 1.4K bytes
    - Viewed (0)
  7. test/fixedbugs/issue7921.go

    	b := bytes.NewBuffer(make([]byte, 0, 64)) // ERROR "&bytes.Buffer{...} does not escape$" "make\(\[\]byte, 0, 64\) does not escape$" "inlining call to bytes.NewBuffer$"
    	for _, x := range xs {
    		b.WriteString(x)
    		b.WriteByte(',')
    	}
    	return b.String() // ERROR "inlining call to bytes.\(\*Buffer\).String$" "string\(bytes.b.buf\[bytes.b.off:\]\) escapes to heap$"
    }
    
    func bufferNoEscape4() []byte {
    	var b bytes.Buffer
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 14 19:43:26 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  8. test/escape_field.go

    	x1 := iface.(X)
    	sink = x1.p1
    }
    
    func field18() {
    	i := 0 // ERROR "moved to heap: i$"
    	var x X
    	// BAD: &i should not escape
    	x.p1 = &i
    	var iface interface{} = x // ERROR "x does not escape"
    	y, _ := iface.(Y)         // Put X, but extracted Y. The cast will fail, so y is zero initialized.
    	sink = y                  // ERROR "y escapes to heap"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Sep 12 08:31:49 UTC 2020
    - 2.9K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/html/HtmlEscapersTest.java

        // Test simple escape of '&'.
        assertEquals("foo&bar", htmlEscaper().escape("foo&bar"));
    
        // If the string contains no escapes, it should return the arg.
        // Note: assert<b>Same</b> for this implementation.
        String s = "blah blah farhvergnugen";
        assertSame(s, htmlEscaper().escape(s));
    
        // Tests escapes at begin and end of string.
        assertEquals("&lt;p&gt;", htmlEscaper().escape("<p>"));
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Dec 16 19:54:45 UTC 2020
    - 2.3K bytes
    - Viewed (0)
  10. platforms/software/build-init/src/test/groovy/org/gradle/buildinit/plugins/internal/TemplateValueTest.groovy

    class TemplateValueTest extends Specification {
        def "escapes value for inclusion in a comment"() {
            expect:
            new TemplateValue(value).groovyComment == escaped
    
            where:
            value   | escaped
            ''      | ''
            'abc'   | 'abc'
            'a\n\t' | 'a\n\t'
            /a\b/   | /a\\b/
        }
    
        def "escapes value for inclusion in a string"() {
            expect:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Sep 18 13:47:19 UTC 2023
    - 1.4K bytes
    - Viewed (0)
Back to top