Clean up crc module

Use better names, remove quite a bit of dead code.
Change `><` to a name that's actually descriptive.
This commit is contained in:
Flaviu Tamas 2015-05-23 12:59:15 -04:00
commit 188bba2b3c
5 changed files with 30 additions and 76 deletions

View file

@ -20,7 +20,7 @@ import
type
TRodWriter = object of TPassContext
module: PSym
crc: TCrc32
crc: SecureHash
options: TOptions
defines: string
inclDeps: string
@ -38,7 +38,7 @@ type
PRodWriter = ref TRodWriter
proc newRodWriter(crc: TCrc32, module: PSym): PRodWriter
proc newRodWriter(crc: SecureHash, module: PSym): PRodWriter
proc addModDep(w: PRodWriter, dep: string)
proc addInclDep(w: PRodWriter, dep: string)
proc addInterfaceSym(w: PRodWriter, s: PSym)
@ -62,7 +62,7 @@ proc fileIdx(w: PRodWriter, filename: string): int =
template filename*(w: PRodWriter): string =
w.module.filename
proc newRodWriter(crc: TCrc32, module: PSym): PRodWriter =
proc newRodWriter(crc: SecureHash, module: PSym): PRodWriter =
new(result)
result.sstack = @[]
result.tstack = @[]
@ -96,7 +96,7 @@ proc addInclDep(w: PRodWriter, dep: string) =
var resolved = dep.findModule(w.module.info.toFullPath)
encodeVInt(fileIdx(w, dep), w.inclDeps)
add(w.inclDeps, " ")
encodeVInt(crcFromFile(resolved), w.inclDeps)
encodeVInt(secureHashFile(resolved), w.inclDeps)
add(w.inclDeps, rodNL)
proc pushType(w: PRodWriter, t: PType) =