fixes #2068
This commit is contained in:
parent
2f62cc91a4
commit
f9b3f7f980
3 changed files with 490 additions and 482 deletions
|
|
@ -431,6 +431,18 @@ proc genNamedParamCall(p: BProc, ri: PNode, d: var TLoc) =
|
||||||
var length = sonsLen(ri)
|
var length = sonsLen(ri)
|
||||||
assert(sonsLen(typ) == sonsLen(typ.n))
|
assert(sonsLen(typ) == sonsLen(typ.n))
|
||||||
|
|
||||||
|
# don't call 'ropeToStr' here for efficiency:
|
||||||
|
let pat = ri.sons[0].sym.loc.r.data
|
||||||
|
internalAssert pat != nil
|
||||||
|
var start = 3
|
||||||
|
if ' ' in pat:
|
||||||
|
start = 1
|
||||||
|
app(pl, op.r)
|
||||||
|
if length > 1:
|
||||||
|
app(pl, ~": ")
|
||||||
|
app(pl, genArg(p, ri.sons[1], typ.n.sons[1].sym, ri))
|
||||||
|
start = 2
|
||||||
|
else:
|
||||||
if length > 1:
|
if length > 1:
|
||||||
app(pl, genArg(p, ri.sons[1], typ.n.sons[1].sym, ri))
|
app(pl, genArg(p, ri.sons[1], typ.n.sons[1].sym, ri))
|
||||||
app(pl, ~" ")
|
app(pl, ~" ")
|
||||||
|
|
@ -438,7 +450,7 @@ proc genNamedParamCall(p: BProc, ri: PNode, d: var TLoc) =
|
||||||
if length > 2:
|
if length > 2:
|
||||||
app(pl, ~": ")
|
app(pl, ~": ")
|
||||||
app(pl, genArg(p, ri.sons[2], typ.n.sons[2].sym, ri))
|
app(pl, genArg(p, ri.sons[2], typ.n.sons[2].sym, ri))
|
||||||
for i in countup(3, length-1):
|
for i in countup(start, length-1):
|
||||||
assert(sonsLen(typ) == sonsLen(typ.n))
|
assert(sonsLen(typ) == sonsLen(typ.n))
|
||||||
if i >= sonsLen(typ):
|
if i >= sonsLen(typ):
|
||||||
internalError(ri.info, "varargs for objective C method?")
|
internalError(ri.info, "varargs for objective C method?")
|
||||||
|
|
|
||||||
|
|
@ -60,11 +60,6 @@ ConfigDeprecated The project makes use of a deprecated config
|
||||||
file.
|
file.
|
||||||
SmallLshouldNotBeUsed The letter 'l' should not be used as an
|
SmallLshouldNotBeUsed The letter 'l' should not be used as an
|
||||||
identifier.
|
identifier.
|
||||||
AnalysisLoophole The thread analysis was incomplete due to
|
|
||||||
an indirect call.
|
|
||||||
DifferentHeaps The code mixes different local heaps in a
|
|
||||||
very dangerous way.
|
|
||||||
WriteToForeignHeap The code contains a threading error.
|
|
||||||
EachIdentIsTuple The code contains a confusing ``var``
|
EachIdentIsTuple The code contains a confusing ``var``
|
||||||
declaration.
|
declaration.
|
||||||
ShadowIdent A local variable shadows another local
|
ShadowIdent A local variable shadows another local
|
||||||
|
|
|
||||||
1
todo.txt
1
todo.txt
|
|
@ -4,6 +4,7 @@ version 0.10.4
|
||||||
- improve GC-unsafety warnings
|
- improve GC-unsafety warnings
|
||||||
- make 'nil' work for 'add' and 'len'
|
- make 'nil' work for 'add' and 'len'
|
||||||
- get rid of 'mget'; aka priority of 'var' needs to be 'var{lvalue}'
|
- get rid of 'mget'; aka priority of 'var' needs to be 'var{lvalue}'
|
||||||
|
- 'result' shadowing warning
|
||||||
|
|
||||||
|
|
||||||
version 1.0
|
version 1.0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue