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 committed 2020-11-21 13:24:49 -03:00
1 parent c707d6fe71
commit 1ad5c926dc
5 files changed
+77 -3

No files matched your search

@@ -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);