fn emit_event(bytecode: &mut Vec<u8>, module: &ir::Module, index: usize, arg_count: usize) {
if module.events.get(index).is_some() {
emit_event_payload(bytecode, arg_count);
}
}
fn emit_event_by_name(bytecode: &mut Vec<u8>, _name: &str, arg_count: usize) {
emit_event_payload(bytecode, arg_count);
}
fn emit_event_payload(bytecode: &mut Vec<u8>, arg_count: usize) {
let total_bigint = BigInt::from(arg_count);
push_integer_bigint(bytecode, &total_bigint);
bytecode.push(0xC0); if arg_count > 1 {
bytecode.push(0x4A); bytecode.push(0xD1); }
bytecode.push(0x50); emit_syscall(bytecode, "System.Runtime.Notify");
}