...

Text file src/cmd/compile/internal/ssa/testdata/hist.gdb-dbg.nexts

Documentation: cmd/compile/internal/ssa/testdata

     1  src/cmd/compile/internal/ssa/testdata/hist.go
     255:	func test() {
     357:		l := line{point{1 + zero, 2 + zero}, point{3 + zero, 4 + zero}}
     458:		tinycall()                // this forces l etc to stack
     559:		dx := l.end.x - l.begin.x //gdb-dbg=(l.begin.x,l.end.y)//gdb-opt=(l,dx/O,dy/O)
     6l.begin.x = 1
     7l.end.y = 4
     860:		dy := l.end.y - l.begin.y //gdb-opt=(dx,dy/O)
     961:		sink = dx + dy            //gdb-opt=(dx,dy)
    1063:		hist := make([]int, 7)                                //gdb-opt=(dx/O,dy/O) // TODO sink is missing if this code is in 'test' instead of 'main'
    1164:		var reader io.Reader = strings.NewReader(cannedInput) //gdb-dbg=(hist/A) // TODO cannedInput/A is missing if this code is in 'test' instead of 'main'
    12hist = {array = <A>, len = 7, cap = 7}
    1365:		if len(os.Args) > 1 {
    1473:		scanner := bufio.NewScanner(reader)
    1574:		for scanner.Scan() { //gdb-opt=(scanner/A)
    1675:			s := scanner.Text()
    1776:			i, err := strconv.ParseInt(s, 10, 64)
    1877:			if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
    19i = 1
    2081:			hist = ensure(int(i), hist)
    2182:			hist[int(i)]++
    2274:		for scanner.Scan() { //gdb-opt=(scanner/A)
    2375:			s := scanner.Text()
    2476:			i, err := strconv.ParseInt(s, 10, 64)
    2577:			if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
    26i = 1
    2781:			hist = ensure(int(i), hist)
    2882:			hist[int(i)]++
    2974:		for scanner.Scan() { //gdb-opt=(scanner/A)
    3075:			s := scanner.Text()
    3176:			i, err := strconv.ParseInt(s, 10, 64)
    3277:			if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
    33i = 1
    3481:			hist = ensure(int(i), hist)
    3582:			hist[int(i)]++
    3674:		for scanner.Scan() { //gdb-opt=(scanner/A)
    3775:			s := scanner.Text()
    3876:			i, err := strconv.ParseInt(s, 10, 64)
    3977:			if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
    40i = 2
    4181:			hist = ensure(int(i), hist)
    4282:			hist[int(i)]++
    4374:		for scanner.Scan() { //gdb-opt=(scanner/A)
    4475:			s := scanner.Text()
    4576:			i, err := strconv.ParseInt(s, 10, 64)
    4677:			if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
    47i = 2
    4881:			hist = ensure(int(i), hist)
    4982:			hist[int(i)]++
    5074:		for scanner.Scan() { //gdb-opt=(scanner/A)
    5175:			s := scanner.Text()
    5276:			i, err := strconv.ParseInt(s, 10, 64)
    5377:			if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
    54i = 2
    5581:			hist = ensure(int(i), hist)
    5682:			hist[int(i)]++
    5774:		for scanner.Scan() { //gdb-opt=(scanner/A)
    5875:			s := scanner.Text()
    5976:			i, err := strconv.ParseInt(s, 10, 64)
    6077:			if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
    61i = 4
    6281:			hist = ensure(int(i), hist)
    6382:			hist[int(i)]++
    6474:		for scanner.Scan() { //gdb-opt=(scanner/A)
    6575:			s := scanner.Text()
    6676:			i, err := strconv.ParseInt(s, 10, 64)
    6777:			if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
    68i = 4
    6981:			hist = ensure(int(i), hist)
    7082:			hist[int(i)]++
    7174:		for scanner.Scan() { //gdb-opt=(scanner/A)
    7275:			s := scanner.Text()
    7376:			i, err := strconv.ParseInt(s, 10, 64)
    7477:			if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
    75i = 5
    7681:			hist = ensure(int(i), hist)
    7782:			hist[int(i)]++
    7874:		for scanner.Scan() { //gdb-opt=(scanner/A)
    7984:		t := 0
    8085:		n := 0
    8186:		for i, a := range hist {
    8287:			if a == 0 { //gdb-opt=(a,n,t)
    8388:				continue
    8486:		for i, a := range hist {
    8587:			if a == 0 { //gdb-opt=(a,n,t)
    8690:			t += i * a
    8791:			n += a
    8892:			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)
    89n = 3
    90i = 1
    91t = 3
    9286:		for i, a := range hist {
    9387:			if a == 0 { //gdb-opt=(a,n,t)
    9490:			t += i * a
    9591:			n += a
    9692:			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)
    97n = 6
    98i = 2
    99t = 9
   10086:		for i, a := range hist {
   10187:			if a == 0 { //gdb-opt=(a,n,t)
   10288:				continue
   10386:		for i, a := range hist {
   10487:			if a == 0 { //gdb-opt=(a,n,t)
   10590:			t += i * a
   10691:			n += a
   10792:			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)
   108n = 8
   109i = 4
   110t = 17
   11186:		for i, a := range hist {
   11287:			if a == 0 { //gdb-opt=(a,n,t)
   11390:			t += i * a
   11491:			n += a
   11592:			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)
   116n = 9
   117i = 5
   118t = 22
   11986:		for i, a := range hist {
   12087:			if a == 0 { //gdb-opt=(a,n,t)
   12188:				continue
   12286:		for i, a := range hist {
   12399:	}

View as plain text