add function calling
This commit is contained in:
@@ -109,6 +109,7 @@ resets the arguments buffer to NULL
|
||||
call a function with args
|
||||
|
||||
1. the register containing the function to call. (*)
|
||||
4. the index of the source location.
|
||||
|
||||
## OP_SWAP_REGISTERS
|
||||
|
||||
|
||||
@@ -22,6 +22,12 @@ size_t translate_parsed_call(Translated *translated, ParsedCall* call, ArErr *er
|
||||
return first;
|
||||
push_instruction_byte(translated, OP_CALL);
|
||||
push_instruction_byte(translated, 0);
|
||||
push_instruction_byte(translated, OP_RESET_ARGS);
|
||||
SourceLocation source_locations = {
|
||||
call->line,
|
||||
call->column,
|
||||
1
|
||||
};
|
||||
push_instruction_code(translated, translated->source_locations.size);
|
||||
darray_push(&translated->source_locations, &source_locations);
|
||||
return first;
|
||||
}
|
||||
Reference in New Issue
Block a user