]>
git.rm.cloudns.org Git - xonotic/gmqcc.git/log
Wolfgang (Blub) Bumiller [Sun, 2 Dec 2012 12:03:20 +0000 (13:03 +0100)]
Copy the real test output to ternary-fte.tmpl
Dale Weiler [Sun, 2 Dec 2012 12:01:36 +0000 (12:01 +0000)]
Fixes
Dale Weiler [Sun, 2 Dec 2012 11:21:31 +0000 (11:21 +0000)]
Merge branch 'master' of github.com:graphitemaster/gmqcc
Dale Weiler [Sun, 2 Dec 2012 11:21:01 +0000 (11:21 +0000)]
Improved testsuite diagnostics
Wolfgang (Blub) Bumiller [Sun, 2 Dec 2012 10:58:15 +0000 (11:58 +0100)]
Remove an unused variable qc_stof
Dale Weiler [Sun, 2 Dec 2012 10:57:04 +0000 (10:57 +0000)]
Fix testsuite
Wolfgang (Blub) Bumiller [Sun, 2 Dec 2012 10:56:20 +0000 (11:56 +0100)]
Fix ternary operator entry for -std=gmqcc
Wolfgang (Blub) Bumiller [Sun, 2 Dec 2012 10:52:11 +0000 (11:52 +0100)]
Updating ternary testcase to use -fcorrect-ternary - added fte-style test as well for it
Dale Weiler [Sun, 2 Dec 2012 04:30:46 +0000 (04:30 +0000)]
added __STD_VERSION_[MINOR/MAJOR]__, and vec_upload
Wolfgang (Blub) Bumiller [Sat, 1 Dec 2012 22:23:00 +0000 (23:23 +0100)]
Fix a type size bug: non-var locals overlapped with var locals, that was bad
Wolfgang (Blub) Bumiller [Sat, 1 Dec 2012 22:14:52 +0000 (23:14 +0100)]
Remove unused omit-nullbytes code in code.c
Wolfgang (Blub) Bumiller [Sat, 1 Dec 2012 20:19:33 +0000 (21:19 +0100)]
Removed -fomit-null-bytes
Wolfgang (Blub) Bumiller [Sat, 1 Dec 2012 15:39:29 +0000 (16:39 +0100)]
Some of the output types were superfluous; others are now put into a function to take care of it
Wolfgang (Blub) Bumiller [Sat, 1 Dec 2012 15:11:04 +0000 (16:11 +0100)]
Add some more output and field types so you can now properly call 'get_a_function_which_gives_a_function()()()' without return values getting lost
Wolfgang (Blub) Bumiller [Sat, 1 Dec 2012 14:54:13 +0000 (15:54 +0100)]
stof builtin #9
Wolfgang (Blub) Bumiller [Sat, 1 Dec 2012 14:23:40 +0000 (15:23 +0100)]
function pointer's output types need to be set for the IR to know
Wolfgang (Blub) Bumiller [Sat, 1 Dec 2012 14:23:04 +0000 (15:23 +0100)]
More info in qcvm -printfuns
Wolfgang (Blub) Bumiller [Sat, 1 Dec 2012 12:42:16 +0000 (13:42 +0100)]
-fcorrect-ternary; by default -std=fteqcc now uses fteqcc's wrong ternary precedence parsing
Wolfgang (Blub) Bumiller [Sat, 1 Dec 2012 11:36:54 +0000 (12:36 +0100)]
Sanity check for -Wternary-precedence
Wolfgang (Blub) Bumiller [Sat, 1 Dec 2012 11:35:46 +0000 (12:35 +0100)]
-Wternary-precedence; *sight* this is tough
Wolfgang (Blub) Bumiller [Sat, 1 Dec 2012 10:43:54 +0000 (11:43 +0100)]
Generate extparams on calls too since the to-be-called function needs not be generated first after all
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 23:50:04 +0000 (00:50 +0100)]
More ternary fixes
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 23:36:24 +0000 (00:36 +0100)]
Offsetting builtins so we can use 'if builtin!=0' as condition but also allow a '#0' builtin
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 23:34:18 +0000 (00:34 +0100)]
Upping the default max-array-limit *sigh*
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 23:33:07 +0000 (00:33 +0100)]
and 'const' is a keyword, not an ident
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 23:32:18 +0000 (00:32 +0100)]
var const / const var - both need to be allowed
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 23:31:00 +0000 (00:31 +0100)]
some SYA fix; adding optional variable parsing to the head of a switch block
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 20:51:18 +0000 (21:51 +0100)]
skipwhite bugfix
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 20:34:49 +0000 (21:34 +0100)]
bodyless loops still have to loop
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 20:31:19 +0000 (21:31 +0100)]
changing parse_statement_or_block to return a bool and put the output block into a pointer, so that NULL can still be possible
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 20:25:18 +0000 (21:25 +0100)]
apparently #0 is a valid builtin number, used for some NULL funcs
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 20:22:48 +0000 (21:22 +0100)]
prepare fields before generating globals so we avoid the need for relocating initialized fieldpointers
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 20:11:12 +0000 (21:11 +0100)]
field constants - revert globals generated after fields
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 20:03:57 +0000 (21:03 +0100)]
remember if an ast_value is a field-declaration, build fields before globals
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 19:40:48 +0000 (20:40 +0100)]
additional info in an internal error
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 19:33:40 +0000 (20:33 +0100)]
Use the field parameter type on the raw paramter type list for their sizes.
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 19:20:13 +0000 (20:20 +0100)]
qcvm -printfuns; prog_section_function.nargs is now signed as fteqcc sets builtins with varargs to have -1 params
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 17:21:14 +0000 (18:21 +0100)]
Adding opts.def as dep to everything which has gmqcc.h as dep
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 17:19:26 +0000 (18:19 +0100)]
All ir_instrs now get their lex-context, so that we can create an LNO file with -flno
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 16:28:46 +0000 (17:28 +0100)]
increase the ridiculously low size limit on lex-pragma parameters
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 15:28:09 +0000 (16:28 +0100)]
update other value/const check for array indexing
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 15:25:18 +0000 (16:25 +0100)]
Don't treat initialized non-consts as static array indices
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 15:23:42 +0000 (16:23 +0100)]
Keeping track of numbers for debugging
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 15:23:34 +0000 (16:23 +0100)]
out-of-bounds indexing check on static array indexing
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 14:53:53 +0000 (15:53 +0100)]
We can now reintroduce the 'preprocessor-directives only after newlines' rule correctly
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 14:44:45 +0000 (15:44 +0100)]
Ignore modelgen commands with lex->flags.preprocessing
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 14:43:18 +0000 (15:43 +0100)]
Wrong condition *sigh*
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 14:41:01 +0000 (15:41 +0100)]
Still have to parse ahead though
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 14:40:19 +0000 (15:40 +0100)]
Don't expand macros inside #if 0 at _all_
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 14:38:03 +0000 (15:38 +0100)]
Don't produce 'unknown token' errors in preprocessing mode
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 14:26:14 +0000 (15:26 +0100)]
Don't try to add a slash to actual filenames, only paths...
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 14:20:23 +0000 (15:20 +0100)]
Don't try to compile an empty output from the preprocessor
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 13:47:55 +0000 (14:47 +0100)]
remove array-field without parens warning since it seems to not be broken in fteqcc anymore
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 13:46:56 +0000 (14:46 +0100)]
Fix indentation of compile_warning
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 13:42:18 +0000 (14:42 +0100)]
lex_ctx of a return will be at the return keyword now
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 13:37:54 +0000 (14:37 +0100)]
revert 1 of the error messages
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 13:37:23 +0000 (14:37 +0100)]
Keep track of the beginning of a block
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 13:30:25 +0000 (14:30 +0100)]
mark vectors as used when their members are used
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 13:22:00 +0000 (14:22 +0100)]
fteqcc's \{number\} string control sequences
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 13:18:45 +0000 (14:18 +0100)]
fteqcc like \[ and \] in strings
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 13:18:15 +0000 (14:18 +0100)]
lexer: hex sequences with \x and fteqcc-specific handling if one-digit sequences and <, -, and > sequences
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 13:05:25 +0000 (14:05 +0100)]
Set the full const/var qualifier; only generate warnings about unimplemented functions if they have no qualifier at all
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 12:47:28 +0000 (13:47 +0100)]
don't just store a 'bool constant' in the ast/ir, store the complete qualifier: 'int cvq', moved CV_ defines into gmqcc.h
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 11:37:46 +0000 (12:37 +0100)]
Remove the 'warnreturn' parameter in some parser functions
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 11:35:33 +0000 (12:35 +0100)]
Actually generate the missing return instruction
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 11:28:51 +0000 (12:28 +0100)]
ast_loop with no condition and no incrementor are 'for(;;)' and need to loop endlessly instead of once...
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 11:23:27 +0000 (12:23 +0100)]
Still need to generate the jump...
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 11:21:10 +0000 (12:21 +0100)]
ast_ifthen will not create dead blocks anymore
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 11:11:36 +0000 (12:11 +0100)]
actually removing -Wmissing-return-values from parser.c and enabling the ast code for it
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 10:59:03 +0000 (11:59 +0100)]
Fix a wrong vec_remove in the tailcall pass
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 10:55:32 +0000 (11:55 +0100)]
don't use vec_size but _vec_end in _vec_remove, since using it on an empty vector is an error anyway; this causes a warning about vec_pop doing an effect-less memmove so vec_pop now doesn't use vec_remove anymore actually
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 10:47:35 +0000 (11:47 +0100)]
print the number of performed optimizations after compiling
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 10:15:57 +0000 (11:15 +0100)]
Also print the numeric -O flag which would enable an optimization when listing optimizations via -Ohelp
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 10:12:53 +0000 (11:12 +0100)]
Importing tail-recursion optimization
Wolfgang (Blub) Bumiller [Fri, 30 Nov 2012 10:05:58 +0000 (11:05 +0100)]
-O now, additionally to taking a number, can work like -W and -f to take an actual optimization name
Wolfgang (Blub) Bumiller [Wed, 28 Nov 2012 18:18:11 +0000 (19:18 +0100)]
moving opts_warn and opts_werror to con.c
Wolfgang (Blub) Bumiller [Wed, 28 Nov 2012 18:16:35 +0000 (19:16 +0100)]
qcvm didn't compile since moving the compile messages to con.c due to undefined references - fixed now
Wolfgang (Blub) Bumiller [Mon, 26 Nov 2012 15:12:40 +0000 (16:12 +0100)]
generic compile_error/compile_warning functions in con.c, issuing end-of-non-void warning from within the ast now
Wolfgang (Blub) Bumiller [Mon, 26 Nov 2012 13:12:56 +0000 (14:12 +0100)]
Checking in test for nested ternaries; this is more a test of the ast than the parser
Wolfgang (Blub) Bumiller [Mon, 26 Nov 2012 13:05:31 +0000 (14:05 +0100)]
Fix a small typo
Dale Weiler [Mon, 26 Nov 2012 11:12:06 +0000 (11:12 +0000)]
Remove trailing whitespace for Blub.
Dale Weiler [Mon, 26 Nov 2012 02:12:50 +0000 (02:12 +0000)]
opval is asserted .. need (void) to hide warning when NDEBUG
Dale Weiler [Mon, 26 Nov 2012 00:21:16 +0000 (00:21 +0000)]
fast optimized murmur hash with crc seeding, literally zero collision, and roughly only 52 instructions
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 23:15:07 +0000 (00:15 +0100)]
operator &~= must not cause the generated binstore to free the destination twice
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 22:54:15 +0000 (23:54 +0100)]
Same as earlier: remember the outgoing block of a condition in a ternary since it could be different due to shortened logic
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 22:51:39 +0000 (23:51 +0100)]
ast_breakcont_codegen: error when a target is missing instead of segfaulting trying to access it anyway
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 22:50:42 +0000 (23:50 +0100)]
endlessloops don't have any other block which could be a continue-target-block, so use the body itself to not continue to NULL
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 22:48:29 +0000 (23:48 +0100)]
ir_function_create_block now takes a lex_ctx instead of copying from the function; ast_ternary: need to remember the _end_ block of the 2 expressions because that's where the jump is actually supposed to be
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 22:35:49 +0000 (23:35 +0100)]
don't set the request-Lvalue flag for an array index
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 22:35:31 +0000 (23:35 +0100)]
Don't add redeclared globals a second time
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 22:32:00 +0000 (23:32 +0100)]
more verbose errors in the ast when an ir-create fails
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 22:28:47 +0000 (23:28 +0100)]
Another case for -fassign-function-types
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 22:27:48 +0000 (23:27 +0100)]
introducing -fassign-function-types, previously guarded by std==qcc this is now the flag to cause a warning (-Wassign-function-types) instead of an error when assigning functions of wrong types
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 22:24:39 +0000 (23:24 +0100)]
fix a lexer error which parsed !! as one operator
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 21:57:11 +0000 (22:57 +0100)]
__builtin_debug_printtype directive... helped me down tracking a bug: parsing typedeffed types in parameter lists properly now
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 21:40:35 +0000 (22:40 +0100)]
Only check the ast-type of a switch case, not if it's an ACTUAL constant, fteqcc doesn't either... grrr
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 21:38:52 +0000 (22:38 +0100)]
actually handle unary plus...
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 21:35:41 +0000 (22:35 +0100)]
Allow float constants which start with a dot
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 21:26:28 +0000 (22:26 +0100)]
Ah right, 'var' is not an actual keyword, support TOKEN_IDENT-var inside functions
Wolfgang (Blub) Bumiller [Sun, 25 Nov 2012 21:16:08 +0000 (22:16 +0100)]
Use the correct default cv-qualifier on locals