pr 43
This commit is contained in:
@@ -145,9 +145,9 @@ pub enum OpCode {
|
||||
|
||||
// --- 6.6 Functions ---
|
||||
|
||||
/// Calls a function at a specific address.
|
||||
/// Operands: addr (u32), args_count (u32)
|
||||
/// Stack: [arg0, arg1, ...] -> [return_value]
|
||||
/// Calls a function by its index in the function table.
|
||||
/// Operand: func_id (u32)
|
||||
/// Stack: [arg0, arg1, ...] -> [return_slots...]
|
||||
Call = 0x50,
|
||||
/// Returns from the current function.
|
||||
/// Stack: [return_val] -> [return_val]
|
||||
|
||||
@@ -250,7 +250,10 @@ fn validate_module(module: &BytecodeModule) -> Result<(), LoadError> {
|
||||
OpCode::PushBool => {
|
||||
pos += 1;
|
||||
}
|
||||
OpCode::Call | OpCode::Alloc => {
|
||||
OpCode::Call => {
|
||||
pos += 4;
|
||||
}
|
||||
OpCode::Alloc => {
|
||||
pos += 8;
|
||||
}
|
||||
_ => {}
|
||||
|
||||
Reference in New Issue
Block a user