mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 08:23:29 +00:00
GDScript: Adjust type of temporaries when needed
This commit is contained in:
parent
40502a1689
commit
9411bf05a4
6 changed files with 286 additions and 8 deletions
|
@ -894,6 +894,51 @@ void GDScriptFunction::disassemble(const Vector<String> &p_code_lines) const {
|
|||
|
||||
incr += 2;
|
||||
} break;
|
||||
|
||||
#define DISASSEMBLE_TYPE_ADJUST(m_v_type) \
|
||||
case OPCODE_TYPE_ADJUST_##m_v_type: { \
|
||||
text += "type adjust ("; \
|
||||
text += #m_v_type; \
|
||||
text += ") "; \
|
||||
text += DADDR(1); \
|
||||
incr += 2; \
|
||||
} break
|
||||
|
||||
DISASSEMBLE_TYPE_ADJUST(BOOL);
|
||||
DISASSEMBLE_TYPE_ADJUST(INT);
|
||||
DISASSEMBLE_TYPE_ADJUST(FLOAT);
|
||||
DISASSEMBLE_TYPE_ADJUST(STRING);
|
||||
DISASSEMBLE_TYPE_ADJUST(VECTOR2);
|
||||
DISASSEMBLE_TYPE_ADJUST(VECTOR2I);
|
||||
DISASSEMBLE_TYPE_ADJUST(RECT2);
|
||||
DISASSEMBLE_TYPE_ADJUST(RECT2I);
|
||||
DISASSEMBLE_TYPE_ADJUST(VECTOR3);
|
||||
DISASSEMBLE_TYPE_ADJUST(VECTOR3I);
|
||||
DISASSEMBLE_TYPE_ADJUST(TRANSFORM2D);
|
||||
DISASSEMBLE_TYPE_ADJUST(PLANE);
|
||||
DISASSEMBLE_TYPE_ADJUST(QUAT);
|
||||
DISASSEMBLE_TYPE_ADJUST(AABB);
|
||||
DISASSEMBLE_TYPE_ADJUST(BASIS);
|
||||
DISASSEMBLE_TYPE_ADJUST(TRANSFORM);
|
||||
DISASSEMBLE_TYPE_ADJUST(COLOR);
|
||||
DISASSEMBLE_TYPE_ADJUST(STRING_NAME);
|
||||
DISASSEMBLE_TYPE_ADJUST(NODE_PATH);
|
||||
DISASSEMBLE_TYPE_ADJUST(RID);
|
||||
DISASSEMBLE_TYPE_ADJUST(OBJECT);
|
||||
DISASSEMBLE_TYPE_ADJUST(CALLABLE);
|
||||
DISASSEMBLE_TYPE_ADJUST(SIGNAL);
|
||||
DISASSEMBLE_TYPE_ADJUST(DICTIONARY);
|
||||
DISASSEMBLE_TYPE_ADJUST(ARRAY);
|
||||
DISASSEMBLE_TYPE_ADJUST(PACKED_BYTE_ARRAY);
|
||||
DISASSEMBLE_TYPE_ADJUST(PACKED_INT32_ARRAY);
|
||||
DISASSEMBLE_TYPE_ADJUST(PACKED_INT64_ARRAY);
|
||||
DISASSEMBLE_TYPE_ADJUST(PACKED_FLOAT32_ARRAY);
|
||||
DISASSEMBLE_TYPE_ADJUST(PACKED_FLOAT64_ARRAY);
|
||||
DISASSEMBLE_TYPE_ADJUST(PACKED_STRING_ARRAY);
|
||||
DISASSEMBLE_TYPE_ADJUST(PACKED_VECTOR2_ARRAY);
|
||||
DISASSEMBLE_TYPE_ADJUST(PACKED_VECTOR3_ARRAY);
|
||||
DISASSEMBLE_TYPE_ADJUST(PACKED_COLOR_ARRAY);
|
||||
|
||||
case OPCODE_ASSERT: {
|
||||
text += "assert (";
|
||||
text += DADDR(1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue