stage2: semaDecl properly analyzes the decl block

Also flattened out Decl TypedValue fields into
ty, val, has_tv
and add relevant fields to Decl for alignment and link section.
This commit is contained in:
Andrew Kelley
2021-04-27 18:36:12 -07:00
parent fa6bb4b662
commit f86469bc5e
16 changed files with 383 additions and 293 deletions

View File

@@ -591,7 +591,8 @@ pub const Context = struct {
}
fn genFunctype(self: *Context) InnerError!void {
const ty = self.decl.typed_value.most_recent.typed_value.ty;
assert(self.decl.has_tv);
const ty = self.decl.ty;
const writer = self.func_type_data.writer();
try writer.writeByte(wasm.function_type);