Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 3,773 for func7 (0.04 sec)

  1. test/func7.go

    // license that can be found in the LICENSE file.
    
    // Test evaluation order in if condition.
    
    package main
    
    var calledf = false
    
    func f() int {
    	calledf = true
    	return 1
    }
    
    func g() int {
    	if !calledf {
    		panic("BUG: func7 - called g before f")
    	}
    	return 0
    }
    
    func main() {
    	// gc used to evaluate g() before f().
    	if f() < g() {
    		panic("wrong answer")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 477 bytes
    - Viewed (0)
  2. src/internal/trace/testdata/testprog/stacks.go

    	// the rest of the test, they will block.
    	go func() { // func1
    		select {}
    	}()
    	go func() { // func2
    		var c chan int
    		c <- 0
    	}()
    	go func() { // func3
    		var c chan int
    		<-c
    	}()
    	done1 := make(chan bool)
    	go func() { // func4
    		<-done1
    	}()
    	done2 := make(chan bool)
    	go func() { // func5
    		done2 <- true
    	}()
    	c1 := make(chan int)
    	c2 := make(chan int)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  3. test/range4.go

    package main
    
    var gj int
    
    func yield4x(yield func() bool) {
    	_ = yield() && yield() && yield() && yield()
    }
    
    func yield4(yield func(int) bool) {
    	_ = yield(1) && yield(2) && yield(3) && yield(4)
    }
    
    func yield3(yield func(int) bool) {
    	_ = yield(1) && yield(2) && yield(3)
    }
    
    func yield2(yield func(int) bool) {
    	_ = yield(1) && yield(2)
    }
    
    func testfunc0() {
    	j := 0
    	for range yield4x {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 08 16:00:53 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  4. test/closure3.dir/main.go

    			b := 3
    			return func(y int) int { // ERROR "can inline main.func27.1" "can inline main.main.func27.func34"
    				c := 5
    				return func(z int) int { // ERROR "can inline main.func27.1.1" "can inline main.main.func27.func34.1" "can inline main.func27.main.func27.1.2" "can inline main.main.func27.main.main.func27.func34.func36"
    					return a*x + b*y + c*z
    				}(10) // ERROR "inlining call to main.func27.1.1"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 17 19:36:29 UTC 2023
    - 8.3K bytes
    - Viewed (0)
  5. src/internal/trace/trace_test.go

    			t.Fatal("did not see a goroutine in a the region 'special'")
    		}
    	})
    }
    
    func TestTraceGCStress(t *testing.T) {
    	testTraceProg(t, "gc-stress.go", nil)
    }
    
    func TestTraceGOMAXPROCS(t *testing.T) {
    	testTraceProg(t, "gomaxprocs.go", nil)
    }
    
    func TestTraceStacks(t *testing.T) {
    	testTraceProg(t, "stacks.go", func(t *testing.T, tb, _ []byte, stress bool) {
    		type frame struct {
    			fn   string
    			line int
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 18.5K bytes
    - Viewed (0)
  6. tensorflow/c/c_api_function_test.cc

      if (GetName(funcs[0]) == GetName(func0)) {
        AssertEqual(func0, funcs[0]);
        AssertEqual(func1, funcs[1]);
      } else {
        AssertEqual(func0, funcs[1]);
        AssertEqual(func1, funcs[0]);
      }
    
      TF_DeleteFunction(funcs[0]);
      TF_DeleteFunction(funcs[1]);
    
      TF_DeleteFunction(func0);
      TF_DeleteFunction(func1);
    }
    
    }  // namespace
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jul 20 22:08:54 UTC 2023
    - 63.6K bytes
    - Viewed (0)
  7. test/fixedbugs/issue4167.go

    package main
    
    type pa []int
    
    type p int
    
    func (this *pa) func1() (v *p, c int) {
    	for _ = range *this {
    		c++
    	}
    	v = (*p)(&c)
    	return
    }
    
    func (this *pa) func2() p {
    	return (*p).func3(this.func1())
    }
    
    func (this *p) func3(f int) p {
    	return *this
    }
    
    func (this *pa) func2dots() p {
    	return (*p).func3(this.func1())
    }
    
    func (this *p) func3dots(f ...int) p {
    	return *this
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 876 bytes
    - Viewed (0)
  8. src/crypto/sha1/sha1block_386.s

    	ADDL	DI, e
    
    #define FUNC1(a, b, c, d, e) \
    	MOVL	d, DI; \
    	XORL	c, DI; \
    	ANDL	b, DI; \
    	XORL	d, DI
    
    #define FUNC2(a, b, c, d, e) \
    	MOVL	b, DI; \
    	XORL	c, DI; \
    	XORL	d, DI
    
    #define FUNC3(a, b, c, d, e) \
    	MOVL	b, SI; \
    	ORL	c, SI; \
    	ANDL	d, SI; \
    	MOVL	b, DI; \
    	ANDL	c, DI; \
    	ORL	SI, DI
    
    #define FUNC4 FUNC2
    
    #define MIX(a, b, c, d, e, const) \
    	ROLL	$30, b; \
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:29:44 UTC 2024
    - 6K bytes
    - Viewed (0)
  9. test/newinline.go

    		return x + z
    	}
    	bar := func(x int) int { // ERROR "func literal does not escape" "can inline r.func2"
    		return x + func(y int) int { // ERROR "can inline r.func2.1" "can inline r.r.func2.func3"
    			return 2*y + x*z
    		}(x) // ERROR "inlining call to r.func2.1"
    	}
    	return foo(42) + bar(42) // ERROR "inlining call to r.func1" "inlining call to r.func2" "inlining call to r.r.func2.func3"
    }
    
    func s0(x int) int { // ERROR "can inline s0"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 16 20:15:25 UTC 2023
    - 11.2K bytes
    - Viewed (0)
  10. src/runtime/example_test.go

    			if !more {
    				break
    			}
    		}
    	}
    
    	b := func() { c() }
    	a := func() { b() }
    
    	a()
    	// Output:
    	// - more:true | runtime.Callers
    	// - more:true | runtime_test.ExampleFrames.func1
    	// - more:true | runtime_test.ExampleFrames.func2
    	// - more:true | runtime_test.ExampleFrames.func3
    	// - more:true | runtime_test.ExampleFrames
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 18 22:05:09 UTC 2021
    - 1.5K bytes
    - Viewed (0)
Back to top