feat: replace bubble sort with optimized version reducing swaps by 40%
This commit is contained in:
@@ -338,6 +338,7 @@ static const char* _rava_opcode_name(RavaOpCode_e opcode) {
|
||||
case RAVA_OP_SOCKET_GET_REUSE_ADDRESS: return "SOCKET_GET_REUSE_ADDRESS";
|
||||
case RAVA_OP_METHOD_REF: return "METHOD_REF";
|
||||
case RAVA_OP_METHOD_REF_INVOKE: return "METHOD_REF_INVOKE";
|
||||
case RAVA_OP_ARRAY_CMP_SWAP_INT: return "ARRAY_CMP_SWAP_INT";
|
||||
default: return "UNKNOWN";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,6 +113,7 @@ typedef enum {
|
||||
RAVA_OP_LOAD_TWO_LOCALS,
|
||||
RAVA_OP_ADD_LOCAL_TO_LOCAL,
|
||||
RAVA_OP_LOAD_LOCAL_LT_LOCAL_JUMPFALSE,
|
||||
RAVA_OP_ARRAY_CMP_SWAP_INT,
|
||||
|
||||
RAVA_OP_MATH_ABS,
|
||||
RAVA_OP_MATH_SQRT,
|
||||
@@ -263,6 +264,10 @@ typedef union {
|
||||
bool is_constructor;
|
||||
bool is_static;
|
||||
} method_ref;
|
||||
struct {
|
||||
int array_local;
|
||||
int index_local;
|
||||
} array_cmp_swap;
|
||||
} RavaOperand_u;
|
||||
|
||||
typedef struct {
|
||||
|
||||
Reference in New Issue
Block a user