decls, vars, selected = createSimpleVars(automDecls)
}
- var dcl []*Node
+ dcl := automDecls
if fnsym.WasInlined() {
dcl = preInliningDcls(fnsym)
- } else {
- dcl = automDecls
}
// If optimization is enabled, the list above will typically be
return
}
- var str string
+ str := p.Path
if p == localpkg {
// Note: myimportpath != "", or else dgopkgpath won't call dimportpath.
str = myimportpath
- } else {
- str = p.Path
}
s := Ctxt.Lookup("type..importpath." + p.Prefix + ".")
if l != nil {
// Handle both == and !=.
eq := n.Op
- var andor Op
+ andor := OOROR
if eq == OEQ {
andor = OANDAND
- } else {
- andor = OOROR
}
// Check for types equal.
// For empty interface, this is:
// Schedule highest priority value, update use counts, repeat.
order = order[:0]
tuples := make(map[ID][]*Value)
- for {
+ for priq.Len() > 0 {
// Find highest priority schedulable value.
// Note that schedule is assembled backwards.
- if priq.Len() == 0 {
- break
- }
-
v := heap.Pop(priq).(*Value)
// Add it to the schedule.
continue
}
q := sym.Func.Text
- for q != nil {
- if p.To.Offset == q.Pc {
- break
- }
+ for q != nil && p.To.Offset != q.Pc {
if q.Forwd != nil && p.To.Offset >= q.Forwd.Pc {
q = q.Forwd
} else {
return nil
}
- var typ int
+ typ := SHT_REL
if elfRelType == ".rela" {
typ = SHT_RELA
- } else {
- typ = SHT_REL
}
sh := elfshname(elfRelType + sect.Name)
next := []field{{typ: t}}
// Count of queued names for current level and the next.
- count := map[reflect.Type]int{}
- nextCount := map[reflect.Type]int{}
+ var count, nextCount map[reflect.Type]int
// Types already visited at an earlier level.
visited := map[reflect.Type]bool{}
v interface{}
}
-var tokenStreamCases []tokenStreamCase = []tokenStreamCase{
+var tokenStreamCases = []tokenStreamCase{
// streaming token cases
{json: `10`, expTokens: []interface{}{float64(10)}},
{json: ` [10] `, expTokens: []interface{}{
}
s := t.String()
i := len(s) - 1
- for i >= 0 {
- if s[i] == '.' {
- break
- }
+ for i >= 0 && s[i] != '.' {
i--
}
return s[i+1:]
}
s := t.String()
i := len(s) - 1
- for i >= 0 {
- if s[i] == '.' {
- break
- }
+ for i >= 0 && s[i] != '.' {
i--
}
return s[i+1:]
func printOneCgoTraceback(pc uintptr, max int, arg *cgoSymbolizerArg) int {
c := 0
arg.pc = pc
- for {
- if c > max {
- break
- }
+ for c <= max {
callCgoSymbolizer(arg)
if arg.funcName != nil {
// Note that we don't print any argument
}
s := t.string()
i := len(s) - 1
- for i >= 0 {
- if s[i] == '.' {
- break
- }
+ for i >= 0 && s[i] != '.' {
i--
}
return s[i+1:]
for i, arg := range args {
value := indirectInterface(arg)
// Compute the expected type. Clumsy because of variadics.
- var argType reflect.Type
+ argType := dddType
if !typ.IsVariadic() || i < numIn-1 {
argType = typ.In(i)
- } else {
- argType = dddType
}
var err error