mirror of
https://github.com/golang/go
synced 2024-11-23 15:30:05 -07:00
cmd/compile/internal: decouple scope tracking from location lists
We're trying to enable location lists by default, and it's easier to do that if we don't have to worry about scope tracking at the same time. We can evaluate their performance impact separately. However, that does mean that "err" is ambiguous in the test case, so rename it to err2 for now. Change-Id: I24f119016185c52b7d9affc74207f6a5b450fb6f Reviewed-on: https://go-review.googlesource.com/89355 Run-TryBot: Heschi Kreinick <heschi@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
parent
07751f4b58
commit
7d7af6106f
@ -405,7 +405,7 @@ func Main(archInit func(*Arch)) {
|
||||
Debug['l'] = 1 - Debug['l']
|
||||
}
|
||||
|
||||
trackScopes = flagDWARF && ((Debug['l'] == 0 && Debug['N'] != 0) || Ctxt.Flag_locationlists)
|
||||
trackScopes = flagDWARF && (Debug['l'] == 0 && Debug['N'] != 0)
|
||||
|
||||
Widthptr = thearch.LinkArch.PtrSize
|
||||
Widthreg = thearch.LinkArch.RegSize
|
||||
|
@ -14,64 +14,64 @@ hist = []int = {0, 0, 0, 0, 0, 0, 0}
|
||||
73: scanner := bufio.NewScanner(reader)
|
||||
74: for scanner.Scan() { //gdb-opt=(scanner/A)
|
||||
75: s := scanner.Text()
|
||||
76: i, err := strconv.ParseInt(s, 10, 64)
|
||||
77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
|
||||
76: i, err2 := strconv.ParseInt(s, 10, 64)
|
||||
77: if err2 != nil { //gdb-dbg=(i) //gdb-opt=(err2,hist,i)
|
||||
i = 1
|
||||
81: hist = ensure(int(i), hist)
|
||||
82: hist[int(i)]++
|
||||
74: for scanner.Scan() { //gdb-opt=(scanner/A)
|
||||
75: s := scanner.Text()
|
||||
76: i, err := strconv.ParseInt(s, 10, 64)
|
||||
77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
|
||||
76: i, err2 := strconv.ParseInt(s, 10, 64)
|
||||
77: if err2 != nil { //gdb-dbg=(i) //gdb-opt=(err2,hist,i)
|
||||
i = 1
|
||||
81: hist = ensure(int(i), hist)
|
||||
82: hist[int(i)]++
|
||||
74: for scanner.Scan() { //gdb-opt=(scanner/A)
|
||||
75: s := scanner.Text()
|
||||
76: i, err := strconv.ParseInt(s, 10, 64)
|
||||
77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
|
||||
76: i, err2 := strconv.ParseInt(s, 10, 64)
|
||||
77: if err2 != nil { //gdb-dbg=(i) //gdb-opt=(err2,hist,i)
|
||||
i = 1
|
||||
81: hist = ensure(int(i), hist)
|
||||
82: hist[int(i)]++
|
||||
74: for scanner.Scan() { //gdb-opt=(scanner/A)
|
||||
75: s := scanner.Text()
|
||||
76: i, err := strconv.ParseInt(s, 10, 64)
|
||||
77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
|
||||
76: i, err2 := strconv.ParseInt(s, 10, 64)
|
||||
77: if err2 != nil { //gdb-dbg=(i) //gdb-opt=(err2,hist,i)
|
||||
i = 2
|
||||
81: hist = ensure(int(i), hist)
|
||||
82: hist[int(i)]++
|
||||
74: for scanner.Scan() { //gdb-opt=(scanner/A)
|
||||
75: s := scanner.Text()
|
||||
76: i, err := strconv.ParseInt(s, 10, 64)
|
||||
77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
|
||||
76: i, err2 := strconv.ParseInt(s, 10, 64)
|
||||
77: if err2 != nil { //gdb-dbg=(i) //gdb-opt=(err2,hist,i)
|
||||
i = 2
|
||||
81: hist = ensure(int(i), hist)
|
||||
82: hist[int(i)]++
|
||||
74: for scanner.Scan() { //gdb-opt=(scanner/A)
|
||||
75: s := scanner.Text()
|
||||
76: i, err := strconv.ParseInt(s, 10, 64)
|
||||
77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
|
||||
76: i, err2 := strconv.ParseInt(s, 10, 64)
|
||||
77: if err2 != nil { //gdb-dbg=(i) //gdb-opt=(err2,hist,i)
|
||||
i = 2
|
||||
81: hist = ensure(int(i), hist)
|
||||
82: hist[int(i)]++
|
||||
74: for scanner.Scan() { //gdb-opt=(scanner/A)
|
||||
75: s := scanner.Text()
|
||||
76: i, err := strconv.ParseInt(s, 10, 64)
|
||||
77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
|
||||
76: i, err2 := strconv.ParseInt(s, 10, 64)
|
||||
77: if err2 != nil { //gdb-dbg=(i) //gdb-opt=(err2,hist,i)
|
||||
i = 4
|
||||
81: hist = ensure(int(i), hist)
|
||||
82: hist[int(i)]++
|
||||
74: for scanner.Scan() { //gdb-opt=(scanner/A)
|
||||
75: s := scanner.Text()
|
||||
76: i, err := strconv.ParseInt(s, 10, 64)
|
||||
77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
|
||||
76: i, err2 := strconv.ParseInt(s, 10, 64)
|
||||
77: if err2 != nil { //gdb-dbg=(i) //gdb-opt=(err2,hist,i)
|
||||
i = 4
|
||||
81: hist = ensure(int(i), hist)
|
||||
82: hist[int(i)]++
|
||||
74: for scanner.Scan() { //gdb-opt=(scanner/A)
|
||||
75: s := scanner.Text()
|
||||
76: i, err := strconv.ParseInt(s, 10, 64)
|
||||
77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
|
||||
76: i, err2 := strconv.ParseInt(s, 10, 64)
|
||||
77: if err2 != nil { //gdb-dbg=(i) //gdb-opt=(err2,hist,i)
|
||||
i = 5
|
||||
81: hist = ensure(int(i), hist)
|
||||
82: hist[int(i)]++
|
||||
|
@ -22,9 +22,9 @@ dy = <Optimized out, as expected>
|
||||
74: for scanner.Scan() { //gdb-opt=(scanner/A)
|
||||
scanner = (struct bufio.Scanner *) <A>
|
||||
75: s := scanner.Text()
|
||||
76: i, err := strconv.ParseInt(s, 10, 64)
|
||||
77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
|
||||
err = {tab = 0x0, data = 0x0}
|
||||
76: i, err2 := strconv.ParseInt(s, 10, 64)
|
||||
77: if err2 != nil { //gdb-dbg=(i) //gdb-opt=(err2,hist,i)
|
||||
err2 = {tab = 0x0, data = 0x0}
|
||||
hist = []int = {0, 0, 0, 0, 0, 0, 0}
|
||||
i = 1
|
||||
81: hist = ensure(int(i), hist)
|
||||
@ -32,9 +32,9 @@ i = 1
|
||||
74: for scanner.Scan() { //gdb-opt=(scanner/A)
|
||||
scanner = (struct bufio.Scanner *) <A>
|
||||
75: s := scanner.Text()
|
||||
76: i, err := strconv.ParseInt(s, 10, 64)
|
||||
77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
|
||||
err = {tab = 0x0, data = 0x0}
|
||||
76: i, err2 := strconv.ParseInt(s, 10, 64)
|
||||
77: if err2 != nil { //gdb-dbg=(i) //gdb-opt=(err2,hist,i)
|
||||
err2 = {tab = 0x0, data = 0x0}
|
||||
hist = []int = {0, 1, 0, 0, 0, 0, 0}
|
||||
i = 1
|
||||
81: hist = ensure(int(i), hist)
|
||||
@ -42,9 +42,9 @@ i = 1
|
||||
74: for scanner.Scan() { //gdb-opt=(scanner/A)
|
||||
scanner = (struct bufio.Scanner *) <A>
|
||||
75: s := scanner.Text()
|
||||
76: i, err := strconv.ParseInt(s, 10, 64)
|
||||
77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
|
||||
err = {tab = 0x0, data = 0x0}
|
||||
76: i, err2 := strconv.ParseInt(s, 10, 64)
|
||||
77: if err2 != nil { //gdb-dbg=(i) //gdb-opt=(err2,hist,i)
|
||||
err2 = {tab = 0x0, data = 0x0}
|
||||
hist = []int = {0, 2, 0, 0, 0, 0, 0}
|
||||
i = 1
|
||||
81: hist = ensure(int(i), hist)
|
||||
@ -52,9 +52,9 @@ i = 1
|
||||
74: for scanner.Scan() { //gdb-opt=(scanner/A)
|
||||
scanner = (struct bufio.Scanner *) <A>
|
||||
75: s := scanner.Text()
|
||||
76: i, err := strconv.ParseInt(s, 10, 64)
|
||||
77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
|
||||
err = {tab = 0x0, data = 0x0}
|
||||
76: i, err2 := strconv.ParseInt(s, 10, 64)
|
||||
77: if err2 != nil { //gdb-dbg=(i) //gdb-opt=(err2,hist,i)
|
||||
err2 = {tab = 0x0, data = 0x0}
|
||||
hist = []int = {0, 3, 0, 0, 0, 0, 0}
|
||||
i = 2
|
||||
81: hist = ensure(int(i), hist)
|
||||
@ -62,9 +62,9 @@ i = 2
|
||||
74: for scanner.Scan() { //gdb-opt=(scanner/A)
|
||||
scanner = (struct bufio.Scanner *) <A>
|
||||
75: s := scanner.Text()
|
||||
76: i, err := strconv.ParseInt(s, 10, 64)
|
||||
77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
|
||||
err = {tab = 0x0, data = 0x0}
|
||||
76: i, err2 := strconv.ParseInt(s, 10, 64)
|
||||
77: if err2 != nil { //gdb-dbg=(i) //gdb-opt=(err2,hist,i)
|
||||
err2 = {tab = 0x0, data = 0x0}
|
||||
hist = []int = {0, 3, 1, 0, 0, 0, 0}
|
||||
i = 2
|
||||
81: hist = ensure(int(i), hist)
|
||||
@ -72,9 +72,9 @@ i = 2
|
||||
74: for scanner.Scan() { //gdb-opt=(scanner/A)
|
||||
scanner = (struct bufio.Scanner *) <A>
|
||||
75: s := scanner.Text()
|
||||
76: i, err := strconv.ParseInt(s, 10, 64)
|
||||
77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
|
||||
err = {tab = 0x0, data = 0x0}
|
||||
76: i, err2 := strconv.ParseInt(s, 10, 64)
|
||||
77: if err2 != nil { //gdb-dbg=(i) //gdb-opt=(err2,hist,i)
|
||||
err2 = {tab = 0x0, data = 0x0}
|
||||
hist = []int = {0, 3, 2, 0, 0, 0, 0}
|
||||
i = 2
|
||||
81: hist = ensure(int(i), hist)
|
||||
@ -82,9 +82,9 @@ i = 2
|
||||
74: for scanner.Scan() { //gdb-opt=(scanner/A)
|
||||
scanner = (struct bufio.Scanner *) <A>
|
||||
75: s := scanner.Text()
|
||||
76: i, err := strconv.ParseInt(s, 10, 64)
|
||||
77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
|
||||
err = {tab = 0x0, data = 0x0}
|
||||
76: i, err2 := strconv.ParseInt(s, 10, 64)
|
||||
77: if err2 != nil { //gdb-dbg=(i) //gdb-opt=(err2,hist,i)
|
||||
err2 = {tab = 0x0, data = 0x0}
|
||||
hist = []int = {0, 3, 3, 0, 0, 0, 0}
|
||||
i = 4
|
||||
81: hist = ensure(int(i), hist)
|
||||
@ -92,9 +92,9 @@ i = 4
|
||||
74: for scanner.Scan() { //gdb-opt=(scanner/A)
|
||||
scanner = (struct bufio.Scanner *) <A>
|
||||
75: s := scanner.Text()
|
||||
76: i, err := strconv.ParseInt(s, 10, 64)
|
||||
77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
|
||||
err = {tab = 0x0, data = 0x0}
|
||||
76: i, err2 := strconv.ParseInt(s, 10, 64)
|
||||
77: if err2 != nil { //gdb-dbg=(i) //gdb-opt=(err2,hist,i)
|
||||
err2 = {tab = 0x0, data = 0x0}
|
||||
hist = []int = {0, 3, 3, 0, 1, 0, 0}
|
||||
i = 4
|
||||
81: hist = ensure(int(i), hist)
|
||||
@ -102,9 +102,9 @@ i = 4
|
||||
74: for scanner.Scan() { //gdb-opt=(scanner/A)
|
||||
scanner = (struct bufio.Scanner *) <A>
|
||||
75: s := scanner.Text()
|
||||
76: i, err := strconv.ParseInt(s, 10, 64)
|
||||
77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
|
||||
err = {tab = 0x0, data = 0x0}
|
||||
76: i, err2 := strconv.ParseInt(s, 10, 64)
|
||||
77: if err2 != nil { //gdb-dbg=(i) //gdb-opt=(err2,hist,i)
|
||||
err2 = {tab = 0x0, data = 0x0}
|
||||
hist = []int = {0, 3, 3, 0, 2, 0, 0}
|
||||
i = 5
|
||||
81: hist = ensure(int(i), hist)
|
||||
|
@ -73,9 +73,9 @@ func test() {
|
||||
scanner := bufio.NewScanner(reader)
|
||||
for scanner.Scan() { //gdb-opt=(scanner/A)
|
||||
s := scanner.Text()
|
||||
i, err := strconv.ParseInt(s, 10, 64)
|
||||
if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
|
||||
fmt.Fprintf(os.Stderr, "There was an error: %v\n", err)
|
||||
i, err2 := strconv.ParseInt(s, 10, 64)
|
||||
if err2 != nil { //gdb-dbg=(i) //gdb-opt=(err2,hist,i)
|
||||
fmt.Fprintf(os.Stderr, "There was an error: %v\n", err2)
|
||||
return
|
||||
}
|
||||
hist = ensure(int(i), hist)
|
||||
|
Loading…
Reference in New Issue
Block a user