diff options
Diffstat (limited to 'modules/gdscript/gdscript_byte_codegen.h')
-rw-r--r-- | modules/gdscript/gdscript_byte_codegen.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/modules/gdscript/gdscript_byte_codegen.h b/modules/gdscript/gdscript_byte_codegen.h index 7dd51845df..87772824f6 100644 --- a/modules/gdscript/gdscript_byte_codegen.h +++ b/modules/gdscript/gdscript_byte_codegen.h @@ -331,8 +331,13 @@ class GDScriptByteCodeGenerator : public GDScriptCodeGenerator { return -1; // Unreachable. } - void append(GDScriptFunction::Opcode p_code, int p_argument_count) { - opcodes.push_back((p_code & GDScriptFunction::INSTR_MASK) | (p_argument_count << GDScriptFunction::INSTR_BITS)); + void append_opcode(GDScriptFunction::Opcode p_code) { + opcodes.push_back(p_code); + } + + void append_opcode_and_argcount(GDScriptFunction::Opcode p_code, int p_argument_count) { + opcodes.push_back(p_code); + opcodes.push_back(p_argument_count); instr_args_max = MAX(instr_args_max, p_argument_count); } |