1
2
3
4
5 package dumpscores
6
7 var G int
8
9 func inlinable(x int, f func(int) int) int {
10 if x != 0 {
11 return 1
12 }
13 G += noninl(x)
14 return f(x)
15 }
16
17 func inlinable2(x int) int {
18 return noninl(-x)
19 }
20
21
22 func noninl(x int) int {
23 return x + 1
24 }
25
26 func tooLargeToInline(x int) int {
27 if x > 101 {
28
29
30 return big(big(big(big(big(G + x)))))
31 }
32 if x < 100 {
33
34 G += inlinable(101, inlinable2)
35 if G == 101 {
36 return 0
37 }
38 panic(inlinable2(3))
39 }
40 return G
41 }
42
43 func big(q int) int {
44 return noninl(q) + noninl(-q)
45 }
46
View as plain text