diff options
author | George Marques <george@gmarqu.es> | 2020-09-01 18:26:52 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-01 18:26:52 -0300 |
commit | 8e052e1a06942816de113bfc0834eef9f5fc67a2 (patch) | |
tree | 4aa18cbea1399ffa6cda339b5b84771b5b31ee15 /modules/gdscript/gdscript_function.h | |
parent | 23ce1dbfd590341cb9439bfd04fede3f70336d0a (diff) | |
parent | 635c6a0a185e590d041f5fee8297b98ec50b24b4 (diff) | |
download | redot-engine-8e052e1a06942816de113bfc0834eef9f5fc67a2.tar.gz |
Merge pull request #41338 from vnen/gdscript-compiler-abstraction
Add GDScript code generation abstraction
Diffstat (limited to 'modules/gdscript/gdscript_function.h')
-rw-r--r-- | modules/gdscript/gdscript_function.h | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/modules/gdscript/gdscript_function.h b/modules/gdscript/gdscript_function.h index 771baf6a08..d1c98a5456 100644 --- a/modules/gdscript/gdscript_function.h +++ b/modules/gdscript/gdscript_function.h @@ -182,7 +182,6 @@ public: OPCODE_CALL_RETURN, OPCODE_CALL_ASYNC, OPCODE_CALL_BUILT_IN, - OPCODE_CALL_SELF, OPCODE_CALL_SELF_BASE, OPCODE_AWAIT, OPCODE_AWAIT_RESUME, @@ -224,6 +223,7 @@ public: private: friend class GDScriptCompiler; + friend class GDScriptByteCodeGenerator; StringName source; @@ -232,10 +232,6 @@ private: int _constant_count; const StringName *_global_names_ptr; int _global_names_count; -#ifdef TOOLS_ENABLED - const StringName *_named_globals_ptr; - int _named_globals_count; -#endif const int *_default_arg_ptr; int _default_arg_count; const int *_code_ptr; @@ -252,9 +248,6 @@ private: StringName name; Vector<Variant> constants; Vector<StringName> global_names; -#ifdef TOOLS_ENABLED - Vector<StringName> named_globals; -#endif Vector<int> default_arguments; Vector<int> code; Vector<GDScriptDataType> argument_types; @@ -344,6 +337,10 @@ public: Variant call(GDScriptInstance *p_instance, const Variant **p_args, int p_argcount, Callable::CallError &r_err, CallState *p_state = nullptr); +#ifdef DEBUG_ENABLED + void disassemble(const Vector<String> &p_code_lines) const; +#endif + _FORCE_INLINE_ MultiplayerAPI::RPCMode get_rpc_mode() const { return rpc_mode; } GDScriptFunction(); ~GDScriptFunction(); |