...

Text file src/cmd/compile/internal/ssa/testdata/hist.dlv-opt.nexts

Documentation: cmd/compile/internal/ssa/testdata

     1  ./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)
     660:		dy := l.end.y - l.begin.y //gdb-opt=(dx,dy/O)
     761:		sink = dx + dy            //gdb-opt=(dx,dy)
     863:		hist := make([]int, 7)                                //gdb-opt=(dx/O,dy/O) // TODO sink is missing if this code is in 'test' instead of 'main'
     964:		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'
    1065:		if len(os.Args) > 1 {
    1173:		scanner := bufio.NewScanner(reader)
    1274:		for scanner.Scan() { //gdb-opt=(scanner/A)
    1375:			s := scanner.Text()
    1476:			i, err := strconv.ParseInt(s, 10, 64)
    1577:			if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
    1681:			hist = ensure(int(i), hist)
    1782:			hist[int(i)]++
    1874:		for scanner.Scan() { //gdb-opt=(scanner/A)
    1975:			s := scanner.Text()
    2076:			i, err := strconv.ParseInt(s, 10, 64)
    2177:			if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
    2281:			hist = ensure(int(i), hist)
    2382:			hist[int(i)]++
    2474:		for scanner.Scan() { //gdb-opt=(scanner/A)
    2575:			s := scanner.Text()
    2676:			i, err := strconv.ParseInt(s, 10, 64)
    2777:			if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
    2881:			hist = ensure(int(i), hist)
    2982:			hist[int(i)]++
    3074:		for scanner.Scan() { //gdb-opt=(scanner/A)
    3175:			s := scanner.Text()
    3276:			i, err := strconv.ParseInt(s, 10, 64)
    3377:			if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
    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)
    4081:			hist = ensure(int(i), hist)
    4182:			hist[int(i)]++
    4274:		for scanner.Scan() { //gdb-opt=(scanner/A)
    4375:			s := scanner.Text()
    4476:			i, err := strconv.ParseInt(s, 10, 64)
    4577:			if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
    4681:			hist = ensure(int(i), hist)
    4782:			hist[int(i)]++
    4874:		for scanner.Scan() { //gdb-opt=(scanner/A)
    4975:			s := scanner.Text()
    5076:			i, err := strconv.ParseInt(s, 10, 64)
    5177:			if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
    5281:			hist = ensure(int(i), hist)
    5382:			hist[int(i)]++
    5474:		for scanner.Scan() { //gdb-opt=(scanner/A)
    5575:			s := scanner.Text()
    5676:			i, err := strconv.ParseInt(s, 10, 64)
    5777:			if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
    5881:			hist = ensure(int(i), hist)
    5982:			hist[int(i)]++
    6074:		for scanner.Scan() { //gdb-opt=(scanner/A)
    6175:			s := scanner.Text()
    6276:			i, err := strconv.ParseInt(s, 10, 64)
    6377:			if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
    6481:			hist = ensure(int(i), hist)
    6582:			hist[int(i)]++
    6674:		for scanner.Scan() { //gdb-opt=(scanner/A)
    6786:		for i, a := range hist {
    6887:			if a == 0 { //gdb-opt=(a,n,t)
    6986:		for i, a := range hist {
    7087:			if a == 0 { //gdb-opt=(a,n,t)
    7192:			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)
    7291:			n += a
    7390:			t += i * a
    7486:		for i, a := range hist {
    7587:			if a == 0 { //gdb-opt=(a,n,t)
    7692:			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)
    7791:			n += a
    7890:			t += i * a
    7986:		for i, a := range hist {
    8087:			if a == 0 { //gdb-opt=(a,n,t)
    8186:		for i, a := range hist {
    8287:			if a == 0 { //gdb-opt=(a,n,t)
    8392:			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)
    8491:			n += a
    8590:			t += i * a
    8686:		for i, a := range hist {
    8787:			if a == 0 { //gdb-opt=(a,n,t)
    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)
    8991:			n += a
    9090:			t += i * a
    9186:		for i, a := range hist {
    9287:			if a == 0 { //gdb-opt=(a,n,t)
    9386:		for i, a := range hist {
    9499:	}

View as plain text