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:
@@ -52,7 +52,7 @@ pub fn genCode(buf: *ArrayList(u8), decl: *Decl) !void {
|
||||
const writer = buf.writer();
|
||||
|
||||
// Reserve space to write the size after generating the code
|
||||
try writer.writeAll(&([1]u8{undefined} ** 5));
|
||||
try buf.resize(5);
|
||||
|
||||
// Write the size of the locals vec
|
||||
// TODO: implement locals
|
||||
|
||||
Reference in New Issue
Block a user