diff --git a/core/io/resource.cpp b/core/io/resource.cpp index 9fc7d1e3e54..7e8d0b43cd2 100644 --- a/core/io/resource.cpp +++ b/core/io/resource.cpp @@ -31,7 +31,6 @@ #include "resource.h" #include "core/core_string_names.h" -#include "core/error/error_macros.h" #include "core/io/file_access.h" #include "core/io/resource_loader.h" #include "core/math/math_funcs.h" @@ -85,9 +84,6 @@ void Resource::set_path(const String &p_path, bool p_take_over) { path_cache = p_path; if (!path_cache.is_empty()) { - if (p_path.ends_with("class_a.notest.gd")) { - print_line("Setting resource path to class_a.notest.gd"); - } ResourceCache::resources[path_cache] = this; } ResourceCache::lock.unlock(); diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp index 11af1748903..ff563a35b2d 100644 --- a/core/io/resource_loader.cpp +++ b/core/io/resource_loader.cpp @@ -242,7 +242,6 @@ ResourceLoader::LoadToken::~LoadToken() { } Ref ResourceLoader::_load(const String &p_path, const String &p_original_path, const String &p_type_hint, ResourceFormatLoader::CacheMode p_cache_mode, Error *r_error, bool p_use_sub_threads, float *r_progress) { - print_line("_load", p_path); load_nesting++; if (load_paths_stack->size()) { thread_load_mutex.lock(); @@ -261,14 +260,12 @@ Ref ResourceLoader::_load(const String &p_path, const String &p_origin if (!loader[i]->recognize_path(p_path, p_type_hint)) { continue; } - print_line("found a resource loader", loader[i]->get_class_name(), p_path); found = true; res = loader[i]->load(p_path, !p_original_path.is_empty() ? p_original_path : p_path, r_error, p_use_sub_threads, r_progress, p_cache_mode); if (!res.is_null()) { break; } } - print_line("end looking for resource loaders", p_path); load_paths_stack->resize(load_paths_stack->size() - 1); load_nesting--; @@ -291,14 +288,11 @@ Ref ResourceLoader::_load(const String &p_path, const String &p_origin void ResourceLoader::_thread_load_function(void *p_userdata) { ThreadLoadTask &load_task = *(ThreadLoadTask *)p_userdata; - print_line("_thread_load_function", load_task.remapped_path); - thread_load_mutex.lock(); caller_task_id = load_task.task_id; if (cleaning_tasks) { load_task.status = THREAD_LOAD_FAILED; thread_load_mutex.unlock(); - print_line("_thread_load_function aborting 1", load_task.remapped_path); return; } thread_load_mutex.unlock(); @@ -440,18 +434,12 @@ Error ResourceLoader::load_threaded_request(const String &p_path, const String & } Ref ResourceLoader::load(const String &p_path, const String &p_type_hint, ResourceFormatLoader::CacheMode p_cache_mode, Error *r_error) { - for (int i = 0; i < loader_count; i++) { - print_line("Handles GDScript:", loader[i]->handles_type("GDScript")); - } - - print_line("loading", p_path); if (r_error) { *r_error = OK; } Ref load_token = _load_start(p_path, p_type_hint, LOAD_THREAD_FROM_CURRENT, p_cache_mode); if (!load_token.is_valid()) { - print_line("load token invalid", p_path); if (r_error) { *r_error = FAILED; } @@ -463,7 +451,6 @@ Ref ResourceLoader::load(const String &p_path, const String &p_type_hi } Ref ResourceLoader::_load_start(const String &p_path, const String &p_type_hint, LoadThreadMode p_thread_mode, ResourceFormatLoader::CacheMode p_cache_mode) { - print_line("_load_start", p_path, p_cache_mode); String local_path = _validate_local_path(p_path); Ref load_token; @@ -475,7 +462,6 @@ Ref ResourceLoader::_load_start(const String &p_path, MutexLock thread_load_lock(thread_load_mutex); if (thread_load_tasks.has(local_path)) { - print_line("_load_start token already exists", p_path); load_token = Ref(thread_load_tasks[local_path].load_token); if (!load_token.is_valid()) { // The token is dying (reached 0 on another thread). @@ -483,7 +469,6 @@ Ref ResourceLoader::_load_start(const String &p_path, thread_load_tasks[local_path].load_token->clear(); } else { if (p_cache_mode != ResourceFormatLoader::CACHE_MODE_IGNORE) { - print_line("_load_start token already exists return", p_path); return load_token; } } @@ -505,7 +490,6 @@ Ref ResourceLoader::_load_start(const String &p_path, if (p_cache_mode == ResourceFormatLoader::CACHE_MODE_REUSE) { Ref existing = ResourceCache::get_ref(local_path); if (existing.is_valid()) { - print_line("existing is valid", p_path); //referencing is fine load_task.resource = existing; load_task.status = THREAD_LOAD_LOADED; @@ -528,7 +512,6 @@ Ref ResourceLoader::_load_start(const String &p_path, } run_on_current_thread = must_not_register || p_thread_mode == LOAD_THREAD_FROM_CURRENT; - print_line("_load_start run on current thread", run_on_current_thread, p_path); if (run_on_current_thread) { load_task_ptr->thread_id = Thread::get_caller_id(); diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp index adc8de833a7..94aa0770144 100644 --- a/modules/gdscript/gdscript.cpp +++ b/modules/gdscript/gdscript.cpp @@ -304,22 +304,13 @@ void GDScript::get_script_method_list(List *r_list) const { } void GDScript::_get_script_property_list(List *r_list, bool p_include_base) const { - print_line("GDSCript get_script_property list"); const GDScript *sptr = this; - print_line(this); List props; + while (sptr) { - print_line("while running"); - print_line(sptr->get_source_code()); - print_line(sptr->reloading); - print_line(sptr->member_indices.size()); - print_line(sptr->members.size()); - print_line(sptr->get_members().size()); Vector<_GDScriptMemberSort> msort; for (const KeyValue &E : sptr->member_indices) { - print_line(E.key); if (!sptr->members.has(E.key)) { - print_line("skipping"); continue; // Skip base class members. } _GDScriptMemberSort ms; @@ -339,7 +330,6 @@ void GDScript::_get_script_property_list(List *r_list, bool p_incl #endif // TOOLS_ENABLED for (const PropertyInfo &E : props) { - print_line("pushing_back", E.name); r_list->push_back(E); } @@ -697,7 +687,6 @@ void GDScript::_restore_old_static_data() { #endif Error GDScript::reload(bool p_keep_state) { - print_line("reload", this->get_script_path()); if (reloading) { return OK; } @@ -1027,7 +1016,6 @@ String GDScript::get_script_path() const { } Error GDScript::load_source_code(const String &p_path) { - print_line("load source code", p_path); if (p_path.is_empty() || p_path.begins_with("gdscript://") || ResourceLoader::get_resource_type(p_path.get_slice("::", 0)) == "PackedScene") { return OK; } @@ -2828,7 +2816,6 @@ Ref GDScriptLanguage::get_script_by_fully_qualified_name(const String /*************** RESOURCE ***************/ Ref ResourceFormatLoaderGDScript::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) { - print_line("resource format loader load", p_path); Error err; bool ignoring = p_cache_mode == CACHE_MODE_IGNORE || p_cache_mode == CACHE_MODE_IGNORE_DEEP; Ref scr = GDScriptCache::get_full_script(p_original_path, err, "", ignoring); @@ -2852,7 +2839,6 @@ void ResourceFormatLoaderGDScript::get_recognized_extensions(List *p_ext } bool ResourceFormatLoaderGDScript::handles_type(const String &p_type) const { - print_line("GDScrip resource loader handles", p_type); return (p_type == "Script" || p_type == "GDScript"); } diff --git a/modules/gdscript/gdscript_cache.cpp b/modules/gdscript/gdscript_cache.cpp index 7576be781f6..7c27127dce2 100644 --- a/modules/gdscript/gdscript_cache.cpp +++ b/modules/gdscript/gdscript_cache.cpp @@ -283,7 +283,6 @@ Ref GDScriptCache::get_shallow_script(const String &p_path, Error &r_e } Ref GDScriptCache::get_full_script(const String &p_path, Error &r_error, const String &p_owner, bool p_update_from_disk) { - print_line("get full script", p_path); MutexLock lock(singleton->mutex); if (!p_owner.is_empty()) { diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp index 29d73b1977a..13ed66710c9 100644 --- a/modules/gdscript/gdscript_compiler.cpp +++ b/modules/gdscript/gdscript_compiler.cpp @@ -30,7 +30,6 @@ #include "gdscript_compiler.h" -#include "core/string/print_string.h" #include "gdscript.h" #include "gdscript_byte_codegen.h" #include "gdscript_cache.h" @@ -2580,17 +2579,11 @@ Error GDScriptCompiler::_parse_setter_getter(GDScript *p_script, const GDScriptP // RPC info for its base classes first, then for itself, then for inner classes. // Warning: this function cannot initiate compilation of other classes, or it will result in cyclic dependency issues. Error GDScriptCompiler::_prepare_compilation(GDScript *p_script, const GDScriptParser::ClassNode *p_class, bool p_keep_state) { - print_line("prepare compilation", p_script->get_script_path()); - print_line(p_script->get_source_code()); - //print_line(p_class->extends[0]); - print_line(p_class->members.size()); if (parsed_classes.has(p_script)) { - print_line("already parsed"); return OK; } if (parsing_classes.has(p_script)) { - print_line("already parsing"); String class_name = p_class->identifier ? String(p_class->identifier->name) : p_class->fqcn; _set_error(vformat(R"(Cyclic class reference for "%s".)", class_name), p_class); return ERR_PARSE_ERROR; @@ -2719,11 +2712,8 @@ Error GDScriptCompiler::_prepare_compilation(GDScript *p_script, const GDScriptP for (int i = 0; i < p_class->members.size(); i++) { const GDScriptParser::ClassNode::Member &member = p_class->members[i]; - print_line(member.get_name()); - print_line(member.type); switch (member.type) { case GDScriptParser::ClassNode::Member::VARIABLE: { - print_line("variable"); const GDScriptParser::VariableNode *variable = member.variable; StringName name = variable->identifier->name; @@ -2766,11 +2756,9 @@ Error GDScriptCompiler::_prepare_compilation(GDScript *p_script, const GDScriptP minfo.property_info = prop_info; if (variable->is_static) { - print_line("static"); minfo.index = p_script->static_variables_indices.size(); p_script->static_variables_indices[name] = minfo; } else { - print_line("inserting"); minfo.index = p_script->member_indices.size(); p_script->member_indices[name] = minfo; p_script->members.insert(name); @@ -3186,7 +3174,6 @@ void GDScriptCompiler::_get_function_ptr_replacements(HashMapget_script_path()); err_line = -1; err_column = -1; error = ""; diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index b3b628af341..babd2c17721 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -28,7 +28,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "core/string/print_string.h" #include "gdscript.h" #include "gdscript_analyzer.h" @@ -1126,25 +1125,19 @@ static void _find_identifiers_in_base(const GDScriptCompletionIdentifier &p_base base_type = GDScriptParser::DataType(); } break; case GDScriptParser::DataType::SCRIPT: { - print_line("identifier script"); Ref