]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: fix misaligned comments
authorAlberto Donizetti <alb.donizetti@gmail.com>
Sat, 24 Sep 2016 19:38:58 +0000 (21:38 +0200)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 27 Sep 2016 14:00:39 +0000 (14:00 +0000)
Realign multi-line comments that got misaligned by the c->go
conversion.

Change-Id: I584b902e95cf588aa14febf1e0b6dfa499c303c2
Reviewed-on: https://go-review.googlesource.com/29871
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/compile/internal/gc/const.go
src/cmd/compile/internal/gc/esc.go
src/cmd/compile/internal/gc/inl.go
src/cmd/compile/internal/gc/order.go
src/cmd/compile/internal/gc/racewalk.go
src/cmd/compile/internal/gc/select.go
src/cmd/compile/internal/gc/typecheck.go
src/cmd/compile/internal/gc/walk.go
src/cmd/internal/obj/arm/asm5.go
src/cmd/link/internal/arm/asm.go

index 68606568706bc74e6f89cdfe75a416d1924702d1..39c662ffc8efd40b6111ec55d76c75d0fb68c049 100644 (file)
@@ -335,7 +335,7 @@ func convlit1(n *Node, t *Type, explicit bool, reuse canReuseNode) *Node {
                        TUNSAFEPTR:
                        break
 
-                       // A nil literal may be converted to uintptr
+               // A nil literal may be converted to uintptr
                // if it is an unsafe.Pointer
                case TUINTPTR:
                        if n.Type.Etype == TUNSAFEPTR {
@@ -851,7 +851,7 @@ func evconst(n *Node) {
                        goto illegal
                }
 
-               // right must be unsigned.
+       // right must be unsigned.
        // left can be ideal.
        case OLSH, ORSH:
                nr = defaultlit(nr, Types[TUINT])
@@ -994,7 +994,7 @@ func evconst(n *Node) {
 
                v.U.(*Mpflt).Quo(rv.U.(*Mpflt))
 
-               // The default case above would print 'ideal % ideal',
+       // The default case above would print 'ideal % ideal',
        // which is not quite an ideal error.
        case OMOD_ | CTFLT_:
                if n.Diag == 0 {
index 4857eb0d21d85c636fe953cc877089b01ee21e87..6c377ea9cb21cdefbaab2786731d91430452116d 100644 (file)
@@ -716,7 +716,7 @@ func esc(e *EscState, n *Node, up *Node) {
                        }
                }
 
-               // Filter out the following special case.
+       // Filter out the following special case.
        //
        //      func (b *Buffer) Foo() {
        //              n, m := ...
@@ -952,7 +952,7 @@ func esc(e *EscState, n *Node, up *Node) {
                                        nE.Escloopdepth = leftE.Escloopdepth
                                }
 
-                               // PPARAM is loop depth 1 always.
+                       // PPARAM is loop depth 1 always.
                        // PPARAMOUT is loop depth 0 for writes
                        // but considered loop depth 1 for address-of,
                        // so that writing the address of one result
@@ -1148,7 +1148,7 @@ func escassign(e *EscState, dst, src *Node, step *EscStep) {
                        escflows(e, dst, src, e.stepAssign(step, originalDst, src, dstwhy))
                }
 
-               // Might be pointer arithmetic, in which case
+       // Might be pointer arithmetic, in which case
        // the operands flow into the result.
        // TODO(rsc): Decide what the story is here. This is unsettling.
        case OADD,
index 6687b1ad32de5a008234dae40b946e44e65c7f85..9a8dede50d6c5cabab64cd89a3a8b50684b5a5f0 100644 (file)
@@ -369,7 +369,7 @@ func inlnode(n *Node) *Node {
                }
                fallthrough
 
-               // TODO do them here (or earlier),
+       // TODO do them here (or earlier),
        // so escape analysis can avoid more heapmoves.
        case OCLOSURE:
                return n
@@ -407,7 +407,7 @@ func inlnode(n *Node) *Node {
                        }
                }
 
-               // if we just replaced arg in f(arg()) or return arg with an inlined call
+       // if we just replaced arg in f(arg()) or return arg with an inlined call
        // and arg returns multiple values, glue as list
        case ORETURN,
                OCALLFUNC,
index d09983356ca11d8c28561673b9b18c725ed1317d..4f34049d6a3d8b61dbe5d2a65ec250f2882e33c1 100644 (file)
@@ -538,7 +538,7 @@ func orderstmt(n *Node, order *Order) {
                ordermapassign(n, order)
                cleantemp(t, order)
 
-               // Special: make sure key is addressable,
+       // Special: make sure key is addressable,
        // and make sure OINDEXMAP is not copied out.
        case OAS2MAPR:
                t := marktemp(order)
@@ -556,7 +556,7 @@ func orderstmt(n *Node, order *Order) {
                ordermapassign(n, order)
                cleantemp(t, order)
 
-               // Special: avoid copy of func call n->rlist->n.
+       // Special: avoid copy of func call n->rlist->n.
        case OAS2FUNC:
                t := marktemp(order)
 
@@ -565,7 +565,7 @@ func orderstmt(n *Node, order *Order) {
                ordermapassign(n, order)
                cleantemp(t, order)
 
-               // Special: use temporary variables to hold result,
+       // Special: use temporary variables to hold result,
        // so that assertI2Tetc can take address of temporary.
        // No temporary for blank assignment.
        case OAS2DOTTYPE:
@@ -600,7 +600,7 @@ func orderstmt(n *Node, order *Order) {
 
                cleantemp(t, order)
 
-               // Special: use temporary variables to hold result,
+       // Special: use temporary variables to hold result,
        // so that chanrecv can take address of temporary.
        case OAS2RECV:
                t := marktemp(order)
@@ -620,11 +620,11 @@ func orderstmt(n *Node, order *Order) {
                n.List.Set([]*Node{tmp1, tmp2})
                cleantemp(t, order)
 
-               // Special: does not save n onto out.
+       // Special: does not save n onto out.
        case OBLOCK, OEMPTY:
                orderstmtlist(n.List, order)
 
-               // Special: n->left is not an expression; save as is.
+       // Special: n->left is not an expression; save as is.
        case OBREAK,
                OCONTINUE,
                ODCL,
@@ -637,7 +637,7 @@ func orderstmt(n *Node, order *Order) {
                ORETJMP:
                order.out = append(order.out, n)
 
-               // Special: handle call arguments.
+       // Special: handle call arguments.
        case OCALLFUNC, OCALLINTER, OCALLMETH:
                t := marktemp(order)
 
@@ -645,7 +645,7 @@ func orderstmt(n *Node, order *Order) {
                order.out = append(order.out, n)
                cleantemp(t, order)
 
-               // Special: order arguments to inner call but not call itself.
+       // Special: order arguments to inner call but not call itself.
        case ODEFER, OPROC:
                t := marktemp(order)
 
@@ -676,7 +676,7 @@ func orderstmt(n *Node, order *Order) {
                order.out = append(order.out, n)
                cleantemp(t, order)
 
-               // Clean temporaries from condition evaluation at
+       // Clean temporaries from condition evaluation at
        // beginning of loop body and after for statement.
        case OFOR:
                t := marktemp(order)
@@ -690,7 +690,7 @@ func orderstmt(n *Node, order *Order) {
                order.out = append(order.out, n)
                cleantemp(t, order)
 
-               // Clean temporaries from condition at
+       // Clean temporaries from condition at
        // beginning of both branches.
        case OIF:
                t := marktemp(order)
@@ -707,7 +707,7 @@ func orderstmt(n *Node, order *Order) {
                n.Rlist.Set(orderblock(n.Rlist))
                order.out = append(order.out, n)
 
-               // Special: argument will be converted to interface using convT2E
+       // Special: argument will be converted to interface using convT2E
        // so make sure it is an addressable temporary.
        case OPANIC:
                t := marktemp(order)
@@ -932,7 +932,7 @@ func orderstmt(n *Node, order *Order) {
                order.out = append(order.out, n)
                poptemp(t, order)
 
-               // Special: value being sent is passed as a pointer; make it addressable.
+       // Special: value being sent is passed as a pointer; make it addressable.
        case OSEND:
                t := marktemp(order)
 
@@ -942,7 +942,7 @@ func orderstmt(n *Node, order *Order) {
                order.out = append(order.out, n)
                cleantemp(t, order)
 
-               // TODO(rsc): Clean temporaries more aggressively.
+       // TODO(rsc): Clean temporaries more aggressively.
        // Note that because walkswitch will rewrite some of the
        // switch into a binary search, this is not as easy as it looks.
        // (If we ran that code here we could invoke orderstmt on
@@ -1010,7 +1010,7 @@ func orderexpr(n *Node, order *Order, lhs *Node) *Node {
                orderexprlist(n.List, order)
                orderexprlist(n.Rlist, order)
 
-               // Addition of strings turns into a function call.
+       // Addition of strings turns into a function call.
        // Allocate a temporary to hold the strings.
        // Fewer than 5 strings use direct runtime helpers.
        case OADDSTR:
@@ -1085,7 +1085,7 @@ func orderexpr(n *Node, order *Order, lhs *Node) *Node {
                        n = ordercopyexpr(n, n.Type, order, 0)
                }
 
-               // concrete type (not interface) argument must be addressable
+       // concrete type (not interface) argument must be addressable
        // temporary to pass to runtime.
        case OCONVIFACE:
                n.Left = orderexpr(n.Left, order, nil)
index 404088e9426eaf3469d089668baef25cab2b45f6..b47ac9d1e0a259b3aae61749e6a3abd9afae1bcf 100644 (file)
@@ -188,7 +188,7 @@ func instrumentnode(np **Node, init *Nodes, wr int, skip int) {
                instrumentnode(&n.Left, init, 0, 0)
                goto ret
 
-               // Instrument dst argument of runtime.writebarrier* calls
+       // Instrument dst argument of runtime.writebarrier* calls
        // as we do not instrument runtime code.
        // typedslicecopy is instrumented in runtime.
        case OCALLFUNC:
index 1e9d0f3e0a8aa8711b75ad04a937435c7a7db944..d999190ad1fec39524c2c4a7912fa5067a242924 100644 (file)
@@ -40,7 +40,7 @@ func typecheckselect(sel *Node) {
                        default:
                                yyerror("select case must be receive, send or assign recv")
 
-                               // convert x = <-c into OSELRECV(x, <-c).
+                       // convert x = <-c into OSELRECV(x, <-c).
                        // remove implicit conversions; the eventual assignment
                        // will reintroduce them.
                        case OAS:
index 66ebaa05867e3fd8a9a2e68db452159ae27d2cae..3ad869f98b57c7777ad2e83516871737b59d8144 100644 (file)
@@ -1705,7 +1705,7 @@ OpSwitch:
                                n.SetVal(n.Left.Val())
                        }
 
-                       // do not use stringtoarraylit.
+               // do not use stringtoarraylit.
                // generated code and compiler memory footprint is better without it.
                case OSTRARRAYBYTE:
                        break
index dc0b0fb00de8bb1c25133abf78e8e3121ac2499a..e385d3e3c8bbc51ac7511fb231df08d84576f428 100644 (file)
@@ -826,7 +826,7 @@ opswitch:
                }
                n = liststmt(append([]*Node{r}, ll...))
 
-               // x, y = <-c
+       // x, y = <-c
        // orderstmt made sure x is addressable.
        case OAS2RECV:
                init.AppendNodes(&n.Ninit)
@@ -2654,7 +2654,7 @@ func vmatch1(l *Node, r *Node) bool {
                case PPARAM, PAUTO:
                        break
 
-                       // assignment to non-stack variable
+               // assignment to non-stack variable
                // must be delayed if right has function calls.
                default:
                        if r.Ullman >= UINF {
index be88a8753096daedd200fb24d8ebe06e39762d73..70860231a3edf51fa3ede993e5b237cab0c6879b 100644 (file)
@@ -2359,7 +2359,7 @@ func asmout(ctxt *obj.Link, p *obj.Prog, o *Optab, out []uint32) {
                        o1 |= uint32(p.From.Offset & 0xfff)
                }
 
-               // This is supposed to be something that stops execution.
+       // This is supposed to be something that stops execution.
        // It's not supposed to be reached, ever, but if it is, we'd
        // like to be able to tell how we got there. Assemble as
        // 0xf7fabcfd which is guaranteed to raise undefined instruction
@@ -2388,7 +2388,7 @@ func asmout(ctxt *obj.Link, p *obj.Prog, o *Optab, out []uint32) {
                o1 |= (uint32(p.Reg) & 15) << 0
                o1 |= uint32((p.To.Offset & 15) << 16)
 
-               // DATABUNDLE: BKPT $0x5be0, signify the start of NaCl data bundle;
+       // DATABUNDLE: BKPT $0x5be0, signify the start of NaCl data bundle;
        // DATABUNDLEEND: zero width alignment marker
        case 100:
                if p.As == ADATABUNDLE {
index f375eb7a16eddbc8da276c0c1f7eddd8f1fd16ca..7163af2382d601051a2ac62cd3694620c0245c8b 100644 (file)
@@ -460,7 +460,7 @@ func archreloc(ctxt *ld.Link, r *ld.Reloc, s *ld.Symbol, val *int64) int {
                *val = ld.Symaddr(r.Sym) + r.Add - ld.Symaddr(ctxt.Syms.Lookup(".got", 0))
                return 0
 
-               // The following three arch specific relocations are only for generation of
+       // The following three arch specific relocations are only for generation of
        // Linux/ARM ELF's PLT entry (3 assembler instruction)
        case obj.R_PLT0: // add ip, pc, #0xXX00000
                if ld.Symaddr(ctxt.Syms.Lookup(".got.plt", 0)) < ld.Symaddr(ctxt.Syms.Lookup(".plt", 0)) {