xonotic/gmqcc.git
9 years agoRemoving unused _tokennames from lexer.h
Wolfgang (Blub) Bumiller [Thu, 22 Nov 2012 19:42:55 +0000 (20:42 +0100)]
Removing unused _tokennames from lexer.h

9 years agoFixing main.c shadows
Wolfgang (Blub) Bumiller [Thu, 22 Nov 2012 19:42:44 +0000 (20:42 +0100)]
Fixing main.c shadows

9 years agoFixing clang-warnings about vectors
Wolfgang (Blub) Bumiller [Thu, 22 Nov 2012 19:42:32 +0000 (20:42 +0100)]
Fixing clang-warnings about vectors

9 years agoAdding short-logic testcase
Wolfgang (Blub) Bumiller [Thu, 22 Nov 2012 19:03:53 +0000 (20:03 +0100)]
Adding short-logic testcase

9 years agoFixing short-logic for 'if': it wanted to add the jump to the wrong block
Wolfgang (Blub) Bumiller [Thu, 22 Nov 2012 19:04:18 +0000 (20:04 +0100)]
Fixing short-logic for 'if': it wanted to add the jump to the wrong block

9 years agoTest for extended parameters
Wolfgang (Blub) Bumiller [Thu, 22 Nov 2012 18:36:45 +0000 (19:36 +0100)]
Test for extended parameters

9 years agoCollapsing the switch tests into 1
Wolfgang (Blub) Bumiller [Thu, 22 Nov 2012 18:28:45 +0000 (19:28 +0100)]
Collapsing the switch tests into 1

9 years agodrop the E line from break.tmpl
Wolfgang (Blub) Bumiller [Thu, 22 Nov 2012 18:28:38 +0000 (19:28 +0100)]
drop the E line from break.tmpl

9 years agoCollapse the break tests into 1
Wolfgang (Blub) Bumiller [Thu, 22 Nov 2012 18:25:45 +0000 (19:25 +0100)]
Collapse the break tests into 1

9 years agooops
Dale Weiler [Thu, 22 Nov 2012 18:14:03 +0000 (18:14 +0000)]
oops

9 years agoMerge branch 'master' of github.com:graphitemaster/gmqcc
Dale Weiler [Thu, 22 Nov 2012 18:13:12 +0000 (18:13 +0000)]
Merge branch 'master' of github.com:graphitemaster/gmqcc

9 years agoRemove requirement for E
Dale Weiler [Thu, 22 Nov 2012 18:12:47 +0000 (18:12 +0000)]
Remove requirement for E

9 years agomake ast_function_label also work when -dumpfin is used instead of -dump
Wolfgang (Blub) Bumiller [Wed, 21 Nov 2012 20:59:25 +0000 (21:59 +0100)]
make ast_function_label also work when -dumpfin is used instead of -dump

9 years ago-dump vs -dumpfin; to see the IR before and after finalizing functions
Wolfgang (Blub) Bumiller [Wed, 21 Nov 2012 20:53:38 +0000 (21:53 +0100)]
-dump vs -dumpfin; to see the IR before and after finalizing functions

9 years agoEscape strings in ir-dump output
Wolfgang (Blub) Bumiller [Wed, 21 Nov 2012 20:49:21 +0000 (21:49 +0100)]
Escape strings in ir-dump output

9 years agoBump version
Dale Weiler [Wed, 21 Nov 2012 20:33:52 +0000 (20:33 +0000)]
Bump version

9 years agoMake blub happy
Dale Weiler [Wed, 21 Nov 2012 20:31:41 +0000 (20:31 +0000)]
Make blub happy

9 years agoMake makefile runtest rule depend on all to be built
Dale Weiler [Wed, 21 Nov 2012 20:27:41 +0000 (20:27 +0000)]
Make makefile runtest rule depend on all to be built

9 years agoless verbosity from test suite, just the way blub wants it
Dale Weiler [Wed, 21 Nov 2012 20:26:18 +0000 (20:26 +0000)]
less verbosity from test suite, just the way blub wants it

9 years agoast_ternary needs to adopt the output type
Wolfgang (Blub) Bumiller [Wed, 21 Nov 2012 19:57:00 +0000 (20:57 +0100)]
ast_ternary needs to adopt the output type

9 years agoerror if the ternary operands aren't of the same type - except for the first one...
Wolfgang (Blub) Bumiller [Wed, 21 Nov 2012 19:56:51 +0000 (20:56 +0100)]
error if the ternary operands aren't of the same type - except for the first one of course

9 years agoMore verbose error for invalid parameter types
Wolfgang (Blub) Bumiller [Wed, 21 Nov 2012 19:53:00 +0000 (20:53 +0100)]
More verbose error for invalid parameter types

9 years agocheck 'ternaries' count
Wolfgang (Blub) Bumiller [Wed, 21 Nov 2012 19:50:27 +0000 (20:50 +0100)]
check 'ternaries' count

9 years agoUtilizing vec_last more
Wolfgang (Blub) Bumiller [Wed, 21 Nov 2012 19:44:43 +0000 (20:44 +0100)]
Utilizing vec_last more

9 years agoquestion mark must result in TOKEN_OPERATOR
Wolfgang (Blub) Bumiller [Wed, 21 Nov 2012 19:42:48 +0000 (20:42 +0100)]
question mark must result in TOKEN_OPERATOR

9 years agooperator handling for ternary
Wolfgang (Blub) Bumiller [Wed, 21 Nov 2012 19:41:26 +0000 (20:41 +0100)]
operator handling for ternary

9 years agoRemoving some obsolete messages
Wolfgang (Blub) Bumiller [Wed, 21 Nov 2012 19:40:10 +0000 (20:40 +0100)]
Removing some obsolete messages

9 years agoparsing the ternary
Wolfgang (Blub) Bumiller [Wed, 21 Nov 2012 19:36:42 +0000 (20:36 +0100)]
parsing the ternary

9 years agoInserting ternary in the qcc-operator-list at the place fteqcc would have it
Wolfgang (Blub) Bumiller [Wed, 21 Nov 2012 19:16:28 +0000 (20:16 +0100)]
Inserting ternary in the qcc-operator-list at the place fteqcc would have it

9 years agoremoved phi_out from ast_ternary since we have a place in ast_expression_common for...
Wolfgang (Blub) Bumiller [Wed, 21 Nov 2012 19:13:31 +0000 (20:13 +0100)]
removed phi_out from ast_ternary since we have a place in ast_expression_common for this kind of value

9 years agoFix wrong merge_id
Wolfgang (Blub) Bumiller [Wed, 21 Nov 2012 18:55:12 +0000 (19:55 +0100)]
Fix wrong merge_id

9 years ago-fperl-logic, off by default, so casting to boolean now
Wolfgang (Blub) Bumiller [Wed, 21 Nov 2012 18:40:11 +0000 (19:40 +0100)]
-fperl-logic, off by default, so casting to boolean now

9 years agocasting explicitly to boolean values in early out logic
Wolfgang (Blub) Bumiller [Wed, 21 Nov 2012 18:36:28 +0000 (19:36 +0100)]
casting explicitly to boolean values in early out logic

9 years agoA note about how early-out in if-expressions can be translated more efficiently
Wolfgang (Blub) Bumiller [Wed, 21 Nov 2012 18:22:28 +0000 (19:22 +0100)]
A note about how early-out in if-expressions can be translated more efficiently

9 years agoActually it's likely...
Wolfgang (Blub) Bumiller [Wed, 21 Nov 2012 16:42:44 +0000 (17:42 +0100)]
Actually it's likely...

9 years agoLittle optimization to not produce an unreachable goto instruction
Wolfgang (Blub) Bumiller [Wed, 21 Nov 2012 16:40:35 +0000 (17:40 +0100)]
Little optimization to not produce an unreachable goto instruction

9 years ago'likely' hint for IFs
Wolfgang (Blub) Bumiller [Wed, 21 Nov 2012 16:35:11 +0000 (17:35 +0100)]
'likely' hint for IFs

9 years agoexperimental -fshort-logic, currently perl-like - might have to use NOT(NOT(x)) to...
Wolfgang (Blub) Bumiller [Wed, 21 Nov 2012 15:08:08 +0000 (16:08 +0100)]
experimental -fshort-logic, currently perl-like - might have to use NOT(NOT(x)) to fix this

9 years agoFixing warnings
Wolfgang (Blub) Bumiller [Wed, 21 Nov 2012 15:07:36 +0000 (16:07 +0100)]
Fixing warnings

9 years agoA hopefully working naive PHI solution
Wolfgang (Blub) Bumiller [Wed, 21 Nov 2012 15:05:54 +0000 (16:05 +0100)]
A hopefully working naive PHI solution

9 years agoImplemented multi-line comparitive tests, fixed output of stdout/stderr pair logs...
Dale Weiler [Tue, 20 Nov 2012 06:06:46 +0000 (06:06 +0000)]
Implemented multi-line comparitive tests, fixed output of stdout/stderr pair logs.  Some other cleanups, and stuff

9 years agoAdding break/continue testcases
Wolfgang (Blub) Bumiller [Mon, 19 Nov 2012 23:21:03 +0000 (00:21 +0100)]
Adding break/continue testcases

9 years ago*sigh*
Wolfgang (Blub) Bumiller [Mon, 19 Nov 2012 23:20:42 +0000 (00:20 +0100)]
*sigh*

9 years agoFixing switch testcase 7
Wolfgang (Blub) Bumiller [Mon, 19 Nov 2012 23:16:49 +0000 (00:16 +0100)]
Fixing switch testcase 7

9 years agoswitch testcases
Wolfgang (Blub) Bumiller [Mon, 19 Nov 2012 22:50:47 +0000 (23:50 +0100)]
switch testcases

9 years ago-frelaxed-switch to enable switch on non-constant cases
Wolfgang (Blub) Bumiller [Mon, 19 Nov 2012 21:27:58 +0000 (22:27 +0100)]
-frelaxed-switch to enable switch on non-constant cases

9 years agoAdd the missing jump from after the actual last case
Wolfgang (Blub) Bumiller [Mon, 19 Nov 2012 21:17:24 +0000 (22:17 +0100)]
Add the missing jump from after the actual last case

9 years agoEnter the outgoing block after a switch
Wolfgang (Blub) Bumiller [Mon, 19 Nov 2012 21:08:38 +0000 (22:08 +0100)]
Enter the outgoing block after a switch

9 years agoParsing of switches
Wolfgang (Blub) Bumiller [Mon, 19 Nov 2012 21:06:29 +0000 (22:06 +0100)]
Parsing of switches

9 years agofix bnot_id
Wolfgang (Blub) Bumiller [Mon, 19 Nov 2012 21:06:23 +0000 (22:06 +0100)]
fix bnot_id

9 years ago'case' and 'default' are now keywords too, not just switch
Wolfgang (Blub) Bumiller [Mon, 19 Nov 2012 20:40:38 +0000 (21:40 +0100)]
'case' and 'default' are now keywords too, not just switch

9 years agoast_switch
Wolfgang (Blub) Bumiller [Mon, 19 Nov 2012 20:17:44 +0000 (21:17 +0100)]
ast_switch

9 years agofix a warning and remove unused variables
Wolfgang (Blub) Bumiller [Mon, 19 Nov 2012 18:44:26 +0000 (19:44 +0100)]
fix a warning and remove unused variables

9 years agoError in the ast already about unreachable statements and don't upset the IR
Wolfgang (Blub) Bumiller [Mon, 19 Nov 2012 18:42:25 +0000 (19:42 +0100)]
Error in the ast already about unreachable statements and don't upset the IR

9 years agobreak and continue support
Wolfgang (Blub) Bumiller [Mon, 19 Nov 2012 18:39:52 +0000 (19:39 +0100)]
break and continue support

9 years agomoving 'return' parsing into a function
Wolfgang (Blub) Bumiller [Mon, 19 Nov 2012 18:22:00 +0000 (19:22 +0100)]
moving 'return' parsing into a function

9 years agomoving keywords into an array
Wolfgang (Blub) Bumiller [Mon, 19 Nov 2012 17:57:37 +0000 (18:57 +0100)]
moving keywords into an array

9 years agoFix con_vprintmsg madness
Wolfgang (Blub) Bumiller [Mon, 19 Nov 2012 18:19:30 +0000 (19:19 +0100)]
Fix con_vprintmsg madness

9 years agoThis is probably what was intended actually
Wolfgang (Blub) Bumiller [Mon, 19 Nov 2012 18:06:38 +0000 (19:06 +0100)]
This is probably what was intended actually

9 years agoMerge branch 'master' into test-suite
Dale Weiler [Mon, 19 Nov 2012 02:13:46 +0000 (02:13 +0000)]
Merge branch 'master' into test-suite

Conflicts:
Makefile
ir.c

9 years agoAdded test for variadic arguments
Dale Weiler [Mon, 19 Nov 2012 02:11:24 +0000 (02:11 +0000)]
Added test for variadic arguments

9 years agoAdded command line parsing to test-suite
Dale Weiler [Mon, 19 Nov 2012 02:05:18 +0000 (02:05 +0000)]
Added command line parsing to test-suite

9 years agostdout/stderr logging functional now.
Dale Weiler [Mon, 19 Nov 2012 00:22:57 +0000 (00:22 +0000)]
stdout/stderr logging functional now.

9 years agoTest suite now logs stdout/stderr to respective files
Dale Weiler [Sun, 18 Nov 2012 22:59:23 +0000 (22:59 +0000)]
Test suite now logs stdout/stderr to respective files

9 years agoFixing some indentation
Wolfgang (Blub) Bumiller [Sun, 18 Nov 2012 19:56:11 +0000 (20:56 +0100)]
Fixing some indentation

9 years agoremove a redundant ir_function member
Wolfgang (Blub) Bumiller [Sun, 18 Nov 2012 19:36:02 +0000 (20:36 +0100)]
remove a redundant ir_function member

9 years agoMake the disasm a bit more verbose as to where globals are
Wolfgang (Blub) Bumiller [Sun, 18 Nov 2012 19:32:22 +0000 (20:32 +0100)]
Make the disasm a bit more verbose as to where globals are

9 years agodo not set a function-defs nargs to > 8
Wolfgang (Blub) Bumiller [Sun, 18 Nov 2012 19:32:06 +0000 (20:32 +0100)]
do not set a function-defs nargs to > 8

9 years agoCALL to handle extparams, renamed extparams again
Wolfgang (Blub) Bumiller [Sun, 18 Nov 2012 19:17:59 +0000 (20:17 +0100)]
CALL to handle extparams, renamed extparams again

9 years agoAdd a # prefix to EXTPARM%i
Wolfgang (Blub) Bumiller [Sun, 18 Nov 2012 19:11:14 +0000 (20:11 +0100)]
Add a # prefix to EXTPARM%i

9 years agoMake functions copy their extparams
Wolfgang (Blub) Bumiller [Sun, 18 Nov 2012 19:06:28 +0000 (20:06 +0100)]
Make functions copy their extparams

9 years agoMake the >8 parameter message a warning
Wolfgang (Blub) Bumiller [Sun, 18 Nov 2012 18:19:38 +0000 (19:19 +0100)]
Make the >8 parameter message a warning

9 years agoImporting a tiny README file
Wolfgang (Blub) Bumiller [Sun, 18 Nov 2012 18:15:20 +0000 (19:15 +0100)]
Importing a tiny README file

9 years agoImporting LICENSE file
Wolfgang (Blub) Bumiller [Sun, 18 Nov 2012 18:14:06 +0000 (19:14 +0100)]
Importing LICENSE file

9 years agoChecking in an INSTALL file
Wolfgang (Blub) Bumiller [Sun, 18 Nov 2012 17:54:10 +0000 (18:54 +0100)]
Checking in an INSTALL file

9 years agoAdding myself to main.c's copyright notice
Wolfgang (Blub) Bumiller [Sun, 18 Nov 2012 16:06:26 +0000 (17:06 +0100)]
Adding myself to main.c's copyright notice

9 years agoAdded #include
Wolfgang (Blub) Bumiller [Sun, 18 Nov 2012 15:22:07 +0000 (16:22 +0100)]
Added #include

9 years agoDon't skip the \n after parsing a pragma in the lexer otherwise 2 pragmas in the...
Wolfgang (Blub) Bumiller [Sun, 18 Nov 2012 15:17:19 +0000 (16:17 +0100)]
Don't skip the \n after parsing a pragma in the lexer otherwise 2 pragmas in the row wouldn't work

9 years agopragma line(lineno) - sets the linenumber for the line after the pragma
Wolfgang (Blub) Bumiller [Sun, 18 Nov 2012 14:32:03 +0000 (15:32 +0100)]
pragma line(lineno) - sets the linenumber for the line after the pragma

9 years agoBetter linecounting for pragmas; support for prgama file(filename)
Wolfgang (Blub) Bumiller [Sun, 18 Nov 2012 14:30:40 +0000 (15:30 +0100)]
Better linecounting for pragmas; support for prgama file(filename)

9 years agoMake pragmas pass through the preprocessor so the user can write them manually
Wolfgang (Blub) Bumiller [Sun, 18 Nov 2012 14:30:24 +0000 (15:30 +0100)]
Make pragmas pass through the preprocessor so the user can write them manually

9 years agofixup line counting in #pragmas
Wolfgang (Blub) Bumiller [Sun, 18 Nov 2012 14:23:00 +0000 (15:23 +0100)]
fixup line counting in #pragmas

9 years agoExperimental support for push/pop(line) pragmas
Wolfgang (Blub) Bumiller [Sun, 18 Nov 2012 14:14:42 +0000 (15:14 +0100)]
Experimental support for push/pop(line) pragmas

9 years agoupdate old_string after a recursive preprocess call so we don't reset to a free'd...
Wolfgang (Blub) Bumiller [Sun, 18 Nov 2012 13:39:24 +0000 (14:39 +0100)]
update old_string after a recursive preprocess call so we don't reset to a free'd vector; add recursion header/footer pragmas

9 years agoComment about why stringify is so short
Wolfgang (Blub) Bumiller [Sun, 18 Nov 2012 13:29:15 +0000 (14:29 +0100)]
Comment about why stringify is so short

9 years agodon't call parser_cleanup with -E
Wolfgang (Blub) Bumiller [Sun, 18 Nov 2012 13:27:47 +0000 (14:27 +0100)]
don't call parser_cleanup with -E

9 years agoAdd quotes to the known control sequences... darn. Add stringification via #
Wolfgang (Blub) Bumiller [Sun, 18 Nov 2012 13:26:40 +0000 (14:26 +0100)]
Add quotes to the known control sequences... darn. Add stringification via #

9 years agoThe ftepp now always outputs into a string buffer, with -E the buffer will be dumped...
Wolfgang (Blub) Bumiller [Sun, 18 Nov 2012 12:33:53 +0000 (13:33 +0100)]
The ftepp now always outputs into a string buffer, with -E the buffer will be dumped to stdout or the via -o specified file, without -E it'll be passed to the parser to be compiled

9 years agoMerge branch 'master' into ftepp
Wolfgang (Blub) Bumiller [Sun, 18 Nov 2012 12:06:29 +0000 (13:06 +0100)]
Merge branch 'master' into ftepp

9 years agoCollect accessor functions in the parser so they can later be deleted, fixed that...
Wolfgang (Blub) Bumiller [Sun, 18 Nov 2012 12:06:16 +0000 (13:06 +0100)]
Collect accessor functions in the parser so they can later be deleted, fixed that leak

9 years agoRemoving some code duplication
Wolfgang (Blub) Bumiller [Sun, 18 Nov 2012 12:00:18 +0000 (13:00 +0100)]
Removing some code duplication

9 years agoMake -E print to stdout by default and honor -o, changed handling of source list...
Wolfgang (Blub) Bumiller [Sun, 18 Nov 2012 11:51:38 +0000 (12:51 +0100)]
Make -E print to stdout by default and honor -o, changed handling of source list a bit

9 years agoSince like with parsing, the preprocessor state has to be preserved across files...
Wolfgang (Blub) Bumiller [Sun, 18 Nov 2012 10:54:11 +0000 (11:54 +0100)]
Since like with parsing, the preprocessor state has to be preserved across files for macros, we do that now, and with that introduce a new warning: -Wmultifile-if in case an #if spans over several command-line-provided source files (or progs.src file provided for that matter)

9 years agoSome printf/con_out/con_err conversions, guarded some outputs with not-opts_pp_only...
Wolfgang (Blub) Bumiller [Sun, 18 Nov 2012 10:43:46 +0000 (11:43 +0100)]
Some printf/con_out/con_err conversions, guarded some outputs with not-opts_pp_only so the -E switch can print to stdout normally

9 years agoMerge branch 'master' into ftepp
Wolfgang (Blub) Bumiller [Sat, 17 Nov 2012 10:34:00 +0000 (11:34 +0100)]
Merge branch 'master' into ftepp

9 years agoMerge branch 'master' into test-suite
Dale Weiler [Sat, 17 Nov 2012 10:02:21 +0000 (10:02 +0000)]
Merge branch 'master' into test-suite

Conflicts:
Makefile

9 years agoMore makefile changes
Dale Weiler [Sat, 17 Nov 2012 10:00:55 +0000 (10:00 +0000)]
More makefile changes

9 years agoinstall targets 0.1
Wolfgang (Blub) Bumiller [Sat, 17 Nov 2012 10:00:32 +0000 (11:00 +0100)]
install targets

9 years agoMerge branch 'master' into test-suite
Dale Weiler [Sat, 17 Nov 2012 09:56:48 +0000 (09:56 +0000)]
Merge branch 'master' into test-suite

Conflicts:
Makefile

9 years agoAdded more tests, fixed existing ones, and some more test system changes.
Dale Weiler [Sat, 17 Nov 2012 09:51:55 +0000 (09:51 +0000)]
Added more tests, fixed existing ones, and some more test system changes.