From 94f54700c4bfcc04966e0ea011960c5432b29092 Mon Sep 17 00:00:00 2001 From: Araq Date: Thu, 28 May 2015 12:42:04 +0200 Subject: first implementation of pinnedSpawn --- compiler/sempass2.nim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'compiler/sempass2.nim') diff --git a/compiler/sempass2.nim b/compiler/sempass2.nim index adf03be64..517c37b0f 100644 --- a/compiler/sempass2.nim +++ b/compiler/sempass2.nim @@ -237,9 +237,10 @@ proc useVar(a: PEffects, n: PNode) = message(n.info, warnUninit, s.name.s) # prevent superfluous warnings about the same variable: a.init.add s.id - if {sfGlobal, sfThread} * s.flags == {sfGlobal} and s.kind in {skVar, skLet}: + if {sfGlobal, sfThread} * s.flags != {} and s.kind in {skVar, skLet}: if s.guard != nil: guardGlobal(a, n, s.guard) - if (tfHasGCedMem in s.typ.flags or s.typ.isGCedMem): + if {sfGlobal, sfThread} * s.flags == {sfGlobal} and + (tfHasGCedMem in s.typ.flags or s.typ.isGCedMem): #if warnGcUnsafe in gNotes: warnAboutGcUnsafe(n) markGcUnsafe(a, s) -- cgit 1.4.1-2-gfad0