}
bool fold::immediate_true(ast_value *v) {
- switch (v->expression.vtype) {
+ switch (v->vtype) {
case TYPE_FLOAT:
return !!v->constval.vfloat;
case TYPE_INTEGER:
return true;
err:
con_out("failed to generate global %s\n", cur->name);
- ir_builder_delete(ir);
+ delete ir;
return false;
}
char name[32];
util_snprintf(name, sizeof(name), "dotranslate_%zu", m_parser->translated++);
out = ast_value_new(ctx(), name, TYPE_STRING);
- out->expression.flags |= AST_FLAG_INCLUDE_DEF; /* def needs to be included for translatables */
+ out->flags |= AST_FLAG_INCLUDE_DEF; /* def needs to be included for translatables */
} else {
out = ast_value_new(ctx(), "#IMMEDIATE", TYPE_STRING);
}
ast_expression *out;
++opts_optimizationcount[OPTIM_VECTOR_COMPONENTS];
out = (ast_expression*)ast_member_new(ctx(), (ast_expression*)sel, set[0]-'x', nullptr);
- out->node.keep_node = false;
+ out->keep_node = false;
((ast_member*)out)->rvalue = true;
if (x != -1.0f)
return (ast_expression*)ast_binary_new(ctx(), INSTR_MUL_F, constgen_float(x, false), out);