You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
GDScript: Gather instructions arguments beforehand
Almost all instructions need variant arguments. With this change they are loaded in an array before each instruction call. This makes the addressing code be localized to less places, improving compilation overhead and binary size by a small margin. This should not affect performance.
This commit is contained in:
@@ -139,31 +139,13 @@ void GDScriptFunction::debug_get_stack_member_state(int p_line, List<Pair<String
|
||||
}
|
||||
}
|
||||
|
||||
GDScriptFunction::GDScriptFunction() :
|
||||
function_list(this) {
|
||||
_stack_size = 0;
|
||||
_call_size = 0;
|
||||
rpc_mode = MultiplayerAPI::RPC_MODE_DISABLED;
|
||||
GDScriptFunction::GDScriptFunction() {
|
||||
name = "<anonymous>";
|
||||
#ifdef DEBUG_ENABLED
|
||||
_func_cname = nullptr;
|
||||
|
||||
{
|
||||
MutexLock lock(GDScriptLanguage::get_singleton()->lock);
|
||||
|
||||
GDScriptLanguage::get_singleton()->function_list.add(&function_list);
|
||||
}
|
||||
|
||||
profile.call_count = 0;
|
||||
profile.self_time = 0;
|
||||
profile.total_time = 0;
|
||||
profile.frame_call_count = 0;
|
||||
profile.frame_self_time = 0;
|
||||
profile.frame_total_time = 0;
|
||||
profile.last_frame_call_count = 0;
|
||||
profile.last_frame_self_time = 0;
|
||||
profile.last_frame_total_time = 0;
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user