mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-20 10:43:29 +00:00
change the type of opcode->type to etype_t, clean up the resulting mess, and
rename all of the opcodes to (eg) mul.f instead of MUL_F
This commit is contained in:
parent
6c91ee29f0
commit
ae9ee57666
3 changed files with 96 additions and 85 deletions
|
@ -383,7 +383,7 @@ typedef struct
|
|||
pr_opcode_e opcode;
|
||||
int priority;
|
||||
qboolean right_associative;
|
||||
def_t *type_a, *type_b, *type_c;
|
||||
etype_t type_a, type_b, type_c;
|
||||
int min_version;
|
||||
} opcode_t;
|
||||
|
||||
|
|
|
@ -751,14 +751,14 @@ emit_statement (int sline, opcode_t *op, def_t *var_a, def_t *var_b, def_t *var_
|
|||
statement->op = op->opcode;
|
||||
statement->a = var_a ? var_a->ofs : 0;
|
||||
statement->b = var_b ? var_b->ofs : 0;
|
||||
if (op->type_c == &def_void || op->right_associative) {
|
||||
if (op->type_c == ev_void || op->right_associative) {
|
||||
// ifs, gotos, and assignments don't need vars allocated
|
||||
var_c = NULL;
|
||||
statement->c = 0;
|
||||
ret = var_a;
|
||||
} else { // allocate result space
|
||||
if (!var_c)
|
||||
var_c = PR_GetTempDef (op->type_c->type, pr_scope);
|
||||
var_c = PR_GetTempDef (types[op->type_c], pr_scope);
|
||||
statement->c = var_c->ofs;
|
||||
ret = var_c;
|
||||
}
|
||||
|
|
|
@ -38,97 +38,108 @@ opcode_t *op_state;
|
|||
opcode_t *op_goto;
|
||||
|
||||
opcode_t pr_opcodes[] = {
|
||||
{"<DONE>", "DONE", OP_DONE, -1, false, &def_entity, &def_field, &def_void, PROG_ID_VERSION},
|
||||
{"<DONE>", "done", OP_DONE, -1, false, ev_entity, ev_field, ev_void, PROG_ID_VERSION},
|
||||
|
||||
{"*", "MUL_F", OP_MUL_F, 2, false, &def_float, &def_float, &def_float, PROG_ID_VERSION},
|
||||
{"*", "MUL_V", OP_MUL_V, 2, false, &def_vector, &def_vector, &def_float, PROG_ID_VERSION},
|
||||
{"*", "MUL_FV", OP_MUL_FV, 2, false, &def_float, &def_vector, &def_vector, PROG_ID_VERSION},
|
||||
{"*", "MUL_VF", OP_MUL_VF, 2, false, &def_vector, &def_float, &def_vector, PROG_ID_VERSION},
|
||||
{"*", "mul.f", OP_MUL_F, 2, false, ev_float, ev_float, ev_float, PROG_ID_VERSION},
|
||||
{"*", "mul.v", OP_MUL_V, 2, false, ev_vector, ev_vector, ev_float, PROG_ID_VERSION},
|
||||
{"*", "mul.fv", OP_MUL_FV, 2, false, ev_float, ev_vector, ev_vector, PROG_ID_VERSION},
|
||||
{"*", "mul.vf", OP_MUL_VF, 2, false, ev_vector, ev_float, ev_vector, PROG_ID_VERSION},
|
||||
|
||||
{"/", "DIV_F", OP_DIV_F, 2, false, &def_float, &def_float, &def_float, PROG_ID_VERSION},
|
||||
{"/", "div.f", OP_DIV_F, 2, false, ev_float, ev_float, ev_float, PROG_ID_VERSION},
|
||||
|
||||
{"+", "ADD_F", OP_ADD_F, 3, false, &def_float, &def_float, &def_float, PROG_ID_VERSION},
|
||||
{"+", "ADD_V", OP_ADD_V, 3, false, &def_vector, &def_vector, &def_vector, PROG_ID_VERSION},
|
||||
{"+", "ADD_S", OP_ADD_S, 3, false, &def_string, &def_string, &def_string, PROG_VERSION},
|
||||
{"+", "add.f", OP_ADD_F, 3, false, ev_float, ev_float, ev_float, PROG_ID_VERSION},
|
||||
{"+", "add.v", OP_ADD_V, 3, false, ev_vector, ev_vector, ev_vector, PROG_ID_VERSION},
|
||||
{"+", "add.s", OP_ADD_S, 3, false, ev_string, ev_string, ev_string, PROG_VERSION},
|
||||
|
||||
{"-", "SUB_F", OP_SUB_F, 3, false, &def_float, &def_float, &def_float, PROG_ID_VERSION},
|
||||
{"-", "SUB_V", OP_SUB_V, 3, false, &def_vector, &def_vector, &def_vector, PROG_ID_VERSION},
|
||||
{"-", "sub.f", OP_SUB_F, 3, false, ev_float, ev_float, ev_float, PROG_ID_VERSION},
|
||||
{"-", "sub.v", OP_SUB_V, 3, false, ev_vector, ev_vector, ev_vector, PROG_ID_VERSION},
|
||||
|
||||
{"==", "EQ_F", OP_EQ_F, 4, false, &def_float, &def_float, &def_float, PROG_ID_VERSION},
|
||||
{"==", "EQ_V", OP_EQ_V, 4, false, &def_vector, &def_vector, &def_float, PROG_ID_VERSION},
|
||||
{"==", "EQ_S", OP_EQ_S, 4, false, &def_string, &def_string, &def_float, PROG_ID_VERSION},
|
||||
{"==", "EQ_E", OP_EQ_E, 4, false, &def_entity, &def_entity, &def_float, PROG_ID_VERSION},
|
||||
{"==", "EQ_FNC", OP_EQ_FNC, 4, false, &def_function, &def_function, &def_float, PROG_ID_VERSION},
|
||||
{"==", "eq.f", OP_EQ_F, 4, false, ev_float, ev_float, ev_float, PROG_ID_VERSION},
|
||||
{"==", "eq.v", OP_EQ_V, 4, false, ev_vector, ev_vector, ev_float, PROG_ID_VERSION},
|
||||
{"==", "eq.s", OP_EQ_S, 4, false, ev_string, ev_string, ev_float, PROG_ID_VERSION},
|
||||
{"==", "eq.e", OP_EQ_E, 4, false, ev_entity, ev_entity, ev_float, PROG_ID_VERSION},
|
||||
{"==", "eq.fnc", OP_EQ_FNC, 4, false, ev_func, ev_func, ev_float, PROG_ID_VERSION},
|
||||
|
||||
{"!=", "NE_F", OP_NE_F, 4, false, &def_float, &def_float, &def_float, PROG_ID_VERSION},
|
||||
{"!=", "NE_V", OP_NE_V, 4, false, &def_vector, &def_vector, &def_float, PROG_ID_VERSION},
|
||||
{"!=", "NE_S", OP_NE_S, 4, false, &def_string, &def_string, &def_float, PROG_ID_VERSION},
|
||||
{"!=", "NE_E", OP_NE_E, 4, false, &def_entity, &def_entity, &def_float, PROG_ID_VERSION},
|
||||
{"!=", "NE_FNC", OP_NE_FNC, 4, false, &def_function, &def_function, &def_float, PROG_ID_VERSION},
|
||||
{"!=", "ne.f", OP_NE_F, 4, false, ev_float, ev_float, ev_float, PROG_ID_VERSION},
|
||||
{"!=", "ne.v", OP_NE_V, 4, false, ev_vector, ev_vector, ev_float, PROG_ID_VERSION},
|
||||
{"!=", "ne.s", OP_NE_S, 4, false, ev_string, ev_string, ev_float, PROG_ID_VERSION},
|
||||
{"!=", "ne.e", OP_NE_E, 4, false, ev_entity, ev_entity, ev_float, PROG_ID_VERSION},
|
||||
{"!=", "ne.fnc", OP_NE_FNC, 4, false, ev_func, ev_func, ev_float, PROG_ID_VERSION},
|
||||
|
||||
{"<=", "LE", OP_LE, 4, false, &def_float, &def_float, &def_float, PROG_ID_VERSION},
|
||||
{">=", "GE", OP_GE, 4, false, &def_float, &def_float, &def_float, PROG_ID_VERSION},
|
||||
{"<=", "LE_S", OP_LE_S, 4, false, &def_string, &def_string, &def_float, PROG_VERSION},
|
||||
{">=", "GE_S", OP_GE_S, 4, false, &def_string, &def_string, &def_float, PROG_VERSION},
|
||||
{"<", "LT", OP_LT, 4, false, &def_float, &def_float, &def_float, PROG_ID_VERSION},
|
||||
{">", "GT", OP_GT, 4, false, &def_float, &def_float, &def_float, PROG_ID_VERSION},
|
||||
{"<", "LT_S", OP_LT_S, 4, false, &def_string, &def_string, &def_float, PROG_VERSION},
|
||||
{">", "GT_S", OP_GT_S, 4, false, &def_string, &def_string, &def_float, PROG_VERSION},
|
||||
{"<=", "le", OP_LE, 4, false, ev_float, ev_float, ev_float, PROG_ID_VERSION},
|
||||
{">=", "ge", OP_GE, 4, false, ev_float, ev_float, ev_float, PROG_ID_VERSION},
|
||||
{"<=", "le.s", OP_LE_S, 4, false, ev_string, ev_string, ev_float, PROG_VERSION},
|
||||
{">=", "ge.s", OP_GE_S, 4, false, ev_string, ev_string, ev_float, PROG_VERSION},
|
||||
{"<", "lt", OP_LT, 4, false, ev_float, ev_float, ev_float, PROG_ID_VERSION},
|
||||
{">", "gt", OP_GT, 4, false, ev_float, ev_float, ev_float, PROG_ID_VERSION},
|
||||
{"<", "lt.s", OP_LT_S, 4, false, ev_string, ev_string, ev_float, PROG_VERSION},
|
||||
{">", "gt.s", OP_GT_S, 4, false, ev_string, ev_string, ev_float, PROG_VERSION},
|
||||
|
||||
{".", "INDIRECT", OP_LOAD_F, 1, false, &def_entity, &def_field, &def_float, PROG_ID_VERSION},
|
||||
{".", "INDIRECT", OP_LOAD_V, 1, false, &def_entity, &def_field, &def_vector, PROG_ID_VERSION},
|
||||
{".", "INDIRECT", OP_LOAD_S, 1, false, &def_entity, &def_field, &def_string, PROG_ID_VERSION},
|
||||
{".", "INDIRECT", OP_LOAD_ENT, 1, false, &def_entity, &def_field, &def_entity, PROG_ID_VERSION},
|
||||
{".", "INDIRECT", OP_LOAD_FLD, 1, false, &def_entity, &def_field, &def_field, PROG_ID_VERSION},
|
||||
{".", "INDIRECT", OP_LOAD_FNC, 1, false, &def_entity, &def_field, &def_function, PROG_ID_VERSION},
|
||||
{".", "load.f", OP_LOAD_F, 1, false, ev_entity, ev_field, ev_float, PROG_ID_VERSION},
|
||||
{".", "load.v", OP_LOAD_V, 1, false, ev_entity, ev_field, ev_vector, PROG_ID_VERSION},
|
||||
{".", "load.s", OP_LOAD_S, 1, false, ev_entity, ev_field, ev_string, PROG_ID_VERSION},
|
||||
{".", "load.ent", OP_LOAD_ENT, 1, false, ev_entity, ev_field, ev_entity, PROG_ID_VERSION},
|
||||
{".", "load.fld", OP_LOAD_FLD, 1, false, ev_entity, ev_field, ev_field, PROG_ID_VERSION},
|
||||
{".", "load.fnc", OP_LOAD_FNC, 1, false, ev_entity, ev_field, ev_func, PROG_ID_VERSION},
|
||||
|
||||
{".", "ADDRESS", OP_ADDRESS, 1, false, &def_entity, &def_field, &def_pointer, PROG_ID_VERSION},
|
||||
{".", "address", OP_ADDRESS, 1, false, ev_entity, ev_field, ev_pointer, PROG_ID_VERSION},
|
||||
|
||||
{"=", "STORE_F", OP_STORE_F, 5, true, &def_float, &def_float, &def_float, PROG_ID_VERSION},
|
||||
{"=", "STORE_V", OP_STORE_V, 5, true, &def_vector, &def_vector, &def_vector, PROG_ID_VERSION},
|
||||
{"=", "STORE_S", OP_STORE_S, 5, true, &def_string, &def_string, &def_string, PROG_ID_VERSION},
|
||||
{"=", "STORE_ENT", OP_STORE_ENT, 5, true, &def_entity, &def_entity, &def_entity, PROG_ID_VERSION},
|
||||
{"=", "STORE_FLD", OP_STORE_FLD, 5, true, &def_field, &def_field, &def_field, PROG_ID_VERSION},
|
||||
{"=", "STORE_FNC", OP_STORE_FNC, 5, true, &def_function, &def_function, &def_function, PROG_ID_VERSION},
|
||||
{"=", "store.f", OP_STORE_F, 5, true, ev_float, ev_float, ev_float, PROG_ID_VERSION},
|
||||
{"=", "store.v", OP_STORE_V, 5, true, ev_vector, ev_vector, ev_vector, PROG_ID_VERSION},
|
||||
{"=", "store.s", OP_STORE_S, 5, true, ev_string, ev_string, ev_string, PROG_ID_VERSION},
|
||||
{"=", "store.ent", OP_STORE_ENT, 5, true, ev_entity, ev_entity, ev_entity, PROG_ID_VERSION},
|
||||
{"=", "store.fld", OP_STORE_FLD, 5, true, ev_field, ev_field, ev_field, PROG_ID_VERSION},
|
||||
{"=", "store.fnc", OP_STORE_FNC, 5, true, ev_func, ev_func, ev_func, PROG_ID_VERSION},
|
||||
|
||||
{"=", "STOREP_F", OP_STOREP_F, 5, true, &def_pointer, &def_float, &def_float, PROG_ID_VERSION},
|
||||
{"=", "STOREP_V", OP_STOREP_V, 5, true, &def_pointer, &def_vector, &def_vector, PROG_ID_VERSION},
|
||||
{"=", "STOREP_S", OP_STOREP_S, 5, true, &def_pointer, &def_string, &def_string, PROG_ID_VERSION},
|
||||
{"=", "STOREP_ENT", OP_STOREP_ENT, 5, true, &def_pointer, &def_entity, &def_entity, PROG_ID_VERSION},
|
||||
{"=", "STOREP_FLD", OP_STOREP_FLD, 5, true, &def_pointer, &def_field, &def_field, PROG_ID_VERSION},
|
||||
{"=", "STOREP_FNC", OP_STOREP_FNC, 5, true, &def_pointer, &def_function, &def_function, PROG_ID_VERSION},
|
||||
{"=", "storep.f", OP_STOREP_F, 5, true, ev_pointer, ev_float, ev_float, PROG_ID_VERSION},
|
||||
{"=", "storep.v", OP_STOREP_V, 5, true, ev_pointer, ev_vector, ev_vector, PROG_ID_VERSION},
|
||||
{"=", "storep.s", OP_STOREP_S, 5, true, ev_pointer, ev_string, ev_string, PROG_ID_VERSION},
|
||||
{"=", "storep.ent", OP_STOREP_ENT, 5, true, ev_pointer, ev_entity, ev_entity, PROG_ID_VERSION},
|
||||
{"=", "storep.fld", OP_STOREP_FLD, 5, true, ev_pointer, ev_field, ev_field, PROG_ID_VERSION},
|
||||
{"=", "storep.fnc", OP_STOREP_FNC, 5, true, ev_pointer, ev_func, ev_func, PROG_ID_VERSION},
|
||||
|
||||
{"<RETURN>", "RETURN", OP_RETURN, -1, false, &def_void, &def_void, &def_void, PROG_ID_VERSION},
|
||||
{"<RETURN>", "return", OP_RETURN, -1, false, ev_void, ev_void, ev_void, PROG_ID_VERSION},
|
||||
|
||||
{"!", "NOT_F", OP_NOT_F, -1, false, &def_float, &def_void, &def_float, PROG_ID_VERSION},
|
||||
{"!", "NOT_V", OP_NOT_V, -1, false, &def_vector, &def_void, &def_float, PROG_ID_VERSION},
|
||||
{"!", "NOT_S", OP_NOT_S, -1, false, &def_string, &def_void, &def_float, PROG_ID_VERSION},
|
||||
{"!", "NOT_ENT", OP_NOT_ENT, -1, false, &def_entity, &def_void, &def_float, PROG_ID_VERSION},
|
||||
{"!", "NOT_FNC", OP_NOT_FNC, -1, false, &def_function, &def_void, &def_float, PROG_ID_VERSION},
|
||||
{"!", "not.f", OP_NOT_F, -1, false, ev_float, ev_void, ev_float, PROG_ID_VERSION},
|
||||
{"!", "not.v", OP_NOT_V, -1, false, ev_vector, ev_void, ev_float, PROG_ID_VERSION},
|
||||
{"!", "not.s", OP_NOT_S, -1, false, ev_string, ev_void, ev_float, PROG_ID_VERSION},
|
||||
{"!", "not.ent", OP_NOT_ENT, -1, false, ev_entity, ev_void, ev_float, PROG_ID_VERSION},
|
||||
{"!", "not.fnc", OP_NOT_FNC, -1, false, ev_func, ev_void, ev_float, PROG_ID_VERSION},
|
||||
|
||||
{"<IF>", "IF", OP_IF, -1, false, &def_float, &def_float, &def_void, PROG_ID_VERSION},
|
||||
{"<IFNOT>", "IFNOT", OP_IFNOT, -1, false, &def_float, &def_float, &def_void, PROG_ID_VERSION},
|
||||
{"<IF>", "if", OP_IF, -1, false, ev_float, ev_float, ev_void, PROG_ID_VERSION},
|
||||
{"<IFNOT>", "ifnot", OP_IFNOT, -1, false, ev_float, ev_float, ev_void, PROG_ID_VERSION},
|
||||
|
||||
// calls returns REG_RETURN
|
||||
{"<CALL0>", "CALL0", OP_CALL0, -1, false, &def_function, &def_void, &def_void, PROG_ID_VERSION},
|
||||
{"<CALL1>", "CALL1", OP_CALL1, -1, false, &def_function, &def_void, &def_void, PROG_ID_VERSION},
|
||||
{"<CALL2>", "CALL2", OP_CALL2, -1, false, &def_function, &def_void, &def_void, PROG_ID_VERSION},
|
||||
{"<CALL3>", "CALL3", OP_CALL3, -1, false, &def_function, &def_void, &def_void, PROG_ID_VERSION},
|
||||
{"<CALL4>", "CALL4", OP_CALL4, -1, false, &def_function, &def_void, &def_void, PROG_ID_VERSION},
|
||||
{"<CALL5>", "CALL5", OP_CALL5, -1, false, &def_function, &def_void, &def_void, PROG_ID_VERSION},
|
||||
{"<CALL6>", "CALL6", OP_CALL6, -1, false, &def_function, &def_void, &def_void, PROG_ID_VERSION},
|
||||
{"<CALL7>", "CALL7", OP_CALL7, -1, false, &def_function, &def_void, &def_void, PROG_ID_VERSION},
|
||||
{"<CALL8>", "CALL8", OP_CALL8, -1, false, &def_function, &def_void, &def_void, PROG_ID_VERSION},
|
||||
{"<CALL0>", "call0", OP_CALL0, -1, false, ev_func, ev_void, ev_void, PROG_ID_VERSION},
|
||||
{"<CALL1>", "call1", OP_CALL1, -1, false, ev_func, ev_void, ev_void, PROG_ID_VERSION},
|
||||
{"<CALL2>", "call2", OP_CALL2, -1, false, ev_func, ev_void, ev_void, PROG_ID_VERSION},
|
||||
{"<CALL3>", "call3", OP_CALL3, -1, false, ev_func, ev_void, ev_void, PROG_ID_VERSION},
|
||||
{"<CALL4>", "call4", OP_CALL4, -1, false, ev_func, ev_void, ev_void, PROG_ID_VERSION},
|
||||
{"<CALL5>", "call5", OP_CALL5, -1, false, ev_func, ev_void, ev_void, PROG_ID_VERSION},
|
||||
{"<CALL6>", "call6", OP_CALL6, -1, false, ev_func, ev_void, ev_void, PROG_ID_VERSION},
|
||||
{"<CALL7>", "call7", OP_CALL7, -1, false, ev_func, ev_void, ev_void, PROG_ID_VERSION},
|
||||
{"<CALL8>", "call8", OP_CALL8, -1, false, ev_func, ev_void, ev_void, PROG_ID_VERSION},
|
||||
|
||||
{"<STATE>", "STATE", OP_STATE, -1, false, &def_float, &def_float, &def_void, PROG_ID_VERSION},
|
||||
{"<STATE>", "state", OP_STATE, -1, false, ev_float, ev_float, ev_void, PROG_ID_VERSION},
|
||||
|
||||
{"<GOTO>", "GOTO", OP_GOTO, -1, false, &def_float, &def_void, &def_void, PROG_ID_VERSION},
|
||||
{"<GOTO>", "goto", OP_GOTO, -1, false, ev_float, ev_void, ev_void, PROG_ID_VERSION},
|
||||
|
||||
{"&&", "AND", OP_AND, 6, false, &def_float, &def_float, &def_float, PROG_ID_VERSION},
|
||||
{"||", "OR", OP_OR, 6, false, &def_float, &def_float, &def_float, PROG_ID_VERSION},
|
||||
{"&&", "and", OP_AND, 6, false, ev_float, ev_float, ev_float, PROG_ID_VERSION},
|
||||
{"||", "or", OP_OR, 6, false, ev_float, ev_float, ev_float, PROG_ID_VERSION},
|
||||
|
||||
{"&", "BITAND", OP_BITAND, 2, false, &def_float, &def_float, &def_float, PROG_ID_VERSION},
|
||||
{"|", "BITOR", OP_BITOR, 2, false, &def_float, &def_float, &def_float, PROG_ID_VERSION},
|
||||
{"&", "bitand", OP_BITAND, 2, false, ev_float, ev_float, ev_float, PROG_ID_VERSION},
|
||||
{"|", "bitor", OP_BITOR, 2, false, ev_float, ev_float, ev_float, PROG_ID_VERSION},
|
||||
};
|
||||
|
||||
static type_t *types[] = {
|
||||
&type_void,
|
||||
&type_string,
|
||||
&type_float,
|
||||
&type_vector,
|
||||
&type_entity,
|
||||
&type_field,
|
||||
&type_function,
|
||||
&type_pointer,
|
||||
};
|
||||
|
||||
statref_t *
|
||||
|
@ -168,12 +179,12 @@ PR_Statement (opcode_t * op, def_t * var_a, def_t * var_b)
|
|||
statement->op = op->opcode;
|
||||
statement->a = var_a ? var_a->ofs : 0;
|
||||
statement->b = var_b ? var_b->ofs : 0;
|
||||
if (op->type_c == &def_void || op->right_associative) {
|
||||
if (op->type_c == ev_void || op->right_associative) {
|
||||
// ifs, gotos, and assignments don't need vars allocated
|
||||
var_c = NULL;
|
||||
statement->c = 0;
|
||||
} else { // allocate result space
|
||||
var_c = PR_GetTempDef (op->type_c->type, pr_scope);
|
||||
var_c = PR_GetTempDef (types[op->type_c], pr_scope);
|
||||
statement->c = var_c->ofs;
|
||||
}
|
||||
PR_AddStatementRef (var_a, statement, 0);
|
||||
|
@ -204,16 +215,16 @@ get_key (void *_op, void *_tab)
|
|||
while (*s)
|
||||
*r++ = *s++;
|
||||
*r++ = op->priority + 2;
|
||||
*r++ = op->type_a->type->type + 2;
|
||||
*r++ = op->type_b->type->type + 2;
|
||||
*r++ = op->type_a + 2;
|
||||
*r++ = op->type_b + 2;
|
||||
*r = 0;
|
||||
} else if (tab == &opcode_priority_type_table_abc) {
|
||||
while (*s)
|
||||
*r++ = *s++;
|
||||
*r++ = op->priority + 2;
|
||||
*r++ = op->type_a->type->type + 2;
|
||||
*r++ = op->type_b->type->type + 2;
|
||||
*r++ = (op->type_c->type ? op->type_c->type->type : -1) + 2;
|
||||
*r++ = op->type_a + 2;
|
||||
*r++ = op->type_b + 2;
|
||||
*r++ = op->type_c + 2;
|
||||
*r = 0;
|
||||
} else if (tab == &opcode_table) {
|
||||
*r++ = (op->opcode & 0xff) + 2;
|
||||
|
@ -235,10 +246,10 @@ PR_Opcode_Find (const char *name, int priority, def_t *var_a, def_t *var_b, def_
|
|||
op.name = name;
|
||||
op.priority = priority;
|
||||
if (var_a && var_b && var_c) {
|
||||
op.type_a = var_a;
|
||||
op.type_b = var_b;
|
||||
op.type_c = var_c;
|
||||
if (op.type_c->type && op.type_c->type->type == ev_void)
|
||||
op.type_a = var_a->type->type;
|
||||
op.type_b = var_b->type->type;
|
||||
op.type_c = var_c->type->type;
|
||||
if (op.type_c == ev_void)
|
||||
tab = &opcode_priority_type_table_ab;
|
||||
else
|
||||
tab = &opcode_priority_type_table_abc;
|
||||
|
|
Loading…
Reference in a new issue