Merge pull request #81200 from RandomShaper/gd_vm_msvc

Optimize GDScript VM codegen for MSVC
This commit is contained in:
Rémi Verschelde 2023-09-25 17:18:19 +02:00
commit 7a29189858
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 6 additions and 0 deletions

View File

@ -398,7 +398,13 @@ void (*type_init_function_table[])(Variant *) = {
#define OPCODES_END #define OPCODES_END
#define OPCODES_OUT #define OPCODES_OUT
#define DISPATCH_OPCODE continue #define DISPATCH_OPCODE continue
#ifdef _MSC_VER
#define OPCODE_SWITCH(m_test) \
__assume(m_test <= OPCODE_END); \
switch (m_test)
#else
#define OPCODE_SWITCH(m_test) switch (m_test) #define OPCODE_SWITCH(m_test) switch (m_test)
#endif
#define OPCODE_BREAK break #define OPCODE_BREAK break
#define OPCODE_OUT break #define OPCODE_OUT break
#endif #endif