implemented opcTypeTrait
This commit is contained in:
parent
3940bd5b84
commit
cf38d635bf
3 changed files with 26 additions and 17 deletions
|
|
@ -833,6 +833,12 @@ proc execute(c: PCtx, start: int) =
|
|||
regs[ra] = newSymNode(newSym(k.TSymKind, name.getIdent, c.module,
|
||||
c.debug[pc]))
|
||||
incl(regs[ra].sym.flags, sfGenSym)
|
||||
of opcTypeTrait:
|
||||
# XXX only supports 'name' for now; we can use regC to encode the
|
||||
# type trait operation
|
||||
decodeB(nkStrLit)
|
||||
let typ = regs[rb].sym.typ.skipTypes({tyTypeDesc})
|
||||
regs[ra].strVal = typ.typeToString(preferExported)
|
||||
inc pc
|
||||
|
||||
proc evalStmt*(c: PCtx, n: PNode) =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue