wasm: add basic debuginfo through name section (#18130)

This commit is contained in:
l-m 2023-05-08 06:31:36 +00:00 committed by GitHub
parent 5bdf94a7bc
commit 3a06b55388
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 541 additions and 109 deletions

View file

@ -28,15 +28,15 @@ fn main() {
mut ifexpr := m.new_function('if_expr', [.i32_t], [.i64_t])
{
ifexpr.local_get(0)
ifexpr.c_if([], [.i64_t])
if_blk := ifexpr.c_if([], [.i64_t])
{
ifexpr.i64_const(5000)
}
ifexpr.c_else()
ifexpr.c_else(if_blk)
{
ifexpr.i64_const(-5000)
}
ifexpr.c_end_if()
ifexpr.c_end(if_blk)
}
m.commit(ifexpr, true)
print(m.compile().bytestr())