mirror of
https://github.com/golang/go
synced 2024-11-25 18:47:57 -07:00
all: fix typos
R=golang-dev, bradfitz, khr, r CC=golang-dev https://golang.org/cl/7461046
This commit is contained in:
parent
822da40814
commit
faef52c214
@ -462,7 +462,7 @@ copy1(Adr *v1, Adr *v2, Reg *r, int f)
|
|||||||
}
|
}
|
||||||
t = copyu(p, v2, A);
|
t = copyu(p, v2, A);
|
||||||
switch(t) {
|
switch(t) {
|
||||||
case 2: /* rar, cant split */
|
case 2: /* rar, can't split */
|
||||||
if(debug['P'])
|
if(debug['P'])
|
||||||
print("; %Drar; return 0\n", v2);
|
print("; %Drar; return 0\n", v2);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1905,7 +1905,7 @@ odot:
|
|||||||
|
|
||||||
for(i=1; i<o; i++) {
|
for(i=1; i<o; i++) {
|
||||||
if(oary[i] >= 0)
|
if(oary[i] >= 0)
|
||||||
fatal("cant happen");
|
fatal("can't happen");
|
||||||
gins(AMOVW, &n1, reg);
|
gins(AMOVW, &n1, reg);
|
||||||
n1.xoffset = -(oary[i]+1);
|
n1.xoffset = -(oary[i]+1);
|
||||||
}
|
}
|
||||||
|
@ -496,7 +496,7 @@ copy1(Adr *v1, Adr *v2, Reg *r, int f)
|
|||||||
}
|
}
|
||||||
t = copyu(p, v2, A);
|
t = copyu(p, v2, A);
|
||||||
switch(t) {
|
switch(t) {
|
||||||
case 2: /* rar, cant split */
|
case 2: /* rar, can't split */
|
||||||
if(debug['P'])
|
if(debug['P'])
|
||||||
print("; %Drar; return 0\n", v2);
|
print("; %Drar; return 0\n", v2);
|
||||||
return 0;
|
return 0;
|
||||||
@ -973,7 +973,7 @@ copyu(Prog *p, Adr *v, Adr *s)
|
|||||||
switch(p->as) {
|
switch(p->as) {
|
||||||
|
|
||||||
default:
|
default:
|
||||||
print("copyu: cant find %A\n", p->as);
|
print("copyu: can't find %A\n", p->as);
|
||||||
return 2;
|
return 2;
|
||||||
|
|
||||||
case AMOVM:
|
case AMOVM:
|
||||||
@ -1288,7 +1288,7 @@ copyau1(Prog *p, Adr *v)
|
|||||||
return 1;
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
print("copyau1: cant tell %P\n", p);
|
print("copyau1: can't tell %P\n", p);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -816,7 +816,7 @@ addmove(Reg *r, int bn, int rn, int f)
|
|||||||
a->type = D_CONST;
|
a->type = D_CONST;
|
||||||
|
|
||||||
if(v->addr)
|
if(v->addr)
|
||||||
fatal("addmove: shouldnt be doing this %A\n", a);
|
fatal("addmove: shouldn't be doing this %A\n", a);
|
||||||
|
|
||||||
switch(v->etype) {
|
switch(v->etype) {
|
||||||
default:
|
default:
|
||||||
|
@ -130,7 +130,7 @@ loop:
|
|||||||
r = prg();
|
r = prg();
|
||||||
*r = *p;
|
*r = *p;
|
||||||
if(!(r->mark&FOLL))
|
if(!(r->mark&FOLL))
|
||||||
print("cant happen 1\n");
|
print("can't happen 1\n");
|
||||||
r->mark |= FOLL;
|
r->mark |= FOLL;
|
||||||
if(p != q) {
|
if(p != q) {
|
||||||
p = p->link;
|
p = p->link;
|
||||||
@ -150,7 +150,7 @@ loop:
|
|||||||
if(!(r->link->mark&FOLL))
|
if(!(r->link->mark&FOLL))
|
||||||
xfol(r->link, last);
|
xfol(r->link, last);
|
||||||
if(!(r->cond->mark&FOLL))
|
if(!(r->cond->mark&FOLL))
|
||||||
print("cant happen 2\n");
|
print("can't happen 2\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -483,7 +483,7 @@ copy1(Adr *v1, Adr *v2, Reg *r, int f)
|
|||||||
}
|
}
|
||||||
t = copyu(p, v2, A);
|
t = copyu(p, v2, A);
|
||||||
switch(t) {
|
switch(t) {
|
||||||
case 2: /* rar, cant split */
|
case 2: /* rar, can't split */
|
||||||
if(debug['P'])
|
if(debug['P'])
|
||||||
print("; %D rar; return 0\n", v2);
|
print("; %D rar; return 0\n", v2);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1188,7 +1188,7 @@ print("botch in doindex\n");
|
|||||||
else if(n->left->op == OREGISTER)
|
else if(n->left->op == OREGISTER)
|
||||||
idx.ptr = n->left->reg;
|
idx.ptr = n->left->reg;
|
||||||
else if(n->left->op != OADDR) {
|
else if(n->left->op != OADDR) {
|
||||||
reg[D_BP]++; // cant be used as a base
|
reg[D_BP]++; // can't be used as a base
|
||||||
regalloc(&nod1, &qregnode, Z);
|
regalloc(&nod1, &qregnode, Z);
|
||||||
cgen(n->left, &nod1);
|
cgen(n->left, &nod1);
|
||||||
idx.ptr = nod1.reg;
|
idx.ptr = nod1.reg;
|
||||||
|
@ -1480,7 +1480,7 @@ cadable(Node *n)
|
|||||||
* Small structs or arrays with elements of basic type are
|
* Small structs or arrays with elements of basic type are
|
||||||
* also supported.
|
* also supported.
|
||||||
* nr is N when assigning a zero value.
|
* nr is N when assigning a zero value.
|
||||||
* return 1 if can do, 0 if cant.
|
* return 1 if can do, 0 if can't.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
componentgen(Node *nr, Node *nl)
|
componentgen(Node *nr, Node *nl)
|
||||||
|
@ -494,7 +494,7 @@ fp:
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 2: // offset output arg
|
case 2: // offset output arg
|
||||||
fatal("shouldnt be used");
|
fatal("shouldn't be used");
|
||||||
n->op = OINDREG;
|
n->op = OINDREG;
|
||||||
n->val.u.reg = D_SP;
|
n->val.u.reg = D_SP;
|
||||||
n->xoffset += types[tptr]->width;
|
n->xoffset += types[tptr]->width;
|
||||||
@ -2038,7 +2038,7 @@ odot:
|
|||||||
|
|
||||||
for(i=1; i<o; i++) {
|
for(i=1; i<o; i++) {
|
||||||
if(oary[i] >= 0)
|
if(oary[i] >= 0)
|
||||||
fatal("cant happen");
|
fatal("can't happen");
|
||||||
gins(AMOVQ, &n1, reg);
|
gins(AMOVQ, &n1, reg);
|
||||||
n1.xoffset = -(oary[i]+1);
|
n1.xoffset = -(oary[i]+1);
|
||||||
}
|
}
|
||||||
|
@ -843,7 +843,7 @@ copy1(Adr *v1, Adr *v2, Reg *r, int f)
|
|||||||
}
|
}
|
||||||
t = copyu(p, v2, A);
|
t = copyu(p, v2, A);
|
||||||
switch(t) {
|
switch(t) {
|
||||||
case 2: /* rar, cant split */
|
case 2: /* rar, can't split */
|
||||||
if(debug['P'])
|
if(debug['P'])
|
||||||
print("; %D rar; return 0\n", v2);
|
print("; %D rar; return 0\n", v2);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -403,7 +403,7 @@ copy1(Adr *v1, Adr *v2, Reg *r, int f)
|
|||||||
}
|
}
|
||||||
t = copyu(p, v2, A);
|
t = copyu(p, v2, A);
|
||||||
switch(t) {
|
switch(t) {
|
||||||
case 2: /* rar, cant split */
|
case 2: /* rar, can't split */
|
||||||
if(debug['P'])
|
if(debug['P'])
|
||||||
print("; %D rar; return 0\n", v2);
|
print("; %D rar; return 0\n", v2);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -963,7 +963,7 @@ print("botch in doindex\n");
|
|||||||
else if(n->left->op == OREGISTER)
|
else if(n->left->op == OREGISTER)
|
||||||
idx.ptr = n->left->reg;
|
idx.ptr = n->left->reg;
|
||||||
else if(n->left->op != OADDR) {
|
else if(n->left->op != OADDR) {
|
||||||
reg[D_BP]++; // cant be used as a base
|
reg[D_BP]++; // can't be used as a base
|
||||||
regalloc(&nod1, ®node, Z);
|
regalloc(&nod1, ®node, Z);
|
||||||
cgen(n->left, &nod1);
|
cgen(n->left, &nod1);
|
||||||
idx.ptr = nod1.reg;
|
idx.ptr = nod1.reg;
|
||||||
|
@ -1319,7 +1319,7 @@ cadable(Node *n)
|
|||||||
* copy a composite value by moving its individual components.
|
* copy a composite value by moving its individual components.
|
||||||
* Slices, strings and interfaces are supported.
|
* Slices, strings and interfaces are supported.
|
||||||
* nr is N when assigning a zero value.
|
* nr is N when assigning a zero value.
|
||||||
* return 1 if can do, 0 if cant.
|
* return 1 if can do, 0 if can't.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
componentgen(Node *nr, Node *nl)
|
componentgen(Node *nr, Node *nl)
|
||||||
|
@ -608,7 +608,7 @@ copy1(Adr *v1, Adr *v2, Reg *r, int f)
|
|||||||
}
|
}
|
||||||
t = copyu(p, v2, A);
|
t = copyu(p, v2, A);
|
||||||
switch(t) {
|
switch(t) {
|
||||||
case 2: /* rar, cant split */
|
case 2: /* rar, can't split */
|
||||||
if(debug['P'])
|
if(debug['P'])
|
||||||
print("; %D rar; return 0\n", v2);
|
print("; %D rar; return 0\n", v2);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1824,7 +1824,7 @@ hash32to16(uint32 h)
|
|||||||
static void
|
static void
|
||||||
fixtemp(Prog *firstp)
|
fixtemp(Prog *firstp)
|
||||||
{
|
{
|
||||||
static uint8 counts[1<<16]; // A hash table to count variable occurences.
|
static uint8 counts[1<<16]; // A hash table to count variable occurrences.
|
||||||
int i;
|
int i;
|
||||||
Prog *p, *p2;
|
Prog *p, *p2;
|
||||||
uint32 h;
|
uint32 h;
|
||||||
|
@ -235,7 +235,7 @@ no:
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
bad:
|
bad:
|
||||||
diag(n, "cant rewrite typestr for op %O\n", o);
|
diag(n, "can't rewrite typestr for op %O\n", o);
|
||||||
prtree(n, "isfunct");
|
prtree(n, "isfunct");
|
||||||
n->type = T;
|
n->type = T;
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -762,7 +762,7 @@ ieeedtod(Ieee *ieee, double native)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
fr = frexp(native, &exp);
|
fr = frexp(native, &exp);
|
||||||
f = 2097152L; /* shouldnt use fp constants here */
|
f = 2097152L; /* shouldn't use fp constants here */
|
||||||
fr = modf(fr*f, &ho);
|
fr = modf(fr*f, &ho);
|
||||||
ieee->h = ho;
|
ieee->h = ho;
|
||||||
ieee->h &= 0xfffffL;
|
ieee->h &= 0xfffffL;
|
||||||
|
@ -75,7 +75,7 @@ codgen(Node *n, Node *nn)
|
|||||||
*/
|
*/
|
||||||
for(n1 = nn;; n1 = n1->left) {
|
for(n1 = nn;; n1 = n1->left) {
|
||||||
if(n1 == Z) {
|
if(n1 == Z) {
|
||||||
diag(nn, "cant find function name");
|
diag(nn, "can't find function name");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(n1->op == ONAME)
|
if(n1->op == ONAME)
|
||||||
|
@ -156,7 +156,7 @@ ieeedtod(Ieee *ieee, double native)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
fr = frexp(native, &exp);
|
fr = frexp(native, &exp);
|
||||||
f = 2097152L; /* shouldnt use fp constants here */
|
f = 2097152L; /* shouldn't use fp constants here */
|
||||||
fr = modf(fr*f, &ho);
|
fr = modf(fr*f, &ho);
|
||||||
ieee->h = ho;
|
ieee->h = ho;
|
||||||
ieee->h &= 0xfffffL;
|
ieee->h &= 0xfffffL;
|
||||||
|
2
src/cmd/dist/plan9.c
vendored
2
src/cmd/dist/plan9.c
vendored
@ -578,7 +578,7 @@ hassuffix(char *p, char *suffix)
|
|||||||
return np >= ns && strcmp(p+np-ns, suffix) == 0;
|
return np >= ns && strcmp(p+np-ns, suffix) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// hasprefix reports whether p begins wtih prefix.
|
// hasprefix reports whether p begins with prefix.
|
||||||
bool
|
bool
|
||||||
hasprefix(char *p, char *prefix)
|
hasprefix(char *p, char *prefix)
|
||||||
{
|
{
|
||||||
|
2
src/cmd/dist/unix.c
vendored
2
src/cmd/dist/unix.c
vendored
@ -548,7 +548,7 @@ hassuffix(char *p, char *suffix)
|
|||||||
return np >= ns && strcmp(p+np-ns, suffix) == 0;
|
return np >= ns && strcmp(p+np-ns, suffix) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// hasprefix reports whether p begins wtih prefix.
|
// hasprefix reports whether p begins with prefix.
|
||||||
bool
|
bool
|
||||||
hasprefix(char *p, char *prefix)
|
hasprefix(char *p, char *prefix)
|
||||||
{
|
{
|
||||||
|
@ -235,7 +235,7 @@ ieeedtod(uint64 *ieee, double native)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
fr = frexp(native, &exp);
|
fr = frexp(native, &exp);
|
||||||
f = 2097152L; /* shouldnt use fp constants here */
|
f = 2097152L; /* shouldn't use fp constants here */
|
||||||
fr = modf(fr*f, &ho);
|
fr = modf(fr*f, &ho);
|
||||||
h = ho;
|
h = ho;
|
||||||
h &= 0xfffffL;
|
h &= 0xfffffL;
|
||||||
|
@ -315,7 +315,7 @@ casebody(Node *sw, Node *typeswvar)
|
|||||||
}
|
}
|
||||||
stat = concat(stat, n->nbody);
|
stat = concat(stat, n->nbody);
|
||||||
|
|
||||||
// botch - shouldnt fall thru declaration
|
// botch - shouldn't fall thru declaration
|
||||||
last = stat->end->n;
|
last = stat->end->n;
|
||||||
if(last->op == OXFALL) {
|
if(last->op == OXFALL) {
|
||||||
if(typeswvar) {
|
if(typeswvar) {
|
||||||
|
@ -151,7 +151,7 @@ if ! ./testgo list std | cmp -s test_std.list - ; then
|
|||||||
fi
|
fi
|
||||||
rm -f test_std.list
|
rm -f test_std.list
|
||||||
|
|
||||||
# issue 4096. Validate the output of unsucessful go install foo/quxx
|
# issue 4096. Validate the output of unsuccessful go install foo/quxx
|
||||||
if [ $(./testgo install 'foo/quxx' 2>&1 | grep -c 'cannot find package "foo/quxx" in any of') -ne 1 ] ; then
|
if [ $(./testgo install 'foo/quxx' 2>&1 | grep -c 'cannot find package "foo/quxx" in any of') -ne 1 ] ; then
|
||||||
echo 'go install foo/quxx expected error: .*cannot find package "foo/quxx" in any of'
|
echo 'go install foo/quxx expected error: .*cannot find package "foo/quxx" in any of'
|
||||||
ok=false
|
ok=false
|
||||||
|
@ -367,7 +367,7 @@ dynreloc(void)
|
|||||||
{
|
{
|
||||||
Sym *s;
|
Sym *s;
|
||||||
|
|
||||||
// -d supresses dynamic loader format, so we may as well not
|
// -d suppresses dynamic loader format, so we may as well not
|
||||||
// compute these sections or mark their symbols as reachable.
|
// compute these sections or mark their symbols as reachable.
|
||||||
if(debug['d'] && HEADTYPE != Hwindows)
|
if(debug['d'] && HEADTYPE != Hwindows)
|
||||||
return;
|
return;
|
||||||
|
@ -133,7 +133,7 @@ sleb128put(vlong v)
|
|||||||
/*
|
/*
|
||||||
* Defining Abbrevs. This is hardcoded, and there will be
|
* Defining Abbrevs. This is hardcoded, and there will be
|
||||||
* only a handful of them. The DWARF spec places no restriction on
|
* only a handful of them. The DWARF spec places no restriction on
|
||||||
* the ordering of atributes in the Abbrevs and DIEs, and we will
|
* the ordering of attributes in the Abbrevs and DIEs, and we will
|
||||||
* always write them out in the order of declaration in the abbrev.
|
* always write them out in the order of declaration in the abbrev.
|
||||||
* This implementation relies on tag, attr < 127, so they serialize as
|
* This implementation relies on tag, attr < 127, so they serialize as
|
||||||
* a char. Higher numbered user-defined tags or attributes can be used
|
* a char. Higher numbered user-defined tags or attributes can be used
|
||||||
@ -1646,7 +1646,7 @@ guesslang(char *s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Generate short opcodes when possible, long ones when neccesary.
|
* Generate short opcodes when possible, long ones when necessary.
|
||||||
* See section 6.2.5
|
* See section 6.2.5
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -1938,7 +1938,7 @@ enum
|
|||||||
{
|
{
|
||||||
CIERESERVE = 16,
|
CIERESERVE = 16,
|
||||||
DATAALIGNMENTFACTOR = -4, // TODO -PtrSize?
|
DATAALIGNMENTFACTOR = -4, // TODO -PtrSize?
|
||||||
FAKERETURNCOLUMN = 16 // TODO gdb6 doesnt like > 15?
|
FAKERETURNCOLUMN = 16 // TODO gdb6 doesn't like > 15?
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -481,7 +481,7 @@ mgd megagal/day
|
|||||||
mh millihenry
|
mh millihenry
|
||||||
mhz 1e+6/sec
|
mhz 1e+6/sec
|
||||||
mil 1e-3 in
|
mil 1e-3 in
|
||||||
millenium 1000 year
|
millennium 1000 year
|
||||||
minersinch 1.5 ft³/min
|
minersinch 1.5 ft³/min
|
||||||
minim 1|60 fldr
|
minim 1|60 fldr
|
||||||
mo month
|
mo month
|
||||||
|
@ -52,7 +52,7 @@ _is6(char *t)
|
|||||||
{
|
{
|
||||||
uchar *s = (uchar*)t;
|
uchar *s = (uchar*)t;
|
||||||
|
|
||||||
return s[0] == (ANAME&0xff) /* aslo = ANAME */
|
return s[0] == (ANAME&0xff) /* also = ANAME */
|
||||||
&& s[1] == ((ANAME>>8)&0xff)
|
&& s[1] == ((ANAME>>8)&0xff)
|
||||||
&& s[2] == D_FILE /* type */
|
&& s[2] == D_FILE /* type */
|
||||||
&& s[3] == 1 /* sym */
|
&& s[3] == 1 /* sym */
|
||||||
|
@ -52,7 +52,7 @@ _is8(char *t)
|
|||||||
{
|
{
|
||||||
uchar *s = (uchar*)t;
|
uchar *s = (uchar*)t;
|
||||||
|
|
||||||
return s[0] == (ANAME&0xff) /* aslo = ANAME */
|
return s[0] == (ANAME&0xff) /* also = ANAME */
|
||||||
&& s[1] == ((ANAME>>8)&0xff)
|
&& s[1] == ((ANAME>>8)&0xff)
|
||||||
&& s[2] == D_FILE /* type */
|
&& s[2] == D_FILE /* type */
|
||||||
&& s[3] == 1 /* sym */
|
&& s[3] == 1 /* sym */
|
||||||
|
@ -36,7 +36,7 @@ func sender(n int, c1, c2, c3, c4 chan<- int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// mux receives the values from sender and forwards them onto another channel.
|
// mux receives the values from sender and forwards them onto another channel.
|
||||||
// It would be simplier to just have sender's four cases all be the same
|
// It would be simpler to just have sender's four cases all be the same
|
||||||
// channel, but this doesn't actually trigger the bug.
|
// channel, but this doesn't actually trigger the bug.
|
||||||
func mux(out chan<- int, in <-chan int, done chan<- bool) {
|
func mux(out chan<- int, in <-chan int, done chan<- bool) {
|
||||||
for v := range in {
|
for v := range in {
|
||||||
|
Loading…
Reference in New Issue
Block a user