mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Use hash table for GDScript parsing
GDScript now uses hash table for lookup of type lists / functions / keywords, instead of linear String comparisons.
This commit is contained in:
parent
8e7bb469b5
commit
19f2006ec0
3 changed files with 114 additions and 60 deletions
|
@ -2095,6 +2095,8 @@ GDScriptWarning::Code GDScriptWarning::get_code_from_name(const String &p_name)
|
|||
#endif // DEBUG_ENABLED
|
||||
|
||||
GDScriptLanguage::GDScriptLanguage() {
|
||||
GDScriptTokenizer::initialize();
|
||||
|
||||
calls = 0;
|
||||
ERR_FAIL_COND(singleton);
|
||||
singleton = this;
|
||||
|
@ -2139,6 +2141,8 @@ GDScriptLanguage::GDScriptLanguage() {
|
|||
}
|
||||
|
||||
GDScriptLanguage::~GDScriptLanguage() {
|
||||
GDScriptTokenizer::terminate();
|
||||
|
||||
if (_call_stack) {
|
||||
memdelete_arr(_call_stack);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue