#endif /*! _MSC_VER */
#define GMQCC_VERSION_MAJOR 0
-#define GMQCC_VERSION_MINOR 3
+#define GMQCC_VERSION_MINOR 4
#define GMQCC_VERSION_PATCH 0
#define GMQCC_VERSION_BUILD(J,N,P) (((J)<<16)|((N)<<8)|(P))
#define GMQCC_VERSION \
GMQCC_VERSION_BUILD(GMQCC_VERSION_MAJOR, GMQCC_VERSION_MINOR, GMQCC_VERSION_PATCH)
/* Undefine the following on a release-tag: */
-/*#define GMQCC_VERSION_TYPE_DEVEL*/
+#define GMQCC_VERSION_TYPE_DEVEL
/* Full version string in case we need it */
#ifdef GMQCC_VERSION_TYPE_DEVEL
* Creating this causes IR blocks to be marked as 'final'.
* No-Return-Call
*/
- VINSTR_NRCALL
+ VINSTR_NRCALL,
+
+ /* Emulated instructions. */
+ VINSTR_BITAND_V, /* BITAND_V must be the first emulated bitop */
+ VINSTR_BITAND_VF,
+ VINSTR_BITOR_V,
+ VINSTR_BITOR_VF,
+ VINSTR_BITXOR,
+ VINSTR_BITXOR_V,
+ VINSTR_BITXOR_VF /* BITXOR_VF must be the last emulated bitop */
};
/* TODO: elide */
typedef struct {
prog_section_statement_t *statements;
int *linenums;
+ int *columnnums;
prog_section_def_t *defs;
prog_section_field_t *fields;
prog_section_function_t *functions;
qcint_t string_cached_empty;
} code_t;
+/*
+ * A shallow copy of a lex_file to remember where which ast node
+ * came from.
+ */
+typedef struct {
+ const char *file;
+ size_t line;
+ size_t column;
+} lex_ctx_t;
+
/*
* code_write -- writes out the compiled file
* code_init -- prepares the code file
void code_cleanup (code_t *);
uint32_t code_genstring (code_t *, const char *string);
qcint_t code_alloc_field (code_t *, size_t qcsize);
-void code_push_statement(code_t *, prog_section_statement_t *stmt, int linenum);
+void code_push_statement(code_t *, prog_section_statement_t *stmt, lex_ctx_t ctx);
void code_pop_statement (code_t *);
-/*
- * A shallow copy of a lex_file to remember where which ast node
- * came from.
- */
-typedef struct {
- const char *file;
- size_t line;
- size_t column;
-} lex_ctx_t;
/*===================================================================*/
/*============================ con.c ================================*/