mirror of
https://github.com/godotengine/godot.git
synced 2025-10-21 00:43:46 +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:
parent
b6519d0d03
commit
c707d6fe71
6 changed files with 360 additions and 380 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue