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 {
goto illegal
}
- // right must be unsigned.
+ // right must be unsigned.
// left can be ideal.
case OLSH, ORSH:
nr = defaultlit(nr, Types[TUINT])
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 {
}
}
- // Filter out the following special case.
+ // Filter out the following special case.
//
// func (b *Buffer) Foo() {
// n, m := ...
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
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,
}
fallthrough
- // TODO do them here (or earlier),
+ // TODO do them here (or earlier),
// so escape analysis can avoid more heapmoves.
case OCLOSURE:
return n
}
}
- // 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,
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)
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)
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:
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)
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,
ORETJMP:
order.out = append(order.out, n)
- // Special: handle call arguments.
+ // Special: handle call arguments.
case OCALLFUNC, OCALLINTER, OCALLMETH:
t := marktemp(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)
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)
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)
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)
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)
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
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:
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)
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:
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:
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
}
n = liststmt(append([]*Node{r}, ll...))
- // x, y = <-c
+ // x, y = <-c
// orderstmt made sure x is addressable.
case OAS2RECV:
init.AppendNodes(&n.Ninit)
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 {
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
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 {
*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)) {