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

GDScript: Add faster operator for known types

It now uses the direct operator function pointer, which increases
performance in evaluation.
This commit is contained in:
George Marques
2020-11-13 16:47:45 -03:00
parent c707d6fe71
commit 1ad5c926dc
5 changed files with 77 additions and 3 deletions

View File

@@ -136,6 +136,17 @@ void GDScriptFunction::disassemble(const Vector<String> &p_code_lines) const {
incr += 5;
} break;
case OPCODE_OPERATOR_VALIDATED: {
text += "validated operator ";
text += DADDR(3);
text += " = ";
text += DADDR(1);
text += " <operator function> ";
text += DADDR(2);
incr += 5;
} break;
case OPCODE_EXTENDS_TEST: {
text += "is object ";
text += DADDR(3);