parent
cf01945f54
commit
3bdc000521
2 changed files with 28 additions and 2 deletions
|
|
@ -994,8 +994,10 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg =
|
|||
let nb = regs[rb].node
|
||||
let nc = regs[rc].node
|
||||
if nb.kind != nc.kind: discard
|
||||
elif (nb == nc) or (nb.kind == nkNilLit): ret = true
|
||||
elif nb.kind == nkIntLit and nb.intVal == nc.intVal: # TODO: nkPtrLit
|
||||
elif (nb == nc) or (nb.kind == nkNilLit): ret = true # intentional
|
||||
elif sameConstant(nb, nc): ret = true
|
||||
# this also takes care of procvar's, represented as nkTupleConstr, eg (nil, nil)
|
||||
elif nb.kind == nkIntLit and nc.kind == nkIntLit and nb.intVal == nc.intVal: # TODO: nkPtrLit
|
||||
let tb = nb.getTyp
|
||||
let tc = nc.getTyp
|
||||
ret = tb.kind in PtrLikeKinds and tc.kind == tb.kind
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue