From a674c039fb959166681f13f809670807b89e0b41 Mon Sep 17 00:00:00 2001 From: Araq Date: Thu, 27 Jun 2013 01:04:56 +0200 Subject: fixed a long standing xml parser bug; html parser bugfixes + speed improvements --- compiler/ast.nim | 3 +++ compiler/sempass2.nim | 9 +-------- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'compiler') diff --git a/compiler/ast.nim b/compiler/ast.nim index e4f7f6d98..02396f0bb 100644 --- a/compiler/ast.nim +++ b/compiler/ast.nim @@ -283,6 +283,9 @@ const sfNoForward* = sfRegister # forward declarations are not required (per module) + sfNoRoot* = sfBorrow # a local variable is provably no root so it doesn't + # require RC ops + const # getting ready for the future expr/stmt merge nkWhen* = nkWhenStmt diff --git a/compiler/sempass2.nim b/compiler/sempass2.nim index 1fc74d31c..f2e4fb02e 100644 --- a/compiler/sempass2.nim +++ b/compiler/sempass2.nim @@ -57,14 +57,6 @@ discard """ c() --> we need a stack of scopes for this analysis - - - Effect tracking: - - We track the effects per proc; forward declarations and indirect calls cause - problems: Forward declarations are computed lazily (we do this pass after - a whole module) and indirect calls are assumed the worst, unless they have - an effect annotation. """ type @@ -75,6 +67,7 @@ type owner: PSym init: seq[int] # list of initialized variables guards: TModel # nested guards + locked: seq[PNode] # locked locations PEffects = var TEffects proc isLocalVar(a: PEffects, s: PSym): bool = -- cgit 1.4.1-2-gfad0