Of operator in vm fixes [backport] (#9717)
* fixes #9701 * fixes #9702 * optimize of statement to bool
This commit is contained in:
parent
2104863910
commit
8c1083d3b7
6 changed files with 65 additions and 7 deletions
|
|
@ -1228,7 +1228,7 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg =
|
|||
of opcOf:
|
||||
decodeBC(rkInt)
|
||||
let typ = c.types[regs[rc].intVal.int]
|
||||
regs[ra].intVal = ord(inheritanceDiff(regs[rb].node.typ, typ) >= 0)
|
||||
regs[ra].intVal = ord(inheritanceDiff(regs[rb].node.typ, typ) <= 0)
|
||||
of opcIs:
|
||||
decodeBC(rkInt)
|
||||
let t1 = regs[rb].node.typ.skipTypes({tyTypeDesc})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue