Skip to content

Commit

Permalink
ic: update to serialize paddingAtEnd
Browse files Browse the repository at this point in the history
  • Loading branch information
Araq committed Sep 5, 2019
1 parent a5e2db2 commit 49f63d3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/nim.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ define:nimcore
#define:nimIncremental
#import:"$projectpath/testability"

define:staticSqlite
#define:staticSqlite

@if windows:
cincludes: "$lib/wrappers/libffi/common"
Expand Down
7 changes: 7 additions & 0 deletions compiler/rodimpl.nim
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@ proc encodeType(g: ModuleGraph, t: PType, result: var string) =
if t.lockLevel.ord != UnspecifiedLockLevel.ord:
add(result, '\14')
encodeVInt(t.lockLevel.int16, result)
if t.paddingAtEnd != 0:
add(result, '\15')
encodeVInt(t.paddingAtEnd, result)
for a in t.attachedOps:
add(result, '\16')
if a == nil:
Expand Down Expand Up @@ -631,6 +634,10 @@ proc loadType(g; id: int; info: TLineInfo): PType =
else:
result.lockLevel = UnspecifiedLockLevel

if b.s[b.pos] == '\15':
inc(b.pos)
result.paddingAtEnd = decodeVInt(b.s, b.pos).int16

for a in low(result.attachedOps)..high(result.attachedOps):
if b.s[b.pos] == '\16':
inc(b.pos)
Expand Down

0 comments on commit 49f63d3

Please sign in to comment.