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
No known key found for this signature in database
GPG key ID: 046BD46A3201E43D
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);