mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
GDScript: Add disassembling implicit and lambda functions
This commit is contained in:
@@ -110,11 +110,13 @@ class GDScript : public Script {
|
||||
HashMap<StringName, MethodInfo> _signals;
|
||||
Dictionary rpc_config;
|
||||
|
||||
public:
|
||||
struct LambdaInfo {
|
||||
int capture_count;
|
||||
bool use_self;
|
||||
};
|
||||
|
||||
private:
|
||||
HashMap<GDScriptFunction *, LambdaInfo> lambda_info;
|
||||
|
||||
public:
|
||||
@@ -163,10 +165,11 @@ private:
|
||||
void _add_doc(const DocData::ClassDoc &p_inner_class);
|
||||
#endif
|
||||
|
||||
GDScriptFunction *implicit_initializer = nullptr;
|
||||
GDScriptFunction *initializer = nullptr; //direct pointer to new , faster to locate
|
||||
GDScriptFunction *implicit_ready = nullptr;
|
||||
GDScriptFunction *static_initializer = nullptr;
|
||||
GDScriptFunction *initializer = nullptr; // Direct pointer to `new()`/`_init()` member function, faster to locate.
|
||||
|
||||
GDScriptFunction *implicit_initializer = nullptr; // `@implicit_new()` special function.
|
||||
GDScriptFunction *implicit_ready = nullptr; // `@implicit_ready()` special function.
|
||||
GDScriptFunction *static_initializer = nullptr; // `@static_initializer()` special function.
|
||||
|
||||
Error _static_init();
|
||||
void _static_default_init(); // Initialize static variables with default values based on their types.
|
||||
@@ -257,9 +260,15 @@ public:
|
||||
CRASH_COND(!member_indices.has(p_member));
|
||||
return member_indices[p_member].data_type;
|
||||
}
|
||||
const HashMap<StringName, GDScriptFunction *> &get_member_functions() const { return member_functions; }
|
||||
const Ref<GDScriptNativeClass> &get_native() const { return native; }
|
||||
|
||||
_FORCE_INLINE_ const HashMap<StringName, GDScriptFunction *> &get_member_functions() const { return member_functions; }
|
||||
_FORCE_INLINE_ const HashMap<GDScriptFunction *, LambdaInfo> &get_lambda_info() const { return lambda_info; }
|
||||
|
||||
_FORCE_INLINE_ const GDScriptFunction *get_implicit_initializer() const { return implicit_initializer; }
|
||||
_FORCE_INLINE_ const GDScriptFunction *get_implicit_ready() const { return implicit_ready; }
|
||||
_FORCE_INLINE_ const GDScriptFunction *get_static_initializer() const { return static_initializer; }
|
||||
|
||||
RBSet<GDScript *> get_dependencies();
|
||||
HashMap<GDScript *, RBSet<GDScript *>> get_all_dependencies();
|
||||
RBSet<GDScript *> get_must_clear_dependencies();
|
||||
|
||||
Reference in New Issue
Block a user