Cleaned up the circular dependecies and remaining issues

Changed: The []= operator for strings and sequences is now capable of splicing
This commit is contained in:
Zahary Karadjov 2011-10-06 03:55:02 +03:00
commit e3deb5b502
11 changed files with 105 additions and 100 deletions

View file

@ -925,6 +925,11 @@ proc computeSize(typ: PType): biggestInt =
var a: biggestInt = 1
result = computeSizeAux(typ, a)
proc getReturnType*(s: PSym): PType =
# Obtains the return type of a iterator/proc/macro/template
assert s.kind in { skProc, skTemplate, skMacro, skIterator }
result = s.typ.n.sons[0].typ
proc getSize(typ: PType): biggestInt =
result = computeSize(typ)
if result < 0: InternalError("getSize(" & $typ.kind & ')')