From 188bba2b3cd3106e0c615e712b8f5fdd995137bb Mon Sep 17 00:00:00 2001 From: Flaviu Tamas Date: Sat, 23 May 2015 12:59:15 -0400 Subject: Clean up crc module Use better names, remove quite a bit of dead code. Change `><` to a name that's actually descriptive. --- compiler/rodwrite.nim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'compiler/rodwrite.nim') diff --git a/compiler/rodwrite.nim b/compiler/rodwrite.nim index e178b7ce6..c83e728db 100644 --- a/compiler/rodwrite.nim +++ b/compiler/rodwrite.nim @@ -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) = -- cgit 1.4.1-2-gfad0