]> git.xonotic.org Git - xonotic/gmqcc.git/log
xonotic/gmqcc.git
11 years agoindex operator actually has 2 operands, not 0
Wolfgang (Blub) Bumiller [Sun, 11 Nov 2012 17:45:20 +0000 (18:45 +0100)]
index operator actually has 2 operands, not 0

11 years agolexer needs to fill the token for the index operator with actual content...
Wolfgang (Blub) Bumiller [Sun, 11 Nov 2012 17:31:37 +0000 (18:31 +0100)]
lexer needs to fill the token for the index operator with actual content...

11 years agoarray index opening-paren can now return TOKEN_OPERATOR, partially handled in SYA
Wolfgang (Blub) Bumiller [Sun, 11 Nov 2012 15:43:16 +0000 (16:43 +0100)]
array index opening-paren can now return TOKEN_OPERATOR, partially handled in SYA

11 years agoSY_PAREN_ constants to replace magic numbers
Wolfgang (Blub) Bumiller [Sun, 11 Nov 2012 15:36:20 +0000 (16:36 +0100)]
SY_PAREN_ constants to replace magic numbers

11 years agoget-accessor calling in ast_array_index_codegen
Wolfgang (Blub) Bumiller [Sun, 11 Nov 2012 15:32:59 +0000 (16:32 +0100)]
get-accessor calling in ast_array_index_codegen

11 years agoStore accessors in the ast_value for access from within the ast - generate accessors...
Wolfgang (Blub) Bumiller [Sun, 11 Nov 2012 15:22:09 +0000 (16:22 +0100)]
Store accessors in the ast_value for access from within the ast - generate accessors after generating all the globals to not mess up the order of globals in the output

11 years agoarray accessor function genaration
Wolfgang (Blub) Bumiller [Sun, 11 Nov 2012 15:06:27 +0000 (16:06 +0100)]
array accessor function genaration

11 years agoproperly in all situations where an array is part of a function's return type
Wolfgang (Blub) Bumiller [Sun, 11 Nov 2012 13:17:48 +0000 (14:17 +0100)]
properly in all situations where an array is part of a function's return type

11 years agoDon't allow arrays and other unsupported parameter types to be used in parameter...
Wolfgang (Blub) Bumiller [Sun, 11 Nov 2012 13:08:02 +0000 (14:08 +0100)]
Don't allow arrays and other unsupported parameter types to be used in parameter lists

11 years agoStarting to add error messages for when using array types in expressions
Wolfgang (Blub) Bumiller [Sun, 11 Nov 2012 11:32:47 +0000 (12:32 +0100)]
Starting to add error messages for when using array types in expressions

11 years agoast->ir for TYPE_ARRAY globals
Wolfgang (Blub) Bumiller [Sun, 11 Nov 2012 11:14:44 +0000 (12:14 +0100)]
ast->ir for TYPE_ARRAY globals

11 years agoneed to use ast_unref rather than ast_delete on the parsed array-size otherwise we...
Wolfgang (Blub) Bumiller [Sun, 11 Nov 2012 11:13:34 +0000 (12:13 +0100)]
need to use ast_unref rather than ast_delete on the parsed array-size otherwise we end up deleting constants

11 years agoRemoved -O3 from Makefile again
Wolfgang (Blub) Bumiller [Sun, 11 Nov 2012 10:52:05 +0000 (11:52 +0100)]
Removed -O3 from Makefile again

11 years agoadding opts_max_array_size with a default of 1024, adding some TODO errors for arrays...
Wolfgang (Blub) Bumiller [Sun, 11 Nov 2012 10:09:36 +0000 (11:09 +0100)]
adding opts_max_array_size with a default of 1024, adding some TODO errors for arrays in the AST

11 years agofor arrays, ast_value will contain several ir_values, ir_v will point to the [0]...
Wolfgang (Blub) Bumiller [Sun, 11 Nov 2012 09:51:40 +0000 (10:51 +0100)]
for arrays, ast_value will contain several ir_values, ir_v will point to the [0] element

11 years agoparse arrays
Wolfgang (Blub) Bumiller [Sun, 11 Nov 2012 09:04:57 +0000 (10:04 +0100)]
parse arrays

11 years agofirst parsing of [ - pushing temp changes
Wolfgang (Blub) Bumiller [Sat, 10 Nov 2012 20:55:56 +0000 (21:55 +0100)]
first parsing of [ - pushing temp changes

11 years ago-fadjust-vector-fields is now on by default in -std=gmqcc
Wolfgang (Blub) Bumiller [Sat, 10 Nov 2012 19:21:02 +0000 (20:21 +0100)]
-fadjust-vector-fields is now on by default in -std=gmqcc

11 years agoarray-subscript operator entries
Wolfgang (Blub) Bumiller [Sat, 10 Nov 2012 19:04:10 +0000 (20:04 +0100)]
array-subscript operator entries

11 years agoPreparing to parse arrays: adding TYPE_ARRAY and union/struct TYPE_ constants to...
Wolfgang (Blub) Bumiller [Sat, 10 Nov 2012 18:35:52 +0000 (19:35 +0100)]
Preparing to parse arrays: adding TYPE_ARRAY and union/struct TYPE_ constants to be consistent with fteqcc, filled type-arrays with their data, attempting to parse an array variable and added some error messages to the IR in case of unhandled types

11 years agoSupport non-const initialized locals
Wolfgang (Blub) Bumiller [Sat, 10 Nov 2012 15:00:32 +0000 (16:00 +0100)]
Support non-const initialized locals

11 years agoShouldn't require a 'local' keyword for local fieldpointers
Wolfgang (Blub) Bumiller [Sat, 10 Nov 2012 14:43:43 +0000 (15:43 +0100)]
Shouldn't require a 'local' keyword for local fieldpointers

11 years agoLocals of type .vector will now also properly generate all 3 locals
Wolfgang (Blub) Bumiller [Sat, 10 Nov 2012 11:44:18 +0000 (12:44 +0100)]
Locals of type .vector will now also properly generate all 3 locals

11 years agoglobals of type .vector will now properly generate 3 globals
Wolfgang (Blub) Bumiller [Sat, 10 Nov 2012 11:42:38 +0000 (12:42 +0100)]
globals of type .vector will now properly generate 3 globals

11 years agoSupport in the AST for TYPE_FIELD globals which are no actual fields
Wolfgang (Blub) Bumiller [Sat, 10 Nov 2012 11:15:59 +0000 (12:15 +0100)]
Support in the AST for TYPE_FIELD globals which are no actual fields

11 years agoadded 'var' to the keywords when not in -std=qcc, supporting 'var .float x;' in globa...
Wolfgang (Blub) Bumiller [Sat, 10 Nov 2012 11:10:30 +0000 (12:10 +0100)]
added 'var' to the keywords when not in -std=qcc, supporting 'var .float x;' in global-scope to declare a field-pointer variable without creating a field of that name

11 years ago-std=qcc now errors on C-style function syntax
Wolfgang (Blub) Bumiller [Sat, 10 Nov 2012 11:02:15 +0000 (12:02 +0100)]
-std=qcc now errors on C-style function syntax

11 years ago-std=qcc should error when the '=' is missing in a function declaration before the...
Wolfgang (Blub) Bumiller [Sat, 10 Nov 2012 11:00:45 +0000 (12:00 +0100)]
-std=qcc should error when the '=' is missing in a function declaration before the body

11 years agoRemoving old commented-out parsing code
Wolfgang (Blub) Bumiller [Sat, 10 Nov 2012 10:54:30 +0000 (11:54 +0100)]
Removing old commented-out parsing code

11 years agoMaking the = in front of function bodies optional
Wolfgang (Blub) Bumiller [Fri, 9 Nov 2012 21:57:11 +0000 (22:57 +0100)]
Making the = in front of function bodies optional

11 years agoTestcases for parameter shadowing
Wolfgang (Blub) Bumiller [Fri, 9 Nov 2012 21:56:34 +0000 (22:56 +0100)]
Testcases for parameter shadowing

11 years agonew-style syntax
Wolfgang (Blub) Bumiller [Fri, 9 Nov 2012 21:49:15 +0000 (22:49 +0100)]
new-style syntax

11 years agoEnable 'local-already-declared' check for locals even when they are functions - this...
Wolfgang (Blub) Bumiller [Fri, 9 Nov 2012 18:38:57 +0000 (19:38 +0100)]
Enable 'local-already-declared' check for locals even when they are functions - this was previously simply in the wrong 'if'

11 years agofixing a stupid typo - why doesn't any compiler warn about this crap
Wolfgang (Blub) Bumiller [Sun, 11 Nov 2012 09:12:45 +0000 (10:12 +0100)]
fixing a stupid typo - why doesn't any compiler warn about this crap

11 years agoTrash asm.c
Dale Weiler [Sat, 10 Nov 2012 21:15:53 +0000 (21:15 +0000)]
Trash asm.c

11 years agoMake warns.def and flags.def into a single opts.def.
Dale Weiler [Sat, 10 Nov 2012 21:13:09 +0000 (21:13 +0000)]
Make warns.def and flags.def into a single opts.def.

11 years agoTrash proposal, I'm not commited to this relationship anymore. Also I cannot afford...
Dale Weiler [Sat, 10 Nov 2012 21:05:46 +0000 (21:05 +0000)]
Trash proposal, I'm not commited to this relationship anymore.  Also I cannot afford a ring on this salary .. well I can, but you're a dumb bitch.

11 years agoTrash misinofmred README
Dale Weiler [Sat, 10 Nov 2012 21:02:55 +0000 (21:02 +0000)]
Trash misinofmred README

11 years agoTrash data/ (reason: see last commit)
Dale Weiler [Sat, 10 Nov 2012 20:59:58 +0000 (20:59 +0000)]
Trash data/ (reason: see last commit)

11 years agoDump old tests, test suite will take over .. It isn't activly used, just killing...
Dale Weiler [Sat, 10 Nov 2012 20:57:54 +0000 (20:57 +0000)]
Dump old tests, test suite will take over .. It isn't activly used, just killing space and looking fugly.  If required for reference, see older revisions.

11 years agoMerge branch 'master' of github.com:graphitemaster/gmqcc
Dale Weiler [Sat, 10 Nov 2012 20:54:26 +0000 (20:54 +0000)]
Merge branch 'master' of github.com:graphitemaster/gmqcc

11 years agoRemove execloop.h, we still use xmacros, but it's done with #include __FILE__ tricker...
Dale Weiler [Sat, 10 Nov 2012 20:53:37 +0000 (20:53 +0000)]
Remove execloop.h, we still use xmacros, but it's done with #include __FILE__ trickery.  Please do not kill me, it doesn't look that bad, conditional compilation is even used in eglibc like this :P

11 years agoutil_memory_r with byte=0 will now call util_memory_d and return NULL
Wolfgang (Blub) Bumiller [Sat, 10 Nov 2012 11:17:05 +0000 (12:17 +0100)]
util_memory_r with byte=0 will now call util_memory_d and return NULL

11 years agomem_r to realloc
Wolfgang (Blub) Bumiller [Sat, 10 Nov 2012 10:16:19 +0000 (11:16 +0100)]
mem_r to realloc

11 years agothe codegen has to use STORE_V for .vector, not STORE_FLD - contrary to the regular...
Wolfgang (Blub) Bumiller [Fri, 9 Nov 2012 19:11:17 +0000 (20:11 +0100)]
the codegen has to use STORE_V for .vector, not STORE_FLD - contrary to the regular global-assignment, even fteqcc gets this right, so gmqcc should too

11 years agoMerged parsing of variable and field declarations into 1 function
Wolfgang (Blub) Bumiller [Fri, 9 Nov 2012 18:04:31 +0000 (19:04 +0100)]
Merged parsing of variable and field declarations into 1 function

11 years agoDelete an explicit #define
Wolfgang (Blub) Bumiller [Tue, 6 Nov 2012 18:50:16 +0000 (19:50 +0100)]
Delete an explicit #define

11 years agogcc lost it's magic analyzer and now complains about uninitialized stuff... <sadface>
Wolfgang (Blub) Bumiller [Sun, 4 Nov 2012 10:41:44 +0000 (11:41 +0100)]
gcc lost it's magic analyzer and now complains about uninitialized stuff... <sadface>

11 years agoerror on more than 8 params for now since more need special treatment
Wolfgang (Blub) Bumiller [Fri, 2 Nov 2012 21:51:26 +0000 (22:51 +0100)]
error on more than 8 params for now since more need special treatment

11 years agoDelete the test preprocess.c file and get the use/build part out of main.c/Makefile
Wolfgang (Blub) Bumiller [Fri, 2 Nov 2012 17:59:21 +0000 (18:59 +0100)]
Delete the test preprocess.c file and get the use/build part out of main.c/Makefile

11 years agobetter test loop
Wolfgang (Blub) Bumiller [Fri, 2 Nov 2012 17:49:50 +0000 (18:49 +0100)]
better test loop

11 years agoProperly handle string and char constants when preprocessing: don't unescape and...
Wolfgang (Blub) Bumiller [Fri, 2 Nov 2012 17:48:32 +0000 (18:48 +0100)]
Properly handle string and char constants when preprocessing: don't unescape and keep surrounding quotes

11 years agoChanged the TOKEN_WHITE to contain the actual data - ie the comments
Wolfgang (Blub) Bumiller [Fri, 2 Nov 2012 17:39:32 +0000 (18:39 +0100)]
Changed the TOKEN_WHITE to contain the actual data - ie the comments

11 years agoChanged the preprocess test to reproduce the input file
Wolfgang (Blub) Bumiller [Fri, 2 Nov 2012 17:37:58 +0000 (18:37 +0100)]
Changed the preprocess test to reproduce the input file

11 years agoFinishing the preprocessing flag for the lexer, added preprocess.c to test it
Wolfgang (Blub) Bumiller [Fri, 2 Nov 2012 17:28:54 +0000 (18:28 +0100)]
Finishing the preprocessing flag for the lexer, added preprocess.c to test it

11 years ago-E switch to set opt_pp_only
Wolfgang (Blub) Bumiller [Fri, 2 Nov 2012 16:58:21 +0000 (17:58 +0100)]
-E switch to set opt_pp_only

11 years agopreprocessing flag for the lexer
Wolfgang (Blub) Bumiller [Thu, 1 Nov 2012 22:22:58 +0000 (23:22 +0100)]
preprocessing flag for the lexer

11 years agoFix a minor bug in the lexer
Wolfgang (Blub) Bumiller [Fri, 2 Nov 2012 17:30:20 +0000 (18:30 +0100)]
Fix a minor bug in the lexer

11 years ago-disasm should show builtins as builtins rather than trying to print negative stateme...
Wolfgang (Blub) Bumiller [Fri, 2 Nov 2012 11:32:13 +0000 (12:32 +0100)]
-disasm should show builtins as builtins rather than trying to print negative statements - skip function 0 since it's not a valid function

11 years ago-disasm switch for qcvm
Wolfgang (Blub) Bumiller [Fri, 2 Nov 2012 11:23:55 +0000 (12:23 +0100)]
-disasm switch for qcvm

11 years agofunctions-as-parameters testcase 0.1-rc1
Wolfgang (Blub) Bumiller [Thu, 1 Nov 2012 17:24:48 +0000 (18:24 +0100)]
functions-as-parameters testcase

11 years agoTest for entity-field-pointer function parameters
Wolfgang (Blub) Bumiller [Thu, 1 Nov 2012 17:21:53 +0000 (18:21 +0100)]
Test for entity-field-pointer function parameters

11 years agoreserve the keywords 'switch,struct,union,break,continue' - but only with std !=...
Wolfgang (Blub) Bumiller [Thu, 1 Nov 2012 13:20:58 +0000 (14:20 +0100)]
reserve the keywords 'switch,struct,union,break,continue' - but only with std != QCC - eg. id1 uses a function named 'break'

11 years agostring-literals now do not treat digraphs as digraphs
Wolfgang (Blub) Bumiller [Thu, 1 Nov 2012 13:05:14 +0000 (14:05 +0100)]
string-literals now do not treat digraphs as digraphs

11 years agoA comment/note/hint about how to deal with not-yet declared things later in past-0.2
Wolfgang (Blub) Bumiller [Wed, 31 Oct 2012 17:55:03 +0000 (18:55 +0100)]
A comment/note/hint about how to deal with not-yet declared things later in past-0.2

11 years agoinvalid-assign testcase for non-lvalue stores
Wolfgang (Blub) Bumiller [Tue, 30 Oct 2012 20:21:23 +0000 (21:21 +0100)]
invalid-assign testcase for non-lvalue stores

11 years agoIf parser_finish fails, the exit-value must also indicate an error
Wolfgang (Blub) Bumiller [Tue, 30 Oct 2012 20:20:06 +0000 (21:20 +0100)]
If parser_finish fails, the exit-value must also indicate an error

11 years agoError when lvalues are requested where that's not possible
Wolfgang (Blub) Bumiller [Tue, 30 Oct 2012 20:15:42 +0000 (21:15 +0100)]
Error when lvalues are requested where that's not possible

11 years agoActually use a di-graph in the ngraph test, and replaced the curly braces and the...
Wolfgang (Blub) Bumiller [Mon, 29 Oct 2012 13:47:11 +0000 (14:47 +0100)]
Actually use a di-graph in the ngraph test, and replaced the curly braces and the builgin-# sign

11 years agodi/trigraph testcase
Wolfgang (Blub) Bumiller [Mon, 29 Oct 2012 13:36:05 +0000 (14:36 +0100)]
di/trigraph testcase

11 years agoast_call_check_types should not check more parameters than actually available in...
Wolfgang (Blub) Bumiller [Mon, 29 Oct 2012 13:35:50 +0000 (14:35 +0100)]
ast_call_check_types should not check more parameters than actually available in both the call and the function type - fixes a crash introduced by this on variadic functions

11 years agodigraphs
Wolfgang (Blub) Bumiller [Mon, 29 Oct 2012 12:56:00 +0000 (13:56 +0100)]
digraphs

11 years agotrigraphs
Wolfgang (Blub) Bumiller [Mon, 29 Oct 2012 12:52:39 +0000 (13:52 +0100)]
trigraphs

11 years agoPulling in a rudimentary testsuite - we have to find a better solution ...
Wolfgang (Blub) Bumiller [Sun, 28 Oct 2012 18:34:39 +0000 (19:34 +0100)]
Pulling in a rudimentary testsuite - we have to find a better solution ...

11 years agoError when trying to assign variables whose types are different - with -std=qcc only...
Wolfgang (Blub) Bumiller [Sun, 28 Oct 2012 19:32:13 +0000 (20:32 +0100)]
Error when trying to assign variables whose types are different - with -std=qcc only warn when they are both functions with non-matching parameter types

11 years ago-Wassign-function-types - since in qcc you may assign functionpointers which take...
Wolfgang (Blub) Bumiller [Sun, 28 Oct 2012 19:31:35 +0000 (20:31 +0100)]
-Wassign-function-types - since in qcc you may assign functionpointers which take different parameters...

11 years agoast_type_to_string function
Wolfgang (Blub) Bumiller [Sun, 28 Oct 2012 19:30:55 +0000 (20:30 +0100)]
ast_type_to_string function

11 years agoast_store needs to take over the type of its destination
Wolfgang (Blub) Bumiller [Sun, 28 Oct 2012 19:02:57 +0000 (20:02 +0100)]
ast_store needs to take over the type of its destination

11 years agoa failing 'parse-statement' call should not print 'parse error' at all since at that...
Wolfgang (Blub) Bumiller [Sun, 28 Oct 2012 14:53:30 +0000 (15:53 +0100)]
a failing 'parse-statement' call should not print 'parse error' at all since at that point more descriptive error message has to have been printed already

11 years agoThe proper way to deal with error messages which did not cause the parser to bail...
Wolfgang (Blub) Bumiller [Sun, 28 Oct 2012 14:48:51 +0000 (15:48 +0100)]
The proper way to deal with error messages which did not cause the parser to bail out early is this, not a 'parse error'-error...

11 years agoadd error for function parameters of invalid types
Wolfgang (Blub) Bumiller [Sun, 28 Oct 2012 14:44:27 +0000 (15:44 +0100)]
add error for function parameters of invalid types

11 years agoWhen erroring while parsing a function and the function had been added to the parser...
Wolfgang (Blub) Bumiller [Sun, 28 Oct 2012 14:28:39 +0000 (15:28 +0100)]
When erroring while parsing a function and the function had been added to the parser's function list, remove it, otherwise it'll get freed again in the parser's cleanup function

11 years agoRemove the -benchmark option+code
Wolfgang (Blub) Bumiller [Sat, 27 Oct 2012 13:33:37 +0000 (15:33 +0200)]
Remove the -benchmark option+code

11 years agoDon't forget to set the _alloc in vector resize, also set _alloc back in _append...
Wolfgang (Blub) Bumiller [Tue, 9 Oct 2012 18:56:54 +0000 (20:56 +0200)]
Don't forget to set the _alloc in vector resize, also set _alloc back in _append if mem_a had failed

11 years agosome awesome documentation about CRC for future viewers
Dale Weiler [Tue, 2 Oct 2012 16:06:25 +0000 (12:06 -0400)]
some awesome documentation about CRC for future viewers

11 years agoAdd the actual crc implementation
Wolfgang (Blub) Bumiller [Tue, 2 Oct 2012 15:56:59 +0000 (17:56 +0200)]
Add the actual crc implementation

11 years agoleaving the old crc in, commented out
Wolfgang (Blub) Bumiller [Tue, 2 Oct 2012 15:54:19 +0000 (17:54 +0200)]
leaving the old crc in, commented out

11 years agoCleaner crc implementation
Wolfgang (Blub) Bumiller [Tue, 2 Oct 2012 15:51:03 +0000 (17:51 +0200)]
Cleaner crc implementation

11 years agoGenerating checksums
Wolfgang (Blub) Bumiller [Tue, 2 Oct 2012 15:09:49 +0000 (17:09 +0200)]
Generating checksums

11 years agocode_crc added, initializing to 0
Wolfgang (Blub) Bumiller [Tue, 2 Oct 2012 14:01:35 +0000 (16:01 +0200)]
code_crc added, initializing to 0

11 years agoPrint a warning if end_sys_fields was declared as a field rather than a global
Wolfgang (Blub) Bumiller [Tue, 2 Oct 2012 13:59:37 +0000 (15:59 +0200)]
Print a warning if end_sys_fields was declared as a field rather than a global

11 years agodon't warn about unused end_sys_{globals,fields}
Wolfgang (Blub) Bumiller [Tue, 2 Oct 2012 13:35:43 +0000 (15:35 +0200)]
don't warn about unused end_sys_{globals,fields}

11 years agolink with $(LIBS), so on linux you can easily add -lrt without changing the Makefile
Wolfgang (Blub) Bumiller [Tue, 2 Oct 2012 13:35:31 +0000 (15:35 +0200)]
link with $(LIBS), so on linux you can easily add -lrt without changing the Makefile

11 years agoremoving some old unused stuff from lexer.h
Wolfgang (Blub) Bumiller [Fri, 24 Aug 2012 21:21:16 +0000 (23:21 +0200)]
removing some old unused stuff from lexer.h

11 years agoforgot to put the -Werror in --help into the actual print parameter...
Wolfgang (Blub) Bumiller [Fri, 24 Aug 2012 21:18:44 +0000 (23:18 +0200)]
forgot to put the -Werror in --help into the actual print parameter...

11 years agoremove unimplemented -f flags from --help, add the implemented one
Wolfgang (Blub) Bumiller [Fri, 24 Aug 2012 21:03:52 +0000 (23:03 +0200)]
remove unimplemented -f flags from --help, add the implemented one

11 years agoAdd -Werror to the --help message
Wolfgang (Blub) Bumiller [Fri, 24 Aug 2012 21:02:27 +0000 (23:02 +0200)]
Add -Werror to the --help message

11 years agoalignment fix
Wolfgang (Blub) Bumiller [Fri, 24 Aug 2012 21:01:18 +0000 (23:01 +0200)]
alignment fix

11 years ago-benchmark option to take the time in a rather simple way
Wolfgang (Blub) Bumiller [Fri, 24 Aug 2012 21:00:47 +0000 (23:00 +0200)]
-benchmark option to take the time in a rather simple way

11 years agoetos builtin...
Wolfgang (Blub) Bumiller [Fri, 24 Aug 2012 20:58:07 +0000 (22:58 +0200)]
etos builtin...