Commit graph

257 commits

Author SHA1 Message Date
Wolfgang Bumiller
3436fa7d89 added the --add-info compile switch: it adds a global const string named version to the 'reserved' namespace, ie ends up named 'reserved:version', containing the --version string 2013-01-11 19:18:51 +01:00
Wolfgang Bumiller
5ea710e317 In order to avoid release version strings in non-git builds, by default --version on non-tagged commits now also prints 'development build' as the 2nd line 2013-01-11 10:40:33 +01:00
Wolfgang Bumiller
1c1ea1d0f7 strictness sweep: (void)-ing all vec_ macros which don't evaluate to a sensible value 2013-01-10 18:26:35 +01:00
Wolfgang Bumiller
7a5a328c54 --version now prints GMQCC_GITINFO, which is not not defined in gmqcc.h to some empty string, it just won't exist in release builds 2013-01-10 16:07:33 +01:00
Wolfgang Bumiller
10c7f4f838 don't call correct_edit anew for each scope 2013-01-09 21:16:22 +01:00
Wolfgang Bumiller
4f7113116d -Wall now does not set -Wuninitialized-global 2013-01-09 20:39:17 +01:00
Wolfgang Bumiller
9c8ddb3771 An evil optimization to the trie, now has a fixed amount of branches and uses a char-to-index map to index into the branches... 2013-01-06 13:07:28 +01:00
Wolfgang Bumiller
8bc9d4b427 Committing an evil allocator and a trie to speed up the correction stuff 2013-01-05 19:09:36 +01:00
Dale Weiler
d97e032fcf Cleanups and add the corrector to the makefile. Starting integration with the parser. 2013-01-04 10:05:41 +00:00
Dale Weiler
9bda8f61f4 Add specialized diagnostics for when predefined macros are used and ftepp predefined macros are not enabled. 2013-01-03 12:04:32 +00:00
Wolfgang Bumiller
ae09831227 Introducing TYPE_NOEXPR so that these undefined labels cannot be used on the expression side of goto ternary expressions; ast_label now is TYPE_NOEXPR; we may consider setting ast_ifthen to that too unless we want ifthen to return a value... 2013-01-03 12:49:21 +01:00
Dale Weiler
467a4740da Fix some issues 2013-01-02 16:34:55 +00:00
Dale Weiler
686394654f Implemented a optimized hash-set that can be used in various parts of the compiler (to get a little more speed). I intend this to replace the hackery that is code_genstring, and code_util_str_htgeth. 2013-01-01 07:59:04 +00:00
Dale Weiler
29db4a44ed Happy new years! 2013-01-01 05:08:55 +00:00
Dale Weiler
1182ab55c5 Fix #include for <machine/endian.h> s/endiane/endian/ 2012-12-31 14:40:08 +00:00
Wolfgang Bumiller
e37adb8c47 GMQCC_GITINFO 2012-12-28 20:39:30 +01:00
Wolfgang Bumiller
40b2a26e89 TYPE_NIL, builder->nil, ast_value_codegen for TYPE_NIL 2012-12-28 18:05:28 +01:00
Dale Weiler
8f34e9fa37 added util_vasprintf/util_asprintf .. so we can stop assuming a certian static array size for formatting strings ... I expect to see full migration to this before the next release for protection of over/under flows. As well as identifers >= 1024 bytes :) 2012-12-28 15:02:53 +00:00
Dale Weiler
566dda6ad7 Working on getting gmqcc to work when compiled with tcc 2012-12-28 09:30:01 +00:00
Wolfgang Bumiller
5cfd97c344 -fbail-on-werror option 2012-12-27 12:46:36 +01:00
Wolfgang Bumiller
b42328dbc6 Switch over to LONGBIT 2012-12-26 21:39:00 +01:00
Wolfgang Bumiller
2d66431af4 -q, --quiet option 2012-12-24 10:53:51 +01:00
Dale Weiler
fa155f8a42 Added my awesome MT1997 PRNG, and use it instead of stdio's rand()/srand() .. which are implementation specific .. and simply unsafe (for example one of the compilers at work simply has it's standard library implementation of rand() return 0 always (which is perfectly conformant)). 2012-12-24 01:43:27 +00:00
Wolfgang Bumiller
d3568627e9 code_genstring now caches strings, no need for code_cachestring 2012-12-23 21:42:00 +01:00
Wolfgang Bumiller
cff74493a7 Even safer vector macros 2012-12-23 20:55:15 +01:00
Wolfgang Bumiller
46c2fe2443 Fixing vector macros 2012-12-23 20:49:50 +01:00
Wolfgang Bumiller
e72d141ec4 Uchar -> uchar_t for consistency 2012-12-23 10:34:29 +01:00
Wolfgang Bumiller
a707440e52 -futf8 implementation 2012-12-23 10:23:42 +01:00
Wolfgang Bumiller
fe3d8e44e6 Importing utf8lib 2012-12-23 10:23:41 +01:00
Dale Weiler
da49a40b96 Bump 0.2 -> 0.3 2012-12-23 09:18:17 +00:00
Dale Weiler
d51a6ab3db Whitespace 2012-12-23 09:10:31 +00:00
Dale Weiler
5bc815c63f Revert "Whitespace fixes"
This reverts commit 4580dcf1ea.
2012-12-23 09:10:07 +00:00
Dale Weiler
4580dcf1ea Whitespace fixes 2012-12-23 08:42:53 +00:00
Dale Weiler
f598fbeaea Actually fix the segfault this time 2012-12-23 08:08:05 +00:00
Dale Weiler
3b27107676 con_default_out for opts.pp_only (removes recently added TODO .. and fixes a segfault) 2012-12-23 07:57:06 +00:00
Dale Weiler
c3964cf29d Make compiler and virtual-machine compile as C++ code, also removed gmqcc_voidptr hack. 2012-12-23 07:51:19 +00:00
Dale Weiler
d35d953a91 Remove parser_compile_string_len, and make parser_compiler_string take an additional length argument. 2012-12-23 07:22:15 +00:00
Dale Weiler
6951f3dfcc fix comments 2012-12-23 07:19:49 +00:00
Dale Weiler
4224ac5ca0 fixes, and removed a #pragma warning(disable ...) in MSVC .. thanks to the FILE wrapping interface. 2012-12-23 07:18:00 +00:00
Dale Weiler
d18656c2dc Cleanup flexible array / vector system 2012-12-23 07:14:16 +00:00
Dale Weiler
13003bf6af 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) 2012-12-23 06:05:22 +00:00
Dale Weiler
322fbaf389 More cleanups 2012-12-22 07:54:14 +00:00
Dale Weiler
7753e19ba8 Cleanups 2012-12-22 07:24:25 +00:00
Dale Weiler
88fee02228 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. 2012-12-21 06:16:08 -05:00
Dale Weiler
3c003bc168 Get gmqcc/qcvm compiling on windows again. Plus work in progress support for the testsuite on windows (does not compile yet). 2012-12-21 01:00:51 -05:00
Dale Weiler
c7a62970a6 Merge branch 'master' of github.com:graphitemaster/gmqcc 2012-12-20 23:07:33 +00:00
Dale Weiler
e1f0e40341 Implemented roboust compile-time endianess check. 2012-12-20 23:07:06 +00:00
Wolfgang Bumiller
e38bdecd21 Be more correct with sizes; use a better local-alloc strategy 2012-12-20 23:48:41 +01:00
Wolfgang Bumiller
1d3fdea432 Fix util_endianswap; and endianswap the LNO data as well 2012-12-20 22:03:51 +01:00
Wolfgang Bumiller
6cd821d459 -Werror-<warning> should actually use opts_setwerror 2012-12-20 16:53:09 +01:00