mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-24 12:51:04 +00:00
Merge branch 'master' into cmdline
This commit is contained in:
commit
a7957a9fdc
3 changed files with 4 additions and 4 deletions
2
ast.c
2
ast.c
|
@ -404,7 +404,7 @@ void ast_call_delete(ast_call *self)
|
||||||
}
|
}
|
||||||
|
|
||||||
ast_store* ast_store_new(lex_ctx ctx, int op,
|
ast_store* ast_store_new(lex_ctx ctx, int op,
|
||||||
ast_value *dest, ast_expression *source)
|
ast_expression *dest, ast_expression *source)
|
||||||
{
|
{
|
||||||
ast_instantiate(ast_store, ctx, ast_store_delete);
|
ast_instantiate(ast_store, ctx, ast_store_delete);
|
||||||
ast_expression_init((ast_expression*)self, (ast_expression_codegen*)&ast_store_codegen);
|
ast_expression_init((ast_expression*)self, (ast_expression_codegen*)&ast_store_codegen);
|
||||||
|
|
4
ast.h
4
ast.h
|
@ -218,11 +218,11 @@ struct ast_store_s
|
||||||
{
|
{
|
||||||
ast_expression_common expression;
|
ast_expression_common expression;
|
||||||
int op;
|
int op;
|
||||||
ast_value *dest; /* When we add pointers this might have to change to expression */
|
ast_expression *dest;
|
||||||
ast_expression *source;
|
ast_expression *source;
|
||||||
};
|
};
|
||||||
ast_store* ast_store_new(lex_ctx ctx, int op,
|
ast_store* ast_store_new(lex_ctx ctx, int op,
|
||||||
ast_value *d, ast_expression *s);
|
ast_expression *d, ast_expression *s);
|
||||||
void ast_store_delete(ast_store*);
|
void ast_store_delete(ast_store*);
|
||||||
|
|
||||||
bool ast_store_codegen(ast_store*, ast_function*, bool lvalue, ir_value**);
|
bool ast_store_codegen(ast_store*, ast_function*, bool lvalue, ir_value**);
|
||||||
|
|
|
@ -42,7 +42,7 @@ do { \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
#define ASSIGN(op, a, b) \
|
#define ASSIGN(op, a, b) \
|
||||||
(ast_expression*)ast_store_new(ctx, INSTR_##op, (a), (ast_expression*)(b))
|
(ast_expression*)ast_store_new(ctx, INSTR_##op, (ast_expression*)(a), (ast_expression*)(b))
|
||||||
|
|
||||||
#define BIN(op, a, b) \
|
#define BIN(op, a, b) \
|
||||||
(ast_expression*)ast_binary_new(ctx, INSTR_##op, (ast_expression*)(a), (ast_expression*)(b))
|
(ast_expression*)ast_binary_new(ctx, INSTR_##op, (ast_expression*)(a), (ast_expression*)(b))
|
||||||
|
|
Loading…
Reference in a new issue