diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2016-06-22 02:50:42 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2016-06-22 02:50:50 +0200 |
commit | 4b0ba5e3f1b78b3c45a3f1576ed3d60f9a8b6d80 (patch) | |
tree | 2019e7f764acaaf4b5856febcffc6ae0eacf0a05 /compiler/idgen.nim | |
parent | 6b334770b5e310d8a237b88aed5d10380671f7d2 (diff) | |
download | Nim-4b0ba5e3f1b78b3c45a3f1576ed3d60f9a8b6d80.tar.gz |
C code generation now deterministic; fixes #4364
Diffstat (limited to 'compiler/idgen.nim')
-rw-r--r-- | compiler/idgen.nim | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/compiler/idgen.nim b/compiler/idgen.nim index 906c16546..333772705 100644 --- a/compiler/idgen.nim +++ b/compiler/idgen.nim @@ -11,7 +11,7 @@ import idents, strutils, os, options -var gFrontEndId, gBackendId*: int +var gFrontEndId*: int const debugIds* = false @@ -30,10 +30,6 @@ proc getID*(): int {.inline.} = result = gFrontEndId inc(gFrontEndId) -proc backendId*(): int {.inline.} = - result = gBackendId - inc(gBackendId) - proc setId*(id: int) {.inline.} = gFrontEndId = max(gFrontEndId, id + 1) @@ -49,7 +45,6 @@ proc toGid(f: string): string = proc saveMaxIds*(project: string) = var f = open(project.toGid, fmWrite) f.writeLine($gFrontEndId) - f.writeLine($gBackendId) f.close() proc loadMaxIds*(project: string) = @@ -61,5 +56,4 @@ proc loadMaxIds*(project: string) = if f.readLine(line): var backEndId = parseInt(line) gFrontEndId = max(gFrontEndId, frontEndId) - gBackendId = max(gBackendId, backEndId) f.close() |