You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
GDScript: Add names for disassembling function pointers
When instructions use function pointers, it's not possible to retrieve their original names in the disassembly. This stores the names in vectors (in debug builds) so they can be shown.
This commit is contained in:
@@ -546,7 +546,7 @@ GDScriptCodeGenerator::Address GDScriptCompiler::_parse_expression(CodeGen &code
|
||||
gen->write_call_utility(result, call->function_name, arguments);
|
||||
} else if (!call->is_super && call->callee->type == GDScriptParser::Node::IDENTIFIER && GDScriptUtilityFunctions::function_exists(call->function_name)) {
|
||||
// GDScript utility function.
|
||||
gen->write_call_gdscript_utility(result, GDScriptUtilityFunctions::get_function(call->function_name), arguments);
|
||||
gen->write_call_gdscript_utility(result, call->function_name, arguments);
|
||||
} else {
|
||||
// Regular function.
|
||||
const GDScriptParser::ExpressionNode *callee = call->callee;
|
||||
@@ -1410,7 +1410,7 @@ GDScriptCodeGenerator::Address GDScriptCompiler::_parse_match_pattern(CodeGen &c
|
||||
GDScriptCodeGenerator::Address value_length_addr = codegen.add_temporary(temp_type);
|
||||
Vector<GDScriptCodeGenerator::Address> len_args;
|
||||
len_args.push_back(p_value_addr);
|
||||
codegen.generator->write_call_gdscript_utility(value_length_addr, GDScriptUtilityFunctions::get_function("len"), len_args);
|
||||
codegen.generator->write_call_gdscript_utility(value_length_addr, "len", len_args);
|
||||
|
||||
// Test length compatibility.
|
||||
temp_type.builtin_type = Variant::BOOL;
|
||||
@@ -1508,7 +1508,7 @@ GDScriptCodeGenerator::Address GDScriptCompiler::_parse_match_pattern(CodeGen &c
|
||||
GDScriptCodeGenerator::Address value_length_addr = codegen.add_temporary(temp_type);
|
||||
Vector<GDScriptCodeGenerator::Address> func_args;
|
||||
func_args.push_back(p_value_addr);
|
||||
codegen.generator->write_call_gdscript_utility(value_length_addr, GDScriptUtilityFunctions::get_function("len"), func_args);
|
||||
codegen.generator->write_call_gdscript_utility(value_length_addr, "len", func_args);
|
||||
|
||||
// Test length compatibility.
|
||||
temp_type.builtin_type = Variant::BOOL;
|
||||
|
||||
Reference in New Issue
Block a user