removed compiler internal list implementation (#5371)

This commit is contained in:
Arne Döring 2017-02-22 17:33:12 +01:00 • committed by Andreas Rumpf
commit 92c2a51bf7
25 changed files with 125 additions and 227 deletions

View file

@ -10,7 +10,7 @@
## This module contains the data structures for the C code generation phase.
import
ast, astalgo, ropes, passes, options, intsets, lists, platform, sighashes,
ast, astalgo, ropes, passes, options, intsets, platform, sighashes,
tables, ndi
from msgs import TLineInfo
@ -130,7 +130,7 @@ type
forwTypeCache*: TypeCache # cache for forward declarations of types
declaredThings*: IntSet # things we have declared in this .c file
declaredProtos*: IntSet # prototypes we have declared in this .c file
headerFiles*: TLinkedList # needed headers to include
headerFiles*: seq[string] # needed headers to include
typeInfoMarker*: TypeCache # needed for generating type information
initProc*: BProc # code for init procedure
postInitProc*: BProc # code to be executed after the init proc
@ -148,9 +148,13 @@ type
g*: BModuleList
ndi*: NdiFile
proc includeHeader*(this: BModule; header: string) =
if not this.headerFiles.contains header:
this.headerFiles.add header
proc s*(p: BProc, s: TCProcSection): var Rope {.inline.} =
# section in the current block
result = p.blocks[p.blocks.len - 1].sections[s]
result = p.blocks[^1].sections[s]
proc procSec*(p: BProc, s: TCProcSection): var Rope {.inline.} =
# top level proc sections