Commit graph

135 commits

Author SHA1 Message Date
Dale Weiler
772dbfae26 Make it compile in visual studio again, without warnings. 2013-08-16 09:03:36 +00:00
Dale Weiler
a622d5163b Rework some build stuff for better output and to enable strict prototypes 2013-08-16 03:28:02 +00:00
Dale Weiler
1201f06a55 Remove vec_upload 2013-08-14 06:19:48 +00:00
Dale Weiler
d6ca5673dc Use the _t consistency naming scheme. Also various cleanups. 2013-07-30 16:00:51 +00:00
Dale Weiler
8db9724c5d Revert "Smaller memory footprint, 4/8 bytes vs 12/24 for individual token lex_ctx's. Use to be a 'shallow' copy of the details in lex_file, now it's a pointer to the contents in lex_file."
This reverts commit cddf70f46b.
2013-07-26 16:17:41 +00:00
Dale Weiler
cddf70f46b Smaller memory footprint, 4/8 bytes vs 12/24 for individual token lex_ctx's. Use to be a 'shallow' copy of the details in lex_file, now it's a pointer to the contents in lex_file. 2013-07-26 16:09:26 +00:00
Dale Weiler
04406b191f Less terse, it confuses people. 2013-06-15 08:56:34 +00:00
Dale Weiler
8afd373e4f Fixed whitespace 2013-06-14 21:36:16 +00:00
Dale Weiler
144672fada Strict prototyping 2013-06-06 02:51:13 +00:00
Dale Weiler
11179a2a71 Major header reworking, this respects the namespaces properly. Makes object dependency more obvious, allows for better make caches, and prevents misuse of library features, i.e use con_* instead of printf. 2013-06-04 02:47:07 +00:00
Dale Weiler
0b6269f607 column printing for warnings and errors now 2013-05-30 19:36:01 +00:00
Dale Weiler
f892b32335 Major export cleanup. Anything that was exported but wasn't used outside where it was implemented has been turned into static, and their exports have been removed. This actually makes the compiler compile slightly faster. 2013-05-29 03:29:04 +00:00
Wolfgang Bumiller
c5225b2fa1 fixing a few leaks - code_write doesn't delete the code object anymore, code_cleanup has to be called 2013-05-07 19:56:41 +02:00
Dale Weiler
9fee84f250 less globals 2013-04-25 12:08:13 +00:00
Wolfgang Bumiller
3a4aba0b31 Grrrr 2013-04-24 17:47:42 +02:00
Dale Weiler
6284cc673d typo 2013-04-24 04:50:07 +00:00
Dale Weiler
b3fc77efd6 Implemented __TIME_STAMP__ predef, expands to a timestamp of when the __FILE__ was last modified, returned in the format: "Www Mmm dd hh:mm:ss yyyy", where Www is the weekday, Mmm the month (in letter), dd the day of the month, hh:mm:ss the time, and yyyy the year. 2013-04-24 04:48:05 +00:00
Dale Weiler
35988b6191 Make ftepps __NULL__ translate to gmqccs untyped nil keyword (this isn't correct behaviour of the __NULL__ constant, but it works) 2013-04-24 04:17:17 +00:00
Dale Weiler
489ad486bc Get it compiling in visual studio again. 2013-04-24 01:43:53 +00:00
Dale Weiler
10738da2fb Make it compile as C++ code too 2013-04-23 22:50:47 +00:00
Dale Weiler
160e7cf7ee Remove trailing whitespace 2013-04-21 10:24:55 +00:00
Dale Weiler
dc7e18ec73 Some inline never hurt anyone .. actually, C made a bad decision in it's design, everything should've always been implicitly inline, since most code back in the day was small, if you had large bodies, there should've been an 'outline' keyword for that instead :P 2013-04-17 11:02:42 +00:00
Dale Weiler
0b0b6423ba Use hashtable for macro definitions in the preprocessor, this speeds up the search for them, and the removal of them making it O(1) instead of O(n). This also makes my 30 second xonotic compiles take only 13 seconds 2013-04-17 10:51:33 +00:00
Dale Weiler
d7be99c9dd More perliminary reworking for threading 2013-04-17 06:30:09 +00:00
Dale Weiler
c2b5a95961 GCC specific stuff compile flags. 2013-04-15 06:23:13 +00:00
Dale Weiler
ef528d6710 Added tracing to strdup for allocations, fixed some memleaks, this isn't pretty (trying to track down some weird memory leak issues) 2013-04-14 23:51:16 +00:00
Dale Weiler
3e7340c52c More external function flatening (less external symbols) 2013-04-14 01:07:39 +00:00
Dale Weiler
3f40fcb965 Fix possible buffer overflows. 2013-04-13 18:17:15 +00:00
Dale Weiler
95172861f5 Fix possible bug 2013-04-13 18:04:07 +00:00
Dale Weiler
c74889f648 Fix some memory leaks. 2013-04-13 18:01:26 +00:00
Wolfgang Bumiller
3593a1b6b8 Merge branch 'master' into cooking 2013-02-12 14:31:27 +01:00
Wolfgang Bumiller
1dfd375738 include: guard the actual inclusion with ftepp->output_on so that include inside #if 0 doesn't happen 2013-02-11 12:13:27 +01:00
Dale Weiler
c8959a2452 BOOM 2013-02-10 13:57:22 +00:00
Dale Weiler
a568d43487 Implemented __VA_COUNT__ 2013-02-08 12:30:17 +00:00
Dale Weiler
8d59d7029d Cleanup cargocult directory and file specific things, to fs.c (renamed file.c which also contains directory handling stuff). Also cleaned up some stuff, and added proper end comments to conditional inclusion stuff. 2013-02-08 12:06:59 +00:00
Wolfgang Bumiller
530dbd85b2 properly mask #message, #warning, #error by ftepp->output_on 2013-02-03 23:23:50 +01:00
Dale Weiler
5f9f6c11b8 Get it compiling with C++ compilers again. 2013-01-30 06:49:50 +00:00
Dale Weiler
e12d492d67 Removing #error/#warning/#message from parser, and making it part of preprocessor as directives again. 2013-01-30 05:49:08 +00:00
Dale Weiler
36c5722273 Rename 2013-01-30 05:35:07 +00:00
Dale Weiler
d201cfe6b4 Work in progress options cleanup. 2013-01-30 05:24:30 +00:00
Dale Weiler
76614b311e s/WARN_PREPROCESSOR/WARN_CPP/g (to stay somewhat compatible with gcc/clang warnings for the preprocessor) 2013-01-30 01:32:10 +00:00
Dale Weiler
3d35804a7d Removed #warning and #error from ftepp, and made it part of the parser routine. These are "directives" that should exist regardless if -fftepp is enabled, like #pragma. Implemented #warning, #message and #error as directives in parser instead. 2013-01-30 01:24:58 +00:00
Dale Weiler
7ea1033a43 Handle all possible subscript errors 2013-01-27 21:31:18 +00:00
Dale Weiler
1597f38f45 Better handling of __VA_ARGS__ subscripting. 2013-01-27 21:27:50 +00:00
Dale Weiler
6fc5b32123 Fix warning, and better tests for __VA_ARGS__ 2013-01-27 13:03:02 +00:00
Dale Weiler
b4fbba5708 Implement subscripting for __VA_ARGS__, and added test-case. This only works on INTCONST for now. 2013-01-27 12:55:56 +00:00
Wolfgang Bumiller
d5ba5a6e6a linenumbers and macros are stupid 2013-01-16 23:34:54 +01:00
Wolfgang Bumiller
7d2b0e9638 more linenumber madness 2013-01-16 22:58:43 +01:00
Wolfgang Bumiller
dfad837f5b this might fix some linenumbering, I hope 2013-01-15 22:29:44 +01:00
Wolfgang Bumiller
dfa6d0c9ad call ftepp_recursion_header/footer only when there are newlines in the expanded macro 2013-01-15 22:03:16 +01:00