Commit ffe7fbf3 authored by David Chase's avatar David Chase

cmd/internal/gc: convert some comment text from C to Go syntax

Change-Id: Icbc42bcff5a3eabe9f43cff7fcc126141e209ded
Reviewed-on: https://go-review.googlesource.com/8203Reviewed-by: default avatarJosh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 22701339
...@@ -549,9 +549,9 @@ func walkexpr(np **Node, init **NodeList) { ...@@ -549,9 +549,9 @@ func walkexpr(np **Node, init **NodeList) {
OOROR: OOROR:
walkexpr(&n.Left, init) walkexpr(&n.Left, init)
// cannot put side effects from n->right on init, // cannot put side effects from n.Right on init,
// because they cannot run before n->left is checked. // because they cannot run before n.Left is checked.
// save elsewhere and store on the eventual n->right. // save elsewhere and store on the eventual n.Right.
var ll *NodeList var ll *NodeList
walkexpr(&n.Right, &ll) walkexpr(&n.Right, &ll)
...@@ -680,7 +680,7 @@ func walkexpr(np **Node, init **NodeList) { ...@@ -680,7 +680,7 @@ func walkexpr(np **Node, init **NodeList) {
break break
} }
// x = i.(T); n->left is x, n->right->left is i. // x = i.(T); n.Left is x, n.Right.Left is i.
// orderstmt made sure x is addressable. // orderstmt made sure x is addressable.
walkexpr(&n.Right.Left, init) walkexpr(&n.Right.Left, init)
...@@ -700,7 +700,7 @@ func walkexpr(np **Node, init **NodeList) { ...@@ -700,7 +700,7 @@ func walkexpr(np **Node, init **NodeList) {
goto ret goto ret
case ORECV: case ORECV:
// x = <-c; n->left is x, n->right->left is c. // x = <-c; n.Left is x, n.Right.Left is c.
// orderstmt made sure x is addressable. // orderstmt made sure x is addressable.
walkexpr(&n.Right.Left, init) walkexpr(&n.Right.Left, init)
...@@ -1030,7 +1030,7 @@ func walkexpr(np **Node, init **NodeList) { ...@@ -1030,7 +1030,7 @@ func walkexpr(np **Node, init **NodeList) {
ll = list(ll, n.Left) ll = list(ll, n.Left)
} else { } else {
// regular types are passed by reference to avoid C vararg calls // regular types are passed by reference to avoid C vararg calls
// orderexpr arranged for n->left to be a temporary for all // orderexpr arranged for n.Left to be a temporary for all
// the conversions it could see. comparison of an interface // the conversions it could see. comparison of an interface
// with a non-interface, especially in a switch on interface value // with a non-interface, especially in a switch on interface value
// with non-interface cases, is not visible to orderstmt, so we // with non-interface cases, is not visible to orderstmt, so we
...@@ -1296,7 +1296,7 @@ func walkexpr(np **Node, init **NodeList) { ...@@ -1296,7 +1296,7 @@ func walkexpr(np **Node, init **NodeList) {
n.Right.Left = safeexpr(n.Right.Left, init) n.Right.Left = safeexpr(n.Right.Left, init)
walkexpr(&n.Right.Right, init) walkexpr(&n.Right.Right, init)
n.Right.Right = safeexpr(n.Right.Right, init) n.Right.Right = safeexpr(n.Right.Right, init)
n = sliceany(n, init) // chops n->right, sets n->list n = sliceany(n, init) // chops n.Right, sets n.List
goto ret goto ret
case OSLICE3, case OSLICE3,
...@@ -1320,7 +1320,7 @@ func walkexpr(np **Node, init **NodeList) { ...@@ -1320,7 +1320,7 @@ func walkexpr(np **Node, init **NodeList) {
n.Right.Right.Left = safeexpr(n.Right.Right.Left, init) n.Right.Right.Left = safeexpr(n.Right.Right.Left, init)
walkexpr(&n.Right.Right.Right, init) walkexpr(&n.Right.Right.Right, init)
n.Right.Right.Right = safeexpr(n.Right.Right.Right, init) n.Right.Right.Right = safeexpr(n.Right.Right.Right, init)
n = sliceany(n, init) // chops n->right, sets n->list n = sliceany(n, init) // chops n.Right, sets n.List
goto ret goto ret
case OADDR: case OADDR:
...@@ -1479,7 +1479,7 @@ func walkexpr(np **Node, init **NodeList) { ...@@ -1479,7 +1479,7 @@ func walkexpr(np **Node, init **NodeList) {
typecheck(&a, Etop) typecheck(&a, Etop)
*init = list(*init, a) *init = list(*init, a)
r := Nod(OSLICE, var_, Nod(OKEY, nil, l)) // arr[:l] r := Nod(OSLICE, var_, Nod(OKEY, nil, l)) // arr[:l]
r = conv(r, n.Type) // in case n->type is named. r = conv(r, n.Type) // in case n.Type is named.
typecheck(&r, Erv) typecheck(&r, Erv)
walkexpr(&r, init) walkexpr(&r, init)
n = r n = r
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment