]> git.rm.cloudns.org Git - xonotic/gmqcc.git/log
xonotic/gmqcc.git
11 years agoBump to patch level 2 graphitemaster/v0.2-closed 0.2.2
Wolfgang Bumiller [Thu, 27 Dec 2012 13:44:54 +0000 (14:44 +0100)]
Bump to patch level 2

11 years agofix segfault from previous cherry-pick
Wolfgang Bumiller [Thu, 27 Dec 2012 13:43:31 +0000 (14:43 +0100)]
fix segfault from previous cherry-pick

11 years agoActually generate the vector member ir_values in ir_function_finalize, since ir_build...
Wolfgang Bumiller [Tue, 25 Dec 2012 22:51:29 +0000 (23:51 +0100)]
Actually generate the vector member ir_values in ir_function_finalize, since ir_builder_gen_global is too late / happens after life ranges; this should fix -Ooverlap-locals

Conflicts:
ir.c

11 years agomanpage: -dump, -dumpfin
Wolfgang Bumiller [Wed, 26 Dec 2012 18:37:55 +0000 (19:37 +0100)]
manpage: -dump, -dumpfin

11 years agoAnother bool->int fix; now clang-compiled gmqcc actually works...
Wolfgang Bumiller [Thu, 27 Dec 2012 13:33:58 +0000 (14:33 +0100)]
Another bool->int fix; now clang-compiled gmqcc actually works...

11 years agoBump version to 0.2.1 0.2.1
Wolfgang Bumiller [Sun, 23 Dec 2012 20:58:14 +0000 (21:58 +0100)]
Bump version to 0.2.1

11 years agoEven safer vector macros
Wolfgang Bumiller [Sun, 23 Dec 2012 19:55:15 +0000 (20:55 +0100)]
Even safer vector macros

11 years agoFixing vector macros
Wolfgang Bumiller [Sun, 23 Dec 2012 19:49:50 +0000 (20:49 +0100)]
Fixing vector macros

11 years agoDon't generate vector defs if the vector's name starts with a # because that's an... 0.2
Wolfgang Bumiller [Sun, 23 Dec 2012 09:14:25 +0000 (10:14 +0100)]
Don't generate vector defs if the vector's name starts with a # because that's an 'IMMEDIATE'

11 years agoWhitespace
Dale Weiler [Sun, 23 Dec 2012 09:10:31 +0000 (09:10 +0000)]
Whitespace

11 years agoRevert "Whitespace fixes"
Dale Weiler [Sun, 23 Dec 2012 09:10:07 +0000 (09:10 +0000)]
Revert "Whitespace fixes"

This reverts commit 4580dcf1eacfce517e95b654b73d6e72db366273.

11 years agoWhitespace fixes
Dale Weiler [Sun, 23 Dec 2012 08:42:53 +0000 (08:42 +0000)]
Whitespace fixes

11 years agoLies ... damned lies, all lies I tell you ... copy-pasta lies!
Dale Weiler [Sun, 23 Dec 2012 08:17:05 +0000 (08:17 +0000)]
Lies ... damned lies, all lies I tell you ... copy-pasta lies!

11 years agoActually fix the segfault this time
Dale Weiler [Sun, 23 Dec 2012 08:08:05 +0000 (08:08 +0000)]
Actually fix the segfault this time

11 years agocon_default_out for opts.pp_only (removes recently added TODO .. and fixes a segfault)
Dale Weiler [Sun, 23 Dec 2012 07:57:06 +0000 (07:57 +0000)]
con_default_out for opts.pp_only (removes recently added TODO .. and fixes a segfault)

11 years agoMake compiler and virtual-machine compile as C++ code, also removed gmqcc_voidptr...
Dale Weiler [Sun, 23 Dec 2012 07:51:19 +0000 (07:51 +0000)]
Make compiler and virtual-machine compile as C++ code, also removed gmqcc_voidptr hack.

11 years agoRemove parser_compile_string_len, and make parser_compiler_string take an additional...
Dale Weiler [Sun, 23 Dec 2012 07:22:15 +0000 (07:22 +0000)]
Remove parser_compile_string_len, and make parser_compiler_string take an additional length argument.

11 years agofix comments
Dale Weiler [Sun, 23 Dec 2012 07:19:49 +0000 (07:19 +0000)]
fix comments

11 years agofixes, and removed a #pragma warning(disable ...) in MSVC .. thanks to the FILE wrapp...
Dale Weiler [Sun, 23 Dec 2012 07:18:00 +0000 (07:18 +0000)]
fixes, and removed a #pragma warning(disable ...) in MSVC .. thanks to the FILE wrapping interface.

11 years agoCleanup flexible array / vector system
Dale Weiler [Sun, 23 Dec 2012 07:14:16 +0000 (07:14 +0000)]
Cleanup flexible array / vector system

11 years agoMerge branch 'master' of github.com:graphitemaster/gmqcc
Dale Weiler [Sun, 23 Dec 2012 06:06:57 +0000 (06:06 +0000)]
Merge branch 'master' of github.com:graphitemaster/gmqcc

11 years agoWrapper around FILE to take advantage of MSVC "secure" CRT. We don't actually defend...
Dale Weiler [Sun, 23 Dec 2012 06:05:22 +0000 (06:05 +0000)]
Wrapper around FILE to take advantage of MSVC "secure" CRT.  We don't actually defend bounds checks (we just hack in the few ones to silent MSVC .. and to pass WinRT "native code" rules)

11 years agoMore stuff for qcvm -info
Wolfgang Bumiller [Sat, 22 Dec 2012 22:30:52 +0000 (23:30 +0100)]
More stuff for qcvm -info

11 years agoMakefile: lexer.o depends on lexer.h
Wolfgang Bumiller [Sat, 22 Dec 2012 19:43:59 +0000 (20:43 +0100)]
Makefile: lexer.o depends on lexer.h

11 years agoguard ]] with lex->flags.noops
Wolfgang Bumiller [Sat, 22 Dec 2012 19:41:02 +0000 (20:41 +0100)]
guard ]] with lex->flags.noops

11 years agofix -fshort-logic to cast to true boolean values
Wolfgang Bumiller [Sat, 22 Dec 2012 19:05:15 +0000 (20:05 +0100)]
fix -fshort-logic to cast to true boolean values

11 years agomanpage: capital section headings, updated -fcorrect-logic description, added -Wunkno...
Wolfgang Bumiller [Sat, 22 Dec 2012 17:19:51 +0000 (18:19 +0100)]
manpage: capital section headings, updated -fcorrect-logic description, added -Wunknown-attribute

11 years ago-Wunknown-attribute; and don't error on unknown attributes
Wolfgang Bumiller [Sat, 22 Dec 2012 17:16:41 +0000 (18:16 +0100)]
-Wunknown-attribute; and don't error on unknown attributes

11 years ago'noreturn' is now an attribute and parsed as [[noreturn]]
Wolfgang Bumiller [Sat, 22 Dec 2012 17:09:33 +0000 (18:09 +0100)]
'noreturn' is now an attribute and parsed as [[noreturn]]

11 years agoproperly fill the token string for TOKEN_ATTRIBUTE_*
Wolfgang Bumiller [Sat, 22 Dec 2012 17:09:17 +0000 (18:09 +0100)]
properly fill the token string for TOKEN_ATTRIBUTE_*

11 years ago is now no keyword anymore
Wolfgang Bumiller [Sat, 22 Dec 2012 17:03:43 +0000 (18:03 +0100)]
 is now no keyword anymore

11 years agoLexer: [[ and ]] are now TOKEN_ATTRIBUTE_{OPEN,CLOSE}
Wolfgang Bumiller [Sat, 22 Dec 2012 17:00:51 +0000 (18:00 +0100)]
Lexer: [[ and ]] are now TOKEN_ATTRIBUTE_{OPEN,CLOSE}

11 years agoTest cases for -fcorrect-logic
Wolfgang Bumiller [Sat, 22 Dec 2012 16:55:55 +0000 (17:55 +0100)]
Test cases for -fcorrect-logic

11 years agoAdding truth-flags testsuite for strings
Wolfgang Bumiller [Sat, 22 Dec 2012 16:36:06 +0000 (17:36 +0100)]
Adding truth-flags testsuite for strings

11 years ago-ffalse-empty-strings in && and ||
Wolfgang Bumiller [Sat, 22 Dec 2012 16:31:31 +0000 (17:31 +0100)]
-ffalse-empty-strings in && and ||

11 years ago-fcorrect-logic now handles only vectors
Wolfgang Bumiller [Sat, 22 Dec 2012 16:18:37 +0000 (17:18 +0100)]
-fcorrect-logic now handles only vectors

11 years agoError when using both -ffalse-empty-strings and -ftrue-empty-strings
Wolfgang Bumiller [Sat, 22 Dec 2012 15:50:09 +0000 (16:50 +0100)]
Error when using both -ffalse-empty-strings and -ftrue-empty-strings

11 years agoFix a bug with -fperl-logic and -fcorrect-logic
Wolfgang Bumiller [Sat, 22 Dec 2012 15:25:19 +0000 (16:25 +0100)]
Fix a bug with -fperl-logic and -fcorrect-logic

11 years agoFix: ast_value.cvq must be an int, not a bool;
Wolfgang Bumiller [Sat, 22 Dec 2012 11:30:03 +0000 (12:30 +0100)]
Fix: ast_value.cvq must be an int, not a bool;

Fixes #62

11 years agoCleanups and make compile with clang again with no warnings.
Dale Weiler [Sat, 22 Dec 2012 08:22:50 +0000 (08:22 +0000)]
Cleanups and make compile with clang again with no warnings.

11 years agocleanups and fixes that cppcheck found
Dale Weiler [Sat, 22 Dec 2012 08:07:54 +0000 (08:07 +0000)]
cleanups and fixes that cppcheck found

11 years agoMore cleanups
Dale Weiler [Sat, 22 Dec 2012 07:54:14 +0000 (07:54 +0000)]
More cleanups

11 years agoRemove more unused code
Dale Weiler [Sat, 22 Dec 2012 07:46:43 +0000 (07:46 +0000)]
Remove more unused code

11 years agoMake gmqcc binary smaller (by removing some useless code)
Dale Weiler [Sat, 22 Dec 2012 07:40:17 +0000 (07:40 +0000)]
Make gmqcc binary smaller (by removing some useless code)

11 years agoStick to one hash function (no platform optimized versions)
Dale Weiler [Sat, 22 Dec 2012 07:33:11 +0000 (07:33 +0000)]
Stick to one hash function (no platform optimized versions)

11 years agoCleanups
Dale Weiler [Sat, 22 Dec 2012 07:24:25 +0000 (07:24 +0000)]
Cleanups

11 years agoWindows stuff for visual studio now offical works with exception to colorized output...
Dale Weiler [Fri, 21 Dec 2012 11:13:16 +0000 (06:13 -0500)]
Windows stuff for visual studio now offical works with exception to colorized output to cmd (which actually should work). As well as the testsuite which lacks implementations of task_popen/task_pclose.

11 years ago-Opeephole now also reduces CALL stores
Wolfgang Bumiller [Fri, 21 Dec 2012 10:42:23 +0000 (11:42 +0100)]
-Opeephole now also reduces CALL stores

11 years agoRename ir_function_pass_tailcall->tailrecursion; Take -fadjust-vector-fields into...
Wolfgang Bumiller [Fri, 21 Dec 2012 10:33:44 +0000 (11:33 +0100)]
Rename ir_function_pass_tailcall->tailrecursion; Take -fadjust-vector-fields into account when storing field type return-values from functions

11 years agomanpage: -Wcpp; added a FILES section which contains gmqcc.ini.example - we should...
Wolfgang Bumiller [Fri, 21 Dec 2012 10:02:36 +0000 (11:02 +0100)]
manpage: -Wcpp; added a FILES section which contains gmqcc.ini.example - we should install this to some DATADIR in the install make target

11 years agotestsuite compiles on windows now (but doesn't work). Still need to implement bidire...
Dale Weiler [Fri, 21 Dec 2012 06:59:34 +0000 (01:59 -0500)]
testsuite compiles on windows now (but doesn't work).  Still need to implement bidirectional piping on stdout/stderr/stdin.. Which for some reason is incredibly stupidly complicated on windows.  You need to setup SECURITY_ATTRIBUTES for each handle, do crazy handle duplication, and forking via CreateThread.  Meanwhile the whole "concept" of threading is entierly broken in fundamental design on windows, which means you constantly need to store the current process handles for backup, and "inherit" from child process.  It's just stupid, provide unix pipes via close/open and dup.  Like normal people (they're simple and sane).

11 years agoGet gmqcc/qcvm compiling on windows again. Plus work in progress support for the...
Dale Weiler [Fri, 21 Dec 2012 06:00:51 +0000 (01:00 -0500)]
Get gmqcc/qcvm compiling on windows again.  Plus work in progress support for the testsuite on windows (does not compile yet).

11 years agoImplemented preprocessing error directive tests (should fail)
Dale Weiler [Fri, 21 Dec 2012 04:48:01 +0000 (04:48 +0000)]
Implemented preprocessing error directive tests (should fail)

11 years agoDocument ini.example
Dale Weiler [Fri, 21 Dec 2012 04:01:47 +0000 (04:01 +0000)]
Document ini.example

11 years agoUpdate ini.example (added UNREACHABLE_CODE, and CPP) as warning options
Dale Weiler [Fri, 21 Dec 2012 03:14:31 +0000 (03:14 +0000)]
Update ini.example (added UNREACHABLE_CODE, and CPP) as warning options

11 years agoadded -Wcpp (for turning off cpp warnings defined with #warning like GCC/clang/pathsc...
Dale Weiler [Fri, 21 Dec 2012 03:12:58 +0000 (03:12 +0000)]
added -Wcpp (for turning off cpp warnings defined with #warning like GCC/clang/pathscale .. no more [-Wunused-variable])

11 years agoImplemented #warning and #error preprocessor directives, they're functionally equival...
Dale Weiler [Fri, 21 Dec 2012 03:08:21 +0000 (03:08 +0000)]
Implemented #warning and #error preprocessor directives, they're functionally equivalent to CPPs (supporting both string constant and non-string constant versions).  Warnings however are printed with a [-Wunused-variable] which isn't correct (TODO: allow systematic changes of -W paramaters in relation to warning fields for preprocessor directives.

11 years agoMerge branch 'master' of github.com:graphitemaster/gmqcc
Dale Weiler [Thu, 20 Dec 2012 23:07:33 +0000 (23:07 +0000)]
Merge branch 'master' of github.com:graphitemaster/gmqcc

11 years agoImplemented roboust compile-time endianess check.
Dale Weiler [Thu, 20 Dec 2012 23:07:06 +0000 (23:07 +0000)]
Implemented roboust compile-time endianess check.

11 years agoRemove old tempalloc code; disable -Olocaltemps for now
Wolfgang Bumiller [Thu, 20 Dec 2012 22:52:54 +0000 (23:52 +0100)]
Remove old tempalloc code; disable -Olocaltemps for now

11 years agoBe more correct with sizes; use a better local-alloc strategy
Wolfgang Bumiller [Thu, 20 Dec 2012 22:48:41 +0000 (23:48 +0100)]
Be more correct with sizes; use a better local-alloc strategy

11 years agominor: fix ast_function_label
Wolfgang Bumiller [Thu, 20 Dec 2012 22:27:23 +0000 (23:27 +0100)]
minor: fix ast_function_label

11 years agoFix util_endianswap; and endianswap the LNO data as well
Wolfgang Bumiller [Thu, 20 Dec 2012 21:03:51 +0000 (22:03 +0100)]
Fix util_endianswap; and endianswap the LNO data as well

11 years agoDon't check for is_return but for final at the end of a function so that if 'goto...
Wolfgang Bumiller [Thu, 20 Dec 2012 20:05:29 +0000 (21:05 +0100)]
Don't check for is_return but for final at the end of a function so that if 'goto' is the last expression we don't try to append a return

11 years ago*sigh*
Wolfgang Bumiller [Thu, 20 Dec 2012 19:57:05 +0000 (20:57 +0100)]
*sigh*

11 years agono need to check the array, the 2nd NOT is a NOT_F
Wolfgang Bumiller [Thu, 20 Dec 2012 19:56:49 +0000 (20:56 +0100)]
no need to check the array, the 2nd NOT is a NOT_F

11 years agomanpage: -fcorrect-logic, -ftrue-empty-strings, -ffalse-empty-strings
Wolfgang Bumiller [Thu, 20 Dec 2012 19:56:08 +0000 (20:56 +0100)]
manpage: -fcorrect-logic, -ftrue-empty-strings, -ffalse-empty-strings

11 years agofix -fcorrect-logic to use double-not instead of a single one - wow that was a bad one
Wolfgang Bumiller [Thu, 20 Dec 2012 19:55:56 +0000 (20:55 +0100)]
fix -fcorrect-logic to use double-not instead of a single one - wow that was a bad one

11 years agoTestcases for -ftrue-empty-strings and -ffalse-empty-strings
Wolfgang Bumiller [Thu, 20 Dec 2012 19:43:58 +0000 (20:43 +0100)]
Testcases for -ftrue-empty-strings and -ffalse-empty-strings

11 years agoFix the -fcorrect-logic condition
Wolfgang Bumiller [Thu, 20 Dec 2012 19:40:59 +0000 (20:40 +0100)]
Fix the -fcorrect-logic condition

11 years agoFix -fcorrect-logic
Wolfgang Bumiller [Thu, 20 Dec 2012 19:33:05 +0000 (20:33 +0100)]
Fix -fcorrect-logic

11 years agofix a leak in the local-allocator
Wolfgang Bumiller [Thu, 20 Dec 2012 19:26:54 +0000 (20:26 +0100)]
fix a leak in the local-allocator

11 years agoFix a leak: free code_linenums
Wolfgang Bumiller [Thu, 20 Dec 2012 19:26:14 +0000 (20:26 +0100)]
Fix a leak: free code_linenums

11 years agoFor loops may have an empty condition - don't try processing a NULL
Wolfgang Bumiller [Thu, 20 Dec 2012 19:23:35 +0000 (20:23 +0100)]
For loops may have an empty condition - don't try processing a NULL

11 years agowhile/for/do now all use process_condition, ast_loop got 2 new parameters for more...
Wolfgang Bumiller [Thu, 20 Dec 2012 19:22:31 +0000 (20:22 +0100)]
while/for/do now all use process_condition, ast_loop got 2 new parameters for more efficient translation

11 years agoprocess_condition function used by parse_if - need to still add it to loops
Wolfgang Bumiller [Thu, 20 Dec 2012 18:51:30 +0000 (19:51 +0100)]
process_condition function used by parse_if - need to still add it to loops

11 years ago-ftrue-empty-strings now changes type_not_instr[TYPE_STRING] to INSTR_NOT_F
Wolfgang Bumiller [Thu, 20 Dec 2012 18:32:57 +0000 (19:32 +0100)]
-ftrue-empty-strings now changes type_not_instr[TYPE_STRING] to INSTR_NOT_F

11 years agosince unary not doesn't fold these, remove them from immediate_is_true
Wolfgang Bumiller [Thu, 20 Dec 2012 18:19:12 +0000 (19:19 +0100)]
since unary not doesn't fold these, remove them from immediate_is_true

11 years agointroducing an immediate_is_true which follows the new -f flags on strings and vector...
Wolfgang Bumiller [Thu, 20 Dec 2012 18:18:22 +0000 (19:18 +0100)]
introducing an immediate_is_true which follows the new -f flags on strings and vector truthfulness, used in logic-op constant folding; const folding now disabled for functions-constants on NOT because it's stupid

11 years agounary not now uses NOT_F with -ftrue-empty-strings
Wolfgang Bumiller [Thu, 20 Dec 2012 18:04:56 +0000 (19:04 +0100)]
unary not now uses NOT_F with -ftrue-empty-strings

11 years agoMaking logical 'and' and 'or' use NOT_ in -fcorrect-logic for both operands normally...
Wolfgang Bumiller [Thu, 20 Dec 2012 18:00:23 +0000 (19:00 +0100)]
Making logical 'and' and 'or' use NOT_ in -fcorrect-logic for both operands normally, but only for the first with -fperl-logic

11 years agoAdding -fcorrect-logic, -ftrue-empty-strings, -ffalse-empty-strings flags; not used yet
Wolfgang Bumiller [Thu, 20 Dec 2012 17:59:05 +0000 (18:59 +0100)]
Adding -fcorrect-logic, -ftrue-empty-strings, -ffalse-empty-strings flags; not used yet

11 years agomanpage: typo 0.1.9
Wolfgang Bumiller [Thu, 20 Dec 2012 15:56:22 +0000 (16:56 +0100)]
manpage: typo

11 years agoFix condition on whether or not to print 'error' or 'warning'
Wolfgang Bumiller [Thu, 20 Dec 2012 15:55:00 +0000 (16:55 +0100)]
Fix condition on whether or not to print 'error' or 'warning'

11 years ago-Werror-<warning> should actually use opts_setwerror
Wolfgang Bumiller [Thu, 20 Dec 2012 15:53:09 +0000 (16:53 +0100)]
-Werror-<warning> should actually use opts_setwerror

11 years ago-Werror-<warning>, -Wno-error-<warning>, manpage updated
Wolfgang Bumiller [Thu, 20 Dec 2012 15:49:10 +0000 (16:49 +0100)]
-Werror-<warning>, -Wno-error-<warning>, manpage updated

11 years agomanpage: -Wunreachable-code
Wolfgang Bumiller [Thu, 20 Dec 2012 15:41:40 +0000 (16:41 +0100)]
manpage: -Wunreachable-code

11 years agoReorder the warnings in opts.c to match their oder in opts.def, added WARN_LOCAL_SHAD...
Wolfgang Bumiller [Thu, 20 Dec 2012 15:32:36 +0000 (16:32 +0100)]
Reorder the warnings in opts.c to match their oder in opts.def, added WARN_LOCAL_SHADOWS to the list with its default false parameter

11 years agoTurn -fallow-unreachable-code into a -Wunreachable-code
Wolfgang Bumiller [Thu, 20 Dec 2012 15:29:32 +0000 (16:29 +0100)]
Turn -fallow-unreachable-code into a -Wunreachable-code

11 years agoFix object dependency: OBJ -> OBJ_D so they all depend on gmqcc.h again properly
Wolfgang Bumiller [Thu, 20 Dec 2012 15:28:35 +0000 (16:28 +0100)]
Fix object dependency: OBJ -> OBJ_D so they all depend on gmqcc.h again properly

11 years agoTemporarily fix noreturn bug by creating an actual dummy return instruction after...
Wolfgang Bumiller [Thu, 20 Dec 2012 15:20:08 +0000 (16:20 +0100)]
Temporarily fix noreturn bug by creating an actual dummy return instruction after the call for now

11 years ago-g sets opts.g and -debug causes blocks to be labeled
Wolfgang Bumiller [Thu, 20 Dec 2012 15:04:10 +0000 (16:04 +0100)]
-g sets opts.g and -debug causes blocks to be labeled

11 years agosscanf_s only for _MSC_VER not WIN32 in exec.c
Wolfgang Bumiller [Thu, 20 Dec 2012 14:46:31 +0000 (15:46 +0100)]
sscanf_s only for _MSC_VER not WIN32 in exec.c

11 years agoOh god I hate this so much
Wolfgang Bumiller [Thu, 20 Dec 2012 14:45:15 +0000 (15:45 +0100)]
Oh god I hate this so much

11 years agothat should have gone into the second to last commit
Wolfgang Bumiller [Thu, 20 Dec 2012 14:27:15 +0000 (15:27 +0100)]
that should have gone into the second to last commit

11 years agoWINDOWS 8 USERS ARE IDIOTS, YES YOU SHOULD TAKE THIS PERSONALLY
Wolfgang Bumiller [Thu, 20 Dec 2012 14:26:45 +0000 (15:26 +0100)]
WINDOWS 8 USERS ARE IDIOTS, YES YOU SHOULD TAKE THIS PERSONALLY

11 years agoast_return needs the correct context...
Wolfgang Bumiller [Thu, 20 Dec 2012 14:01:19 +0000 (15:01 +0100)]
ast_return needs the correct context...

11 years ago-fallow-unreachable-code
Wolfgang Bumiller [Thu, 20 Dec 2012 13:41:16 +0000 (14:41 +0100)]
-fallow-unreachable-code

11 years agovector initialization tests
Wolfgang Bumiller [Thu, 20 Dec 2012 13:12:22 +0000 (14:12 +0100)]
vector initialization tests

11 years agomaking the uninitialized-var on vector warning now check all members; ir_value_vector...
Wolfgang Bumiller [Thu, 20 Dec 2012 13:06:25 +0000 (14:06 +0100)]
making the uninitialized-var on vector warning now check all members; ir_value_vector_member now also appends _x,_y,_z since they're used in the used-unintialized message