mirror of
https://github.com/godotengine/godot.git
synced 2025-10-22 17:33:33 +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:
parent
c707d6fe71
commit
1ad5c926dc
5 changed files with 77 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue