summary refs log tree commit diff stats
path: root/compiler/ccgmerge.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-05-15 23:34:30 +0200
committerAndreas Rumpf <rumpf_a@web.de>2016-05-18 12:40:01 +0200
commit3ac6bd8ae11606298dbfa483d6b4280a45b6d47c (patch)
tree484e67da3dd488e859c5f95c66401283059171db /compiler/ccgmerge.nim
parent3f075b7921a32417857e765c13323a65c60b5e01 (diff)
downloadNim-3ac6bd8ae11606298dbfa483d6b4280a45b6d47c.tar.gz
refactoring: flags instead of bools
Diffstat (limited to 'compiler/ccgmerge.nim')
-rw-r--r--compiler/ccgmerge.nim7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/ccgmerge.nim b/compiler/ccgmerge.nim
index 2a37257b6..2e77cd2a6 100644
--- a/compiler/ccgmerge.nim
+++ b/compiler/ccgmerge.nim
@@ -107,8 +107,8 @@ proc genMergeInfo*(m: BModule): Rope =
   writeIntSet(m.typeInfoMarker, s)
   s.add("labels:")
   encodeVInt(m.labels, s)
-  s.add(" hasframe:")
-  encodeVInt(ord(m.frameDeclared), s)
+  s.add(" flags:")
+  encodeVInt(cast[int](m.flags), s)
   s.add(tnl)
   s.add("*/")
   result = s.rope
@@ -222,7 +222,8 @@ proc processMergeInfo(L: var TBaseLexer, m: BModule) =
     of "declared":  readIntSet(L, m.declaredThings)
     of "typeInfo":  readIntSet(L, m.typeInfoMarker)
     of "labels":    m.labels = decodeVInt(L.buf, L.bufpos)
-    of "hasframe":  m.frameDeclared = decodeVInt(L.buf, L.bufpos) != 0
+    of "flags":
+      m.flags = cast[set[CodegenFlag]](decodeVInt(L.buf, L.bufpos) != 0)
     else: internalError("ccgmerge: unknown key: " & k)
 
 when not defined(nimhygiene):