summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_disassembler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gdscript/gdscript_disassembler.cpp')
-rw-r--r--modules/gdscript/gdscript_disassembler.cpp27
1 files changed, 15 insertions, 12 deletions
diff --git a/modules/gdscript/gdscript_disassembler.cpp b/modules/gdscript/gdscript_disassembler.cpp
index 4edabdcb40..d4f4358ac1 100644
--- a/modules/gdscript/gdscript_disassembler.cpp
+++ b/modules/gdscript/gdscript_disassembler.cpp
@@ -128,7 +128,9 @@ void GDScriptFunction::disassemble(const Vector<String> &p_code_lines) const {
text += DADDR(3);
text += " = ";
text += DADDR(1);
- text += " <operator function> ";
+ text += " ";
+ text += operator_names[_code_ptr[ip + 4]];
+ text += " ";
text += DADDR(2);
incr += 5;
@@ -230,7 +232,7 @@ void GDScriptFunction::disassemble(const Vector<String> &p_code_lines) const {
text += "set_named validated ";
text += DADDR(1);
text += "[\"";
- text += "<unknown name>";
+ text += setter_names[_code_ptr[ip + 3]];
text += "\"] = ";
text += DADDR(2);
@@ -253,7 +255,7 @@ void GDScriptFunction::disassemble(const Vector<String> &p_code_lines) const {
text += " = ";
text += DADDR(1);
text += "[\"";
- text += "<unknown name>";
+ text += getter_names[_code_ptr[ip + 3]];
text += "\"]";
incr += 4;
@@ -315,7 +317,7 @@ void GDScriptFunction::disassemble(const Vector<String> &p_code_lines) const {
text += " = ";
text += DADDR(2);
- incr += 3;
+ incr += 6;
} break;
case OPCODE_ASSIGN_TYPED_NATIVE: {
text += "assign typed native (";
@@ -398,7 +400,8 @@ void GDScriptFunction::disassemble(const Vector<String> &p_code_lines) const {
text += DADDR(1 + argc);
text += " = ";
- text += "<unknown type>(";
+ text += constructors_names[_code_ptr[ip + 3 + argc]];
+ text += "(";
for (int i = 0; i < argc; i++) {
if (i > 0) {
text += ", ";
@@ -431,7 +434,7 @@ void GDScriptFunction::disassemble(const Vector<String> &p_code_lines) const {
int instr_var_args = _code_ptr[++ip];
int argc = _code_ptr[ip + 1 + instr_var_args];
- Ref<Script> script_type = get_constant(_code_ptr[ip + argc + 2]);
+ Ref<Script> script_type = get_constant(_code_ptr[ip + argc + 2] & GDScriptFunction::ADDR_MASK);
Variant::Type builtin_type = (Variant::Type)_code_ptr[ip + argc + 4];
StringName native_type = get_global_name(_code_ptr[ip + argc + 5]);
@@ -460,7 +463,7 @@ void GDScriptFunction::disassemble(const Vector<String> &p_code_lines) const {
text += "]";
- incr += 3 + argc;
+ incr += 6 + argc;
} break;
case OPCODE_CONSTRUCT_DICTIONARY: {
int instr_var_args = _code_ptr[++ip];
@@ -687,7 +690,7 @@ void GDScriptFunction::disassemble(const Vector<String> &p_code_lines) const {
text += DADDR(2 + argc) + " = ";
text += DADDR(1) + ".";
- text += "<unknown method>";
+ text += builtin_methods_names[_code_ptr[ip + 4 + argc]];
text += "(";
@@ -725,12 +728,12 @@ void GDScriptFunction::disassemble(const Vector<String> &p_code_lines) const {
case OPCODE_CALL_UTILITY_VALIDATED: {
int instr_var_args = _code_ptr[++ip];
- text += "call-utility ";
+ text += "call-utility validated ";
int argc = _code_ptr[ip + 1 + instr_var_args];
text += DADDR(1 + argc) + " = ";
- text += "<unknown function>";
+ text += utilities_names[_code_ptr[ip + 3 + argc]];
text += "(";
for (int i = 0; i < argc; i++) {
@@ -746,12 +749,12 @@ void GDScriptFunction::disassemble(const Vector<String> &p_code_lines) const {
case OPCODE_CALL_GDSCRIPT_UTILITY: {
int instr_var_args = _code_ptr[++ip];
- text += "call-gscript-utility ";
+ text += "call-gdscript-utility ";
int argc = _code_ptr[ip + 1 + instr_var_args];
text += DADDR(1 + argc) + " = ";
- text += "<unknown function>";
+ text += gds_utilities_names[_code_ptr[ip + 3 + argc]];
text += "(";
for (int i = 0; i < argc; i++) {