wasm shell + destructuring
This commit is contained in:
@@ -728,6 +728,14 @@ pub const LLVMEmitter = struct {
|
||||
const llvm_ty = self.toLLVMType(instruction.ty);
|
||||
self.mapRef(c.LLVMBuildLoad2(self.builder, llvm_ty, llvm_global, "gload"));
|
||||
},
|
||||
.global_addr => |gid| {
|
||||
const llvm_global = self.global_map.get(gid.index()) orelse {
|
||||
self.mapRef(c.LLVMGetUndef(self.cached_ptr));
|
||||
return;
|
||||
};
|
||||
// Return the global's address directly (no load)
|
||||
self.mapRef(llvm_global);
|
||||
},
|
||||
.func_ref => |fid| {
|
||||
// Produce a reference to the function as a function pointer value
|
||||
if (self.func_map.get(@intFromEnum(fid))) |llvm_func| {
|
||||
|
||||
Reference in New Issue
Block a user