stage2/wasm: write exports on flush, cleanup

Exports now have a dirty flag and are rewritten on flush if this flag
has been set.

A couple other minor changes have been made based on Andrew's review.
This commit is contained in:
Isaac Freund
2020-08-16 02:21:20 +02:00
parent 97300896ed
commit 60fb50ee5a
5 changed files with 42 additions and 35 deletions

View File

@@ -974,7 +974,7 @@ pub fn update(self: *Module) !void {
}
// This is needed before reading the error flags.
try self.bin_file.flush();
try self.bin_file.flush(self);
self.link_error_flags = self.bin_file.errorFlags();