1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Add ValidatedCall to MethodBind

* This should optimize GDScript function calling _enormously_.
* It also should simplify the GDScript VM considerably.

NOTE: GDExtension calling performance has most likely been affected until going via ptrcall is fixed.
This commit is contained in:
Juan Linietsky
2023-04-25 00:21:32 +02:00
parent 14c582bca8
commit 1c93606e47
31 changed files with 299 additions and 84 deletions

View File

@@ -349,13 +349,18 @@ public:
return versions[p_version]->get_stages();
}
Vector<StringName> get_version_list() const {
TypedArray<StringName> get_version_list() const {
Vector<StringName> vnames;
for (const KeyValue<StringName, Ref<RDShaderSPIRV>> &E : versions) {
vnames.push_back(E.key);
}
vnames.sort_custom<StringName::AlphCompare>();
return vnames;
TypedArray<StringName> ret;
ret.resize(vnames.size());
for (int i = 0; i < vnames.size(); i++) {
ret[i] = vnames[i];
}
return ret;
}
void set_base_error(const String &p_error) {
@@ -395,7 +400,7 @@ public:
protected:
Dictionary _get_versions() const {
Vector<StringName> vnames = get_version_list();
TypedArray<StringName> vnames = get_version_list();
Dictionary ret;
for (int i = 0; i < vnames.size(); i++) {
ret[vnames[i]] = versions[vnames[i]];