aboutsummaryrefslogtreecommitdiff
path: root/src/arch/wasm/CodeGen.zig
diff options
context:
space:
mode:
authorJakub Konka <kubkon@jakubkonka.com>2022-02-08 18:05:54 +0100
committerJakub Konka <kubkon@jakubkonka.com>2022-02-08 21:00:07 +0100
commit9981b3fd2f7ab85146efa9feebe08a795411d131 (patch)
tree426608bca102609dd4e4926179b01b68af7b4081 /src/arch/wasm/CodeGen.zig
parentf50203c83667ed3ad0c57fdc953322a5f9c221ac (diff)
downloadzig-9981b3fd2f7ab85146efa9feebe08a795411d131.tar.gz
zig-9981b3fd2f7ab85146efa9feebe08a795411d131.zip
stage2: tiny improvements all over the place
* pass more x64 behavior tests * return with a TODO error when lowering a decl with no runtime bits * insert some debug logs for tracing recursive descent down the type-value tree when lowering types * print `Decl`'s name when print debugging `decl_ref` value
Diffstat (limited to 'src/arch/wasm/CodeGen.zig')
-rw-r--r--src/arch/wasm/CodeGen.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/arch/wasm/CodeGen.zig b/src/arch/wasm/CodeGen.zig
index 9f0736f055..0361d4ffdd 100644
--- a/src/arch/wasm/CodeGen.zig
+++ b/src/arch/wasm/CodeGen.zig
@@ -970,6 +970,8 @@ pub const DeclGen = struct {
/// Generates the wasm bytecode for the declaration belonging to `Context`
fn genTypedValue(self: *DeclGen, ty: Type, val: Value) InnerError!Result {
+ log.debug("genTypedValue: ty = {}, val = {}", .{ ty, val });
+
const writer = self.code.writer();
if (val.isUndef()) {
try writer.writeByteNTimes(0xaa, @intCast(usize, ty.abiSize(self.target())));