Use a hash to keep exactly one copy of each filename around
commit274cda81f8f644c3e8b859f778e61af34fd6e776
authorH. Peter Anvin <hpa@zytor.com>
Tue, 10 May 2016 09:56:29 +0000 (10 02:56 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Tue, 10 May 2016 10:01:58 +0000 (10 03:01 -0700)
tree88d0f56e09d8600f3d9d62c0943b95138d64520b
parentb157701b17c38fe3f84aab6a43ed34d17e5c91d2
Use a hash to keep exactly one copy of each filename around

The old code for keeping track of source file name and line was
confused as hell about ownership of the strings, and it is pretty
clear we leaked that information all over the place.

Instead, use a hash table to keep a copy of each string as necessary,
and simply make references to a string pool that we keep until the end
of the assembly session.

This pool probably should be unified with the list of dependency
files, and so on, but that is for the development branch.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 files changed:
Makefile.in
Mkfiles/msvc.mak
Mkfiles/netware.mak
Mkfiles/openwcom.mak
Mkfiles/owlinux.mak
assemble.c
nasm.c
nasmlib.c
nasmlib.h
preproc-nop.c
preproc.c
srcfile.c [new file with mode: 0644]