Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for SubClosure (0.26 sec)

  1. src/cmd/compile/internal/test/testdata/pgo/devirtualize/devirt_test.go

    	}
    }
    
    func BenchmarkDevirtFuncClosure(b *testing.B) {
    	ExerciseFuncClosure(b.N, AddClosure(), SubClosure(), mult.MultClosure(), mult.NegMultClosure())
    }
    
    func TestDevirtFuncClosure(t *testing.T) {
    	if v := ExerciseFuncClosure(10, AddClosure(), SubClosure(), mult.MultClosure(), mult.NegMultClosure()); v != 1176 {
    		t.Errorf("ExerciseFuncClosure(10) got %d want 1176", v)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 13 18:17:47 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/test/testdata/pgo/devirtualize/devirt.go

    	}
    	return val
    }
    
    //go:noinline
    func AddClosure() AddFunc {
    	// Implicit closure by capturing the receiver.
    	var a Add
    	return a.Add
    }
    
    //go:noinline
    func SubClosure() AddFunc {
    	var s Sub
    	return s.Add
    }
    
    // ExerciseFuncClosure calls mostly a1 and m1.
    //
    // This is a simplified version of ExerciseFuncConcrete, but we need two
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 13 18:17:57 UTC 2023
    - 6.2K bytes
    - Viewed (0)
Back to top