fixes #5383
This commit is contained in:
parent
95abf30fae
commit
97e26967f1
11 changed files with 60 additions and 17 deletions
|
|
@ -39,6 +39,7 @@ type
|
|||
next*: PProcCon # used for stacking procedure contexts
|
||||
wasForwarded*: bool # whether the current proc has a separate header
|
||||
bracketExpr*: PNode # current bracket expression (for ^ support)
|
||||
mapping*: TIdTable
|
||||
|
||||
TInstantiationPair* = object
|
||||
genericSym*: PSym
|
||||
|
|
@ -147,6 +148,15 @@ proc lastOptionEntry*(c: PContext): POptionEntry =
|
|||
|
||||
proc popProcCon*(c: PContext) {.inline.} = c.p = c.p.next
|
||||
|
||||
proc put*(p: PProcCon; key, val: PSym) =
|
||||
if p.mapping.data == nil: initIdTable(p.mapping)
|
||||
#echo "put into table ", key.info
|
||||
p.mapping.idTablePut(key, val)
|
||||
|
||||
proc get*(p: PProcCon; key: PSym): PSym =
|
||||
if p.mapping.data == nil: return nil
|
||||
result = PSym(p.mapping.idTableGet(key))
|
||||
|
||||
proc newOptionEntry*(): POptionEntry =
|
||||
new(result)
|
||||
result.options = gOptions
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue