1
0
mirror of https://github.com/golang/go synced 2024-11-24 20:20:03 -07:00

all: add space after // in comments

This commit is contained in:
nercoeus 2021-12-03 11:57:32 +08:00
parent 46a08372ad
commit 9e51cef43d
9 changed files with 13 additions and 13 deletions

View File

@ -1660,7 +1660,7 @@ func (p *Package) gccCmd() []string {
}
// disable LTO so we get an object whose symbols we can read
c = append(c, "-fno-lto")
c = append(c, "-") //read input from standard input
c = append(c, "-") // read input from standard input
return c
}

View File

@ -35,7 +35,7 @@ func Set(t *types.Type, off int64, bv bitvec.BitVec) {
if off&int64(types.PtrSize-1) != 0 {
base.Fatalf("typebits.Set: invalid alignment, %v", t)
}
bv.Set(int32(off / int64(types.PtrSize))) //pointer in first slot
bv.Set(int32(off / int64(types.PtrSize))) // pointer in first slot
case types.TINTER:
// struct { Itab *tab; void *data; }

View File

@ -3436,9 +3436,9 @@ func (c *ctxtz) asmout(p *obj.Prog, asm *[]byte) {
case 40: // word/byte
wd := uint32(c.regoff(&p.From))
if p.As == AWORD { //WORD
if p.As == AWORD { // WORD
*asm = append(*asm, uint8(wd>>24), uint8(wd>>16), uint8(wd>>8), uint8(wd))
} else { //BYTE
} else { // BYTE
*asm = append(*asm, uint8(wd))
}
@ -4484,9 +4484,9 @@ func (c *ctxtz) zoprre(a obj.As) uint32 {
return op_CGR
case ACMPU:
return op_CLGR
case AFCMPO: //ordered
case AFCMPO: // ordered
return op_KDBR
case AFCMPU: //unordered
case AFCMPU: // unordered
return op_CDBR
case ACEBR:
return op_CEBR

View File

@ -327,7 +327,7 @@ func preprocess(ctxt *obj.Link, cursym *obj.LSym, newprog obj.ProgAlloc) {
p, pPreempt, pCheck = c.stacksplitPre(p, autosize) // emit pre part of split check
pPre = p
p = c.ctxt.EndUnsafePoint(p, c.newprog, -1)
wasSplit = true //need post part of split
wasSplit = true // need post part of split
}
if autosize != 0 {

View File

@ -5279,7 +5279,7 @@ bad:
if ctxt.Arch.Family == sys.I386 {
breg := byteswapreg(ctxt, &p.From)
if breg != REG_AX {
ab.Put1(0x87) //xchg rhs,bx
ab.Put1(0x87) // xchg rhs,bx
ab.asmando(ctxt, cursym, p, &p.To, reg[breg])
subreg(&pp, z, breg)
ab.doasm(ctxt, cursym, &pp)

View File

@ -29,7 +29,7 @@ import (
// Disasm is a disassembler for a given File.
type Disasm struct {
syms []Sym //symbols in file, sorted by address
syms []Sym // symbols in file, sorted by address
pcln Liner // pcln table
text []byte // bytes of text segment (actual instructions)
textStart uint64 // start PC of text

View File

@ -629,7 +629,7 @@ func machoshbits(ctxt *Link, mseg *MachoSeg, sect *sym.Section, segname string)
if sect.Name == ".plt" {
msect.name = "__symbol_stub1"
msect.flag = S_ATTR_PURE_INSTRUCTIONS | S_ATTR_SOME_INSTRUCTIONS | S_SYMBOL_STUBS
msect.res1 = 0 //nkind[SymKindLocal];
msect.res1 = 0 // nkind[SymKindLocal];
msect.res2 = 6
}

View File

@ -2361,10 +2361,10 @@ func (l *Loader) cloneToExternal(symIdx Sym) {
// the mangled name. When we do mangling, we copy payload of mangled to original.
func (l *Loader) CopySym(src, dst Sym) {
if !l.IsExternal(dst) {
panic("dst is not external") //l.newExtSym(l.SymName(dst), l.SymVersion(dst))
panic("dst is not external") // l.newExtSym(l.SymName(dst), l.SymVersion(dst))
}
if !l.IsExternal(src) {
panic("src is not external") //l.cloneToExternal(src)
panic("src is not external") // l.cloneToExternal(src)
}
l.payloads[l.extIndex(dst)] = l.payloads[l.extIndex(src)]
l.SetSymPkg(dst, l.SymPkg(src))

View File

@ -828,7 +828,7 @@ func TestDeferLiveness(t *testing.T) {
func TestDeferHeapAndStack(t *testing.T) {
P := 4 // processors
N := 10000 //iterations
N := 10000 // iterations
D := 200 // stack depth
if testing.Short() {