refactoring: flags instead of bools
This commit is contained in:
parent
3f075b7921
commit
3ac6bd8ae1
6 changed files with 31 additions and 25 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue