summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2013-06-27 01:04:56 +0200
committerAraq <rumpf_a@web.de>2013-06-27 01:04:56 +0200
commita674c039fb959166681f13f809670807b89e0b41 (patch)
treeec4676bf220ed2e49e8fff9b1071eaf2bfcae3d4 /compiler
parentff1d68c50b5df56645eb09a523c08726772bec4d (diff)
downloadNim-a674c039fb959166681f13f809670807b89e0b41.tar.gz
fixed a long standing xml parser bug; html parser bugfixes + speed improvements
Diffstat (limited to 'compiler')
-rw-r--r--compiler/ast.nim3
-rw-r--r--compiler/sempass2.nim9
2 files changed, 4 insertions, 8 deletions
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 =