Commit graph

185 commits

Author SHA1 Message Date
Wolfgang (Blub) Bumiller
5e23e8296d don't just store a 'bool constant' in the ast/ir, store the complete qualifier: 'int cvq', moved CV_ defines into gmqcc.h 2012-11-30 13:47:28 +01:00
Wolfgang (Blub) Bumiller
03cb670096 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 2012-11-30 11:55:32 +01:00
Wolfgang (Blub) Bumiller
e1fe6cff54 Importing tail-recursion optimization 2012-11-30 11:12:53 +01:00
Wolfgang (Blub) Bumiller
a890589031 -O now, additionally to taking a number, can work like -W and -f to take an actual optimization name 2012-11-30 11:05:58 +01:00
Wolfgang (Blub) Bumiller
8e1ce2ab5e generic compile_error/compile_warning functions in con.c, issuing end-of-non-void warning from within the ast now 2012-11-26 16:12:40 +01:00
Dale Weiler
ca52ecc20a Remove trailing whitespace for Blub. 2012-11-26 11:12:06 +00:00
Wolfgang (Blub) Bumiller
7b56ad9405 Revert "Fix type punning warnings"
it's a gcc version issue...

This reverts commit 3e6d173e31.
2012-11-25 14:05:10 +01:00
Dale Weiler
3e6d173e31 Fix type punning warnings 2012-11-25 12:57:28 +00:00
Wolfgang (Blub) Bumiller
613e1e7247 Change the parser to use the hashtable functions 2012-11-25 13:23:37 +01:00
Dale Weiler
5c0a62be96 Add respective license headers + some cleanups 2012-11-24 21:22:35 +00:00
Dale Weiler
9d677bab7c Added comment about hashtable 2012-11-23 20:05:53 +00:00
Dale Weiler
6e047ec65b No copy, just store pointer for hash table 2012-11-23 20:01:58 +00:00
Wolfgang (Blub) Bumiller
4a3921fcb9 Let's #define GMQCC by default 2012-11-23 19:13:09 +01:00
Dale Weiler
e25e83b14c Visual studio __forceinline can be used for GMQCC_INLINE 2012-11-23 06:48:54 +00:00
Dale Weiler
9e3399df19 Implemented hashtable as-per Blubs request 2012-11-23 06:12:01 +00:00
Wolfgang (Blub) Bumiller
968397da61 Fixing clang-warnings about vectors 2012-11-22 20:42:32 +01:00
Wolfgang (Blub) Bumiller
6983142c4d -dump vs -dumpfin; to see the IR before and after finalizing functions 2012-11-21 21:53:38 +01:00
Dale Weiler
2e3d572b53 Bump version 2012-11-21 20:33:52 +00:00
Wolfgang (Blub) Bumiller
ebc6954bf5 casting explicitly to boolean values in early out logic 2012-11-21 19:36:28 +01:00
Dale Weiler
61fa54318c Merge branch 'master' into test-suite
Conflicts:
	Makefile
	ir.c
2012-11-19 02:13:46 +00:00
Wolfgang (Blub) Bumiller
0330b082a2 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 2012-11-18 13:33:53 +01:00
Wolfgang (Blub) Bumiller
d1373af7fc Make -E print to stdout by default and honor -o, changed handling of source list a bit 2012-11-18 12:51:38 +01:00
Wolfgang (Blub) Bumiller
366557bbab 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) 2012-11-18 11:54:11 +01:00
Dale Weiler
0dc4febb91 New test-suite initial implementation. Just need to write some tests. 2012-11-17 02:54:30 +00:00
Wolfgang (Blub) Bumiller
07ca2e6407 importing initial ftepp.c; -E option now executes the preprocessor 2012-11-16 16:57:59 +01:00
Wolfgang (Blub) Bumiller
3bd75546ec moving _vec_remove above the 'exposed interface' comment 2012-11-15 21:24:31 +01:00
Wolfgang (Blub) Bumiller
df61f3c182 Fix a typo causing NOTRACK to fail 2012-11-15 21:18:31 +01:00
Wolfgang (Blub) Bumiller
c583ae24f2 Replacing lexer's vectors and getting rid of the macros 2012-11-15 18:48:38 +01:00
Wolfgang (Blub) Bumiller
906f319673 Replaced it all... 2012-11-15 18:32:09 +01:00
Dale Weiler
2e84cc0b41 Use new console system everywhere. 2012-11-15 00:28:46 +00:00
Wolfgang (Blub) Bumiller
84088cb5f0 Merging in new-syntax 2012-11-14 21:39:16 +01:00
Dale Weiler
f0750209b7 preliminary segregated console subsystem 2012-11-14 19:17:43 +00:00
Wolfgang (Blub) Bumiller
9a42dd1c3a qcvm -trace now shows the current function name and nest-depth 2012-11-11 23:57:42 +01:00
Wolfgang (Blub) Bumiller
a7d3a2d6ea adding opts_max_array_size with a default of 1024, adding some TODO errors for arrays in the AST 2012-11-11 11:09:36 +01:00
Wolfgang (Blub) Bumiller
cf1ea01de3 parser_compile_file vs parser_compile_string 2012-11-11 10:33:29 +01:00
Wolfgang (Blub) Bumiller
1869440fd9 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 2012-11-11 10:13:01 +01:00
Wolfgang (Blub) Bumiller
a27750966f globals of type .vector will now properly generate 3 globals 2012-11-11 10:13:00 +01:00
Dale Weiler
6b12f4435c Make warns.def and flags.def into a single opts.def. 2012-11-10 21:13:09 +00:00
Wolfgang (Blub) Bumiller
09e18e1bbf mem_r to realloc 2012-11-10 11:16:19 +01:00
Wolfgang (Blub) Bumiller
a195e296a9 -E switch to set opt_pp_only 2012-11-02 18:33:51 +01:00
Wolfgang (Blub) Bumiller
5adc3fd9c1 Don't forget to set the _alloc in vector resize, also set _alloc back in _append if mem_a had failed 2012-10-09 20:56:54 +02:00
Wolfgang (Blub) Bumiller
5dd8e23dfd Cleaner crc implementation 2012-10-02 17:51:03 +02:00
Wolfgang (Blub) Bumiller
354dd94b95 Generating checksums 2012-10-02 17:09:49 +02:00
Wolfgang (Blub) Bumiller
b2cb612c70 Adding DEF_SAVEGLOBAL, marking globals as to-be-saved now, for real support of quicksaving 2012-08-23 18:28:05 +02:00
Wolfgang (Blub) Bumiller
fe2f9d79c5 fixing mem-vector resize function 2012-08-23 13:21:14 +02:00
Wolfgang (Blub) Bumiller
8b90fcf482 commenting on the quirks of MUL_VF and MUL_FV in gmqcc.h's instruction list 2012-08-22 18:34:48 +02:00
Wolfgang (Blub) Bumiller
ab714862d6 committing gmqcc.h for previous exec.c commit: qc_program gets .xflags 2012-08-22 17:49:25 +02:00
Wolfgang (Blub) Bumiller
ef3e7231bd it's SUB_V not DUB_V 2012-08-22 17:32:42 +02:00
Wolfgang (Blub) Bumiller
77e5807a83 memvector resize needs to set _count as well 2012-08-22 15:24:24 +02:00
Wolfgang (Blub) Bumiller
93e13c3cb1 option: -force-crc=number, added -info to executor to just show some file info like the crc, and -printfields to print a list of fields along with their type and position 2012-08-22 14:00:57 +02:00