cmd/5l etc: restore comments lost during C -> Go conversion
It appears that c2go dropped comments inside struct { ... } and enum { ... }.
Restore them.
Identified missing comments by checking for comments present
in the C code but not the Go code, made a list, and then reapplied
with some mechanical help.
Missing comment finder: http://play.golang.org/p/g6qNUAo1Y0
Change-Id: I323ab45c7ef9d51e28eab3b699eb14bee1eef66b
Reviewed-on: https://go-review.googlesource.com/6899
Reviewed-by: Rob Pike <r@golang.org>
diff --git a/src/cmd/internal/gc/popt.go b/src/cmd/internal/gc/popt.go
index c56dc8e..813f24a 100644
--- a/src/cmd/internal/gc/popt.go
+++ b/src/cmd/internal/gc/popt.go
@@ -79,16 +79,25 @@
)
type Reg struct {
- set Bits
- use1 Bits
- use2 Bits
+ set Bits // regopt variables written by this instruction.
+ use1 Bits // regopt variables read by prog->from.
+ use2 Bits // regopt variables read by prog->to.
+
+ // refahead/refbehind are the regopt variables whose current
+ // value may be used in the following/preceding instructions
+ // up to a CALL (or the value is clobbered).
refbehind Bits
refahead Bits
+
+ // calahead/calbehind are similar, but for variables in
+ // instructions that are reachable after hitting at least one
+ // CALL.
calbehind Bits
calahead Bits
- regdiff Bits
- act Bits
- regu uint64
+
+ regdiff Bits
+ act Bits
+ regu uint64 // register used bitmap
}
type Rgn struct {
@@ -639,14 +648,14 @@
type TempVar struct {
node *Node
- def *Flow
- use *Flow
- freelink *TempVar
- merge *TempVar
- start int64
- end int64
- addr uint8
- removed uint8
+ def *Flow // definition of temp var
+ use *Flow // use list, chained through Flow.data
+ freelink *TempVar // next free temp in Type.opt list
+ merge *TempVar // merge var with this one
+ start int64 // smallest Prog.pc in live range
+ end int64 // largest Prog.pc in live range
+ addr uint8 // address taken - no accurate end
+ removed uint8 // removed from program
}
type startcmp []*TempVar