diff options
| author | Rémi Verschelde <remi@verschelde.fr> | 2021-05-16 22:29:32 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-16 22:29:32 +0200 |
| commit | a7421612d007b762e3a41e28df3d1f357d2fc4c6 (patch) | |
| tree | 513c033f1b0d9a6e95a2813113f15615381e6699 /modules/gdscript/gdscript_disassembler.cpp | |
| parent | 8e7b17429e9daadb9cc1db2b9dc605a6c228192e (diff) | |
| parent | ec783dd885a67467691ef3e55ca0d05151205c4c (diff) | |
Merge pull request #48767 from vnen/gdscript-builtin-static-methods
GDScript: Add support for builtin static method calls
Diffstat (limited to 'modules/gdscript/gdscript_disassembler.cpp')
| -rw-r--r-- | modules/gdscript/gdscript_disassembler.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_disassembler.cpp b/modules/gdscript/gdscript_disassembler.cpp index 789af57b4c..8a6ac04539 100644 --- a/modules/gdscript/gdscript_disassembler.cpp +++ b/modules/gdscript/gdscript_disassembler.cpp @@ -542,6 +542,28 @@ void GDScriptFunction::disassemble(const Vector<String> &p_code_lines) const { incr = 5 + argc; } break; + case OPCODE_CALL_BUILTIN_STATIC: { + Variant::Type type = (Variant::Type)_code_ptr[ip + 1 + instr_var_args]; + int argc = _code_ptr[ip + 3 + instr_var_args]; + + text += "call built-in method static "; + text += DADDR(1 + argc); + text += " = "; + text += Variant::get_type_name(type); + text += "."; + text += _global_names_ptr[_code_ptr[ip + 2 + instr_var_args]].operator String(); + text += "("; + + for (int i = 0; i < argc; i++) { + if (i > 0) { + text += ", "; + } + text += DADDR(1 + i); + } + text += ")"; + + incr += 5 + argc; + } break; case OPCODE_CALL_PTRCALL_NO_RETURN: { text += "call-ptrcall (no return) "; |