diff options
author | George Marques <george@gmarqu.es> | 2021-09-01 16:01:39 -0300 |
---|---|---|
committer | George Marques <george@gmarqu.es> | 2021-09-01 16:06:30 -0300 |
commit | 3d135880572ae863b4de250bc2da8edac701c020 (patch) | |
tree | 60a34c4a383c460547126d260a410625365f5419 /modules/gdscript/gdscript_disassembler.cpp | |
parent | a160a95ea67455c80c55da8385220d5c75a0aa60 (diff) | |
download | redot-engine-3d135880572ae863b4de250bc2da8edac701c020.tar.gz |
GDScript: Fix loading of interdependent autoloads
Move the autoload resolution to runtime by loading it into the stack
with an extra instruction. This allows an autoload to use another
autoload singleton independent of load order.
Diffstat (limited to 'modules/gdscript/gdscript_disassembler.cpp')
-rw-r--r-- | modules/gdscript/gdscript_disassembler.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_disassembler.cpp b/modules/gdscript/gdscript_disassembler.cpp index 1acb9ceddc..9287df2ea0 100644 --- a/modules/gdscript/gdscript_disassembler.cpp +++ b/modules/gdscript/gdscript_disassembler.cpp @@ -914,6 +914,14 @@ void GDScriptFunction::disassemble(const Vector<String> &p_code_lines) const { incr += 5; } break; DISASSEMBLE_ITERATE_TYPES(DISASSEMBLE_ITERATE); + case OPCODE_STORE_GLOBAL: { + text += "store global "; + text += DADDR(1); + text += " = "; + text += String::num_int64(_code_ptr[ip + 2]); + + incr += 3; + } break; case OPCODE_STORE_NAMED_GLOBAL: { text += "store named global "; text += DADDR(1); |