github.com/goproxy0/go@v0.0.0-20171111080102-49cc0c489d2c/src/cmd/compile/internal/ssa/testdata/hist.dbg-gdb.nexts (about) 1 src/cmd/compile/internal/ssa/testdata/hist.go 2 55: func main() { 3 57: l := line{point{1 + zero, 2 + zero}, point{3 + zero, 4 + zero}} 4 58: tinycall() // this forces l etc to stack 5 59: dx := l.end.x - l.begin.x //gdb-dbg=(l.begin.x,l.end.y)//gdb-opt=(l,dx/O,dy/O) 6 l.begin.x = 1 7 l.end.y = 4 8 60: dy := l.end.y - l.begin.y //gdb-opt=(dx,dy/O) 9 61: sink = dx + dy //gdb-opt=(dx,dy) 10 63: hist := make([]int, 7) //gdb-opt=(sink,dx/O,dy/O) 11 64: var reader io.Reader = strings.NewReader(cannedInput) //gdb-dbg=(hist/A,cannedInput/A) 12 hist = []int = {0, 0, 0, 0, 0, 0, 0} 13 cannedInput = "1\n1\n1\n2\n2\n2\n4\n4\n5\n" 14 65: if len(os.Args) > 1 { 15 73: scanner := bufio.NewScanner(reader) 16 74: for scanner.Scan() { //gdb-opt=(scanner/A) 17 75: s := scanner.Text() 18 76: i, err := strconv.ParseInt(s, 10, 64) 19 77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i) 20 i = 1 21 81: hist = ensure(int(i), hist) 22 82: hist[int(i)]++ 23 74: for scanner.Scan() { //gdb-opt=(scanner/A) 24 75: s := scanner.Text() 25 76: i, err := strconv.ParseInt(s, 10, 64) 26 77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i) 27 i = 1 28 81: hist = ensure(int(i), hist) 29 82: hist[int(i)]++ 30 74: for scanner.Scan() { //gdb-opt=(scanner/A) 31 75: s := scanner.Text() 32 76: i, err := strconv.ParseInt(s, 10, 64) 33 77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i) 34 i = 1 35 81: hist = ensure(int(i), hist) 36 82: hist[int(i)]++ 37 74: for scanner.Scan() { //gdb-opt=(scanner/A) 38 75: s := scanner.Text() 39 76: i, err := strconv.ParseInt(s, 10, 64) 40 77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i) 41 i = 2 42 81: hist = ensure(int(i), hist) 43 82: hist[int(i)]++ 44 74: for scanner.Scan() { //gdb-opt=(scanner/A) 45 75: s := scanner.Text() 46 76: i, err := strconv.ParseInt(s, 10, 64) 47 77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i) 48 i = 2 49 81: hist = ensure(int(i), hist) 50 82: hist[int(i)]++ 51 74: for scanner.Scan() { //gdb-opt=(scanner/A) 52 75: s := scanner.Text() 53 76: i, err := strconv.ParseInt(s, 10, 64) 54 77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i) 55 i = 2 56 81: hist = ensure(int(i), hist) 57 82: hist[int(i)]++ 58 74: for scanner.Scan() { //gdb-opt=(scanner/A) 59 75: s := scanner.Text() 60 76: i, err := strconv.ParseInt(s, 10, 64) 61 77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i) 62 i = 4 63 81: hist = ensure(int(i), hist) 64 82: hist[int(i)]++ 65 74: for scanner.Scan() { //gdb-opt=(scanner/A) 66 75: s := scanner.Text() 67 76: i, err := strconv.ParseInt(s, 10, 64) 68 77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i) 69 i = 4 70 81: hist = ensure(int(i), hist) 71 82: hist[int(i)]++ 72 74: for scanner.Scan() { //gdb-opt=(scanner/A) 73 75: s := scanner.Text() 74 76: i, err := strconv.ParseInt(s, 10, 64) 75 77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i) 76 i = 5 77 81: hist = ensure(int(i), hist) 78 82: hist[int(i)]++ 79 74: for scanner.Scan() { //gdb-opt=(scanner/A) 80 84: t := 0 81 85: n := 0 82 86: for i, a := range hist { 83 87: if a == 0 { //gdb-opt=(a,n,t) 84 88: continue 85 86: for i, a := range hist { 86 87: if a == 0 { //gdb-opt=(a,n,t) 87 90: t += i * a 88 91: n += a 89 92: fmt.Fprintf(os.Stderr, "%d\t%d\t%d\t%d\t%d\n", i, a, n, i*a, t) //gdb-dbg=(n,i,t) 90 n = 3 91 i = 1 92 t = 3 93 86: for i, a := range hist { 94 87: if a == 0 { //gdb-opt=(a,n,t) 95 90: t += i * a 96 91: n += a 97 92: fmt.Fprintf(os.Stderr, "%d\t%d\t%d\t%d\t%d\n", i, a, n, i*a, t) //gdb-dbg=(n,i,t) 98 n = 6 99 i = 2 100 t = 9 101 86: for i, a := range hist { 102 87: if a == 0 { //gdb-opt=(a,n,t) 103 88: continue 104 86: for i, a := range hist { 105 87: if a == 0 { //gdb-opt=(a,n,t) 106 90: t += i * a 107 91: n += a 108 92: fmt.Fprintf(os.Stderr, "%d\t%d\t%d\t%d\t%d\n", i, a, n, i*a, t) //gdb-dbg=(n,i,t) 109 n = 8 110 i = 4 111 t = 17 112 86: for i, a := range hist { 113 87: if a == 0 { //gdb-opt=(a,n,t) 114 90: t += i * a 115 91: n += a 116 92: fmt.Fprintf(os.Stderr, "%d\t%d\t%d\t%d\t%d\n", i, a, n, i*a, t) //gdb-dbg=(n,i,t) 117 n = 9 118 i = 5 119 t = 22 120 86: for i, a := range hist { 121 87: if a == 0 { //gdb-opt=(a,n,t) 122 88: continue 123 86: for i, a := range hist {