pr 58
This commit is contained in:
@@ -113,6 +113,21 @@ pub fn lower_function(
|
||||
arg_count: *arg_count
|
||||
}, None));
|
||||
}
|
||||
ir_core::Instr::ImportCall(dep_alias, module_path, symbol_name, arg_count) => {
|
||||
// Pop arguments from type stack
|
||||
for _ in 0..*arg_count {
|
||||
stack_types.pop();
|
||||
}
|
||||
// Push return type (Assume Int for v0 imports if unknown)
|
||||
stack_types.push(ir_core::Type::Int);
|
||||
|
||||
vm_func.body.push(ir_vm::Instruction::new(ir_vm::InstrKind::ImportCall {
|
||||
dep_alias: dep_alias.clone(),
|
||||
module_path: module_path.clone(),
|
||||
symbol_name: symbol_name.clone(),
|
||||
arg_count: *arg_count,
|
||||
}, None));
|
||||
}
|
||||
ir_core::Instr::HostCall(id, slots) => {
|
||||
// HostCall return types are not easily known without a registry,
|
||||
// but we now pass the number of slots.
|
||||
|
||||
Reference in New Issue
Block a user