]>
git.rm.cloudns.org Git - xonotic/gmqcc.git/log
Wolfgang (Blub) Bumiller [Thu, 16 Aug 2012 18:49:58 +0000 (20:49 +0200)]
Don't expand frame macros when they don't have a $ prefix
Wolfgang (Blub) Bumiller [Thu, 16 Aug 2012 18:47:31 +0000 (20:47 +0200)]
Added support for some modelgen/spritegen commands
Wolfgang (Blub) Bumiller [Thu, 16 Aug 2012 18:03:53 +0000 (20:03 +0200)]
'$' is now its own token, used for modeldata
Wolfgang (Blub) Bumiller [Thu, 16 Aug 2012 14:39:43 +0000 (16:39 +0200)]
data/fields.qc now tests fieldpointer parameters - requires -std=qcc to build
Wolfgang (Blub) Bumiller [Thu, 16 Aug 2012 14:38:57 +0000 (16:38 +0200)]
CALL instructions need to offset the st++ too
Wolfgang (Blub) Bumiller [Thu, 16 Aug 2012 14:38:36 +0000 (16:38 +0200)]
Fix a possible endless loop in ir_values_overlap
Wolfgang (Blub) Bumiller [Thu, 16 Aug 2012 14:29:41 +0000 (16:29 +0200)]
entityfield tests
Wolfgang (Blub) Bumiller [Thu, 16 Aug 2012 14:28:59 +0000 (16:28 +0200)]
prog_leavefunction needs to take the ++st into account - otherwise INSTR_RETURN ends up skipping the instruction after the calling INSTR_CALL
Wolfgang (Blub) Bumiller [Thu, 16 Aug 2012 14:24:47 +0000 (16:24 +0200)]
NOT for entity, function and string - we're not constant-folding it for functions and entities right now
Wolfgang (Blub) Bumiller [Thu, 16 Aug 2012 14:21:19 +0000 (16:21 +0200)]
unary NOT operator for float and vector
Wolfgang (Blub) Bumiller [Thu, 16 Aug 2012 14:21:09 +0000 (16:21 +0200)]
even in non-qcc mode we need to search the variables for fields because of field-pointers
Wolfgang (Blub) Bumiller [Thu, 16 Aug 2012 14:07:00 +0000 (16:07 +0200)]
verbose error about unhandled operators
Wolfgang (Blub) Bumiller [Thu, 16 Aug 2012 14:06:12 +0000 (16:06 +0200)]
lexer: recognize != as operator when noops=false
Wolfgang (Blub) Bumiller [Thu, 16 Aug 2012 13:59:09 +0000 (15:59 +0200)]
Fix an error message
Wolfgang (Blub) Bumiller [Thu, 16 Aug 2012 13:31:46 +0000 (15:31 +0200)]
print a proper error message when a function lacks a body
Wolfgang (Blub) Bumiller [Thu, 16 Aug 2012 13:27:06 +0000 (15:27 +0200)]
Allow fieldpointer parameters in functions, allow function fields again
Wolfgang (Blub) Bumiller [Thu, 16 Aug 2012 13:15:46 +0000 (15:15 +0200)]
activate -Wfield-redeclared by default
Wolfgang (Blub) Bumiller [Thu, 16 Aug 2012 13:14:39 +0000 (15:14 +0200)]
allow redeclaration of fields, but warn about them
Wolfgang (Blub) Bumiller [Thu, 16 Aug 2012 13:11:03 +0000 (15:11 +0200)]
Reorganizing expression parsing to allow prefix-operators like unary minus
Wolfgang (Blub) Bumiller [Thu, 16 Aug 2012 12:24:12 +0000 (14:24 +0200)]
OP_PREFIX flag for ~ and !
Wolfgang (Blub) Bumiller [Thu, 16 Aug 2012 12:23:18 +0000 (14:23 +0200)]
unary - operator implemented, adding imm_vector_zero and imm_float_zero since those should be accessible quickly
Wolfgang (Blub) Bumiller [Thu, 16 Aug 2012 12:05:04 +0000 (14:05 +0200)]
-_- file->filename
Wolfgang (Blub) Bumiller [Thu, 16 Aug 2012 12:01:47 +0000 (14:01 +0200)]
util_fopen...
Wolfgang (Blub) Bumiller [Thu, 16 Aug 2012 11:45:45 +0000 (13:45 +0200)]
fopen -> fopen_s on windows
Wolfgang (Blub) Bumiller [Thu, 16 Aug 2012 11:44:53 +0000 (13:44 +0200)]
sscanf -> sscanf_s on windows
Wolfgang (Blub) Bumiller [Thu, 16 Aug 2012 11:01:30 +0000 (13:01 +0200)]
strcpy->memcpy in util_getline
Wolfgang (Blub) Bumiller [Thu, 16 Aug 2012 10:58:54 +0000 (12:58 +0200)]
make the 'vector' type use qcfloat instead of float
Wolfgang (Blub) Bumiller [Thu, 16 Aug 2012 10:58:26 +0000 (12:58 +0200)]
it's not undefined, stupid
Wolfgang (Blub) Bumiller [Thu, 16 Aug 2012 10:38:00 +0000 (12:38 +0200)]
cast mem_a returns in util_getline
Wolfgang (Blub) Bumiller [Thu, 16 Aug 2012 10:34:28 +0000 (12:34 +0200)]
add some missing casts to some mem_a
Wolfgang (Blub) Bumiller [Thu, 16 Aug 2012 10:32:01 +0000 (12:32 +0200)]
Shutup visual studio...
Wolfgang (Blub) Bumiller [Thu, 16 Aug 2012 10:10:24 +0000 (12:10 +0200)]
Replacing execloop.h ... wish I could just use a copy of DP's execloop, I hate licenses
Wolfgang (Blub) Bumiller [Thu, 16 Aug 2012 09:36:28 +0000 (11:36 +0200)]
include stdio.h in exec.c for snprintf...
Wolfgang (Blub) Bumiller [Thu, 16 Aug 2012 09:36:16 +0000 (11:36 +0200)]
don't try to access function-local functions outside of functions...
Wolfgang (Blub) Bumiller [Thu, 16 Aug 2012 09:34:11 +0000 (11:34 +0200)]
test for constants
Wolfgang (Blub) Bumiller [Thu, 16 Aug 2012 09:33:29 +0000 (11:33 +0200)]
assigning values to constant globals
Wolfgang (Blub) Bumiller [Wed, 15 Aug 2012 15:02:48 +0000 (17:02 +0200)]
ir.c: strcmp->memcpy
Wolfgang (Blub) Bumiller [Wed, 15 Aug 2012 15:01:16 +0000 (17:01 +0200)]
strpcy->memcpy
Wolfgang (Blub) Bumiller [Wed, 15 Aug 2012 15:01:09 +0000 (17:01 +0200)]
parser_finish needs to be called in progs.src mode as well
Wolfgang (Blub) Bumiller [Wed, 15 Aug 2012 10:13:15 +0000 (12:13 +0200)]
remove MEM_VECTOR_INIT - the memset does it all, don't give a false sense of initialization since it wasn't complete anyway
Wolfgang (Blub) Bumiller [Wed, 15 Aug 2012 10:11:45 +0000 (12:11 +0200)]
Merge branch 'master' of git://github.com/graphitemaster/gmqcc
Wolfgang (Blub) Bumiller [Wed, 15 Aug 2012 10:11:15 +0000 (12:11 +0200)]
Fix memset on the parser...
Dale Weiler [Tue, 14 Aug 2012 23:06:53 +0000 (19:06 -0400)]
gmqcc now builds on visual studio
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 21:53:55 +0000 (23:53 +0200)]
Adding another test qc file, for constant folding
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 21:52:57 +0000 (23:52 +0200)]
bit-and const-fold should use bitand not bitor
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 21:50:49 +0000 (23:50 +0200)]
constant folding for bit and logic ops, added some macros to shorten the code (by a lot)
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 21:43:08 +0000 (23:43 +0200)]
const folding for division
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 20:51:05 +0000 (22:51 +0200)]
constant folding for +, - and *
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 20:34:20 +0000 (22:34 +0200)]
get rid of more duplicate code
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 20:31:08 +0000 (22:31 +0200)]
Allow multiple fields to be declared using comma
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 18:00:11 +0000 (20:00 +0200)]
vector fields now get _x, _y and _z too
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 17:30:03 +0000 (19:30 +0200)]
progs.src mode added
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 15:48:22 +0000 (17:48 +0200)]
combine 2 ifs to shorten code a little
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 15:44:14 +0000 (17:44 +0200)]
-= operator
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 15:36:20 +0000 (17:36 +0200)]
error message replacement
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 15:35:02 +0000 (17:35 +0200)]
fixing ast_binstore_codegen's lvalue flag setting, now += on entfields works correctly
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 15:30:55 +0000 (17:30 +0200)]
+= operator implemented
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 15:27:52 +0000 (17:27 +0200)]
make the += operator use binstore actually, currently it was acting like a regular plus
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 15:27:26 +0000 (17:27 +0200)]
replacing lots of error messages
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 15:17:35 +0000 (17:17 +0200)]
shush typo
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 15:08:00 +0000 (17:08 +0200)]
different warning message
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 14:59:14 +0000 (16:59 +0200)]
another -Wextensions situation: -std=qcc has no for loops
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 14:53:18 +0000 (16:53 +0200)]
Pushing my current testcode
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 14:48:20 +0000 (16:48 +0200)]
fix wrong count on IF/IFNOT jumps
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 14:42:29 +0000 (16:42 +0200)]
fixup do-while parsing, expect a semicolon afterwards
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 14:38:11 +0000 (16:38 +0200)]
do-while loops
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 14:26:42 +0000 (16:26 +0200)]
parsewarning() now gets GMQCC_WARN since parsewarning returns whether or not the warning was treated as an error, thus we need to bail if it returns true
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 14:22:38 +0000 (16:22 +0200)]
the 'local' keyword now also introduces the declaration of a local variable
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 14:20:39 +0000 (16:20 +0200)]
flags and warnings not printed anymore without -dump
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 14:19:23 +0000 (16:19 +0200)]
-dump option, by default the IR is not dumped anymore
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 14:17:09 +0000 (16:17 +0200)]
-Wextensions for -std=qcc: warn about missing 'local' keyword when declaring a variable without it
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 14:16:32 +0000 (16:16 +0200)]
-Wextensions on by default
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 14:14:26 +0000 (16:14 +0200)]
eof after parsing the semicolon of a function declaration shouldn't be an error...
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 14:12:12 +0000 (16:12 +0200)]
Getting rid of some debug output
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 14:10:17 +0000 (16:10 +0200)]
'local' becomes a keyword
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 12:38:02 +0000 (14:38 +0200)]
allow a semicolon after function bodies - make it mandatory with -std=qcc
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 12:19:44 +0000 (14:19 +0200)]
actually print the prototype's file+line, not the current one
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 12:14:56 +0000 (14:14 +0200)]
type comparison, function prototypes
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 11:50:55 +0000 (13:50 +0200)]
the error about an already-declared variable should display the place its been previously declared at
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 11:15:55 +0000 (13:15 +0200)]
removed redundant error+file+line in parseerror()
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 11:14:32 +0000 (13:14 +0200)]
removing all direct 'printfs' from ast and ir, replaced by the error interface
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 10:17:34 +0000 (12:17 +0200)]
it's .file, not .name'
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 10:17:08 +0000 (12:17 +0200)]
renamign 'errtype' to 'msgtype' here... makes more sense... plus I had it on the paramlist :P
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 10:15:05 +0000 (12:15 +0200)]
oops... removing wrongly placed semicolons
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 10:06:28 +0000 (12:06 +0200)]
error-print functions which take lex_ctx
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 10:00:09 +0000 (12:00 +0200)]
And a colon for the colored version too ...
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 09:54:48 +0000 (11:54 +0200)]
Add a colon after the linenumber
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 09:54:27 +0000 (11:54 +0200)]
don't add the general 'parse error' message if an error has already been printed
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 09:54:06 +0000 (11:54 +0200)]
used the wrong va_list there... why didn't gcc warn about this being uninitialized...
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 09:34:07 +0000 (11:34 +0200)]
Working towards a saner error-output system, adding -Werror
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 08:57:09 +0000 (10:57 +0200)]
remove now unused files
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 08:42:34 +0000 (10:42 +0200)]
Merge branch 'master' into blub/parser
Wolfgang (Blub) Bumiller [Tue, 14 Aug 2012 08:40:48 +0000 (10:40 +0200)]
ast_binstore, used for +=, -=, ++, -- etc
Wolfgang (Blub) Bumiller [Mon, 13 Aug 2012 17:54:53 +0000 (19:54 +0200)]
storing generated values and returning them early if they exist - will error when that doesn't make sense eg when trying to call codegen ast_ifthen more than once
Wolfgang (Blub) Bumiller [Mon, 13 Aug 2012 17:40:06 +0000 (19:40 +0200)]
initialize ast_expression_common.outl/outr
Wolfgang (Blub) Bumiller [Mon, 13 Aug 2012 17:39:35 +0000 (19:39 +0200)]
prototypes for ast_binstore, and storing outl/outr in ast_expression_common, TODO: let ast_codegen functions reuse previous results so that binstore can call codegen twice
Wolfgang (Blub) Bumiller [Mon, 13 Aug 2012 15:10:13 +0000 (17:10 +0200)]
while, for
Wolfgang (Blub) Bumiller [Mon, 13 Aug 2012 14:45:35 +0000 (16:45 +0200)]
factored out 'if' parsing code into a function, added 'while' parsing, and errors for more unsupported operators
Wolfgang (Blub) Bumiller [Mon, 13 Aug 2012 13:33:32 +0000 (15:33 +0200)]
Even more operators
Wolfgang (Blub) Bumiller [Mon, 13 Aug 2012 13:25:40 +0000 (15:25 +0200)]
Merge branch 'master' into blub/parser