Commit graph

136 commits

Author SHA1 Message Date
Dale Weiler
8afd373e4f Fixed whitespace 2013-06-14 21:36:16 +00:00
Dale Weiler
b773702a47 Fix builds 2013-06-09 00:11:52 +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
9af3c502da Major utility rewrite for compiler memory utilization statistics. Cleanups everywhere, no more NOTRACK stuff, all allocates are tracked. Major identifier cleanups as well. 2013-06-02 08:21:06 +00:00
Dale Weiler
ec7bf4767a Some static 2013-06-02 05:32:37 +00:00
Dale Weiler
1ce8d2ea6e Hashtable statistics too 2013-06-02 05:09:28 +00:00
Dale Weiler
f884bd2217 Track hashtables too 2013-06-02 04:45:04 +00:00
Dale Weiler
79a7aa70b9 Track strdups too in the statistics 2013-06-02 04:38:20 +00:00
Dale Weiler
c8daf483f3 This was an experiment that snuk it's way inside that commit. 2013-06-02 04:32:20 +00:00
Dale Weiler
166b79720c Vector tracing, step two in determining how to lower memory usage. 2013-06-02 04:29:53 +00:00
Dale Weiler
121e080697 Guart statistics by option. 2013-06-02 00:07:54 +00:00
Dale Weiler
280dfdd3f8 Add statistics for vector usage to the output. Step one in lowering memory usage. ONE FUCKING MILLION VECTORS for XONOTIC.. 2013-06-02 00:03:27 +00:00
Dale Weiler
655822ec1a Doh 2013-06-01 20:20:25 +00:00
Dale Weiler
062180e9a8 Fix some possible memleaks. 2013-06-01 20:18:53 +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
Dale Weiler
10dd7aacfe Apply some static where it belongs 2013-04-25 03:34:42 +00:00
Dale Weiler
1b5504fb9e Fix alignment issues (can remove a clang warning, and also makes our code more portable!) 2013-04-25 03:17:52 +00:00
Wolfgang Bumiller
3a4aba0b31 Grrrr 2013-04-24 17:47:42 +02:00
Dale Weiler
489ad486bc Get it compiling in visual studio again. 2013-04-24 01:43:53 +00:00
Dale Weiler
160e7cf7ee Remove trailing whitespace 2013-04-21 10:24:55 +00:00
Dale Weiler
b47e3ebccf Remove hashset 2013-04-21 04:56:41 +00:00
Wolfgang Bumiller
46752af74b parser_const_string now uses hashtables; hashtables may want to dup an empty string without it becoming NULL - also replacing ir_strdup with the new util_ one 2013-04-17 18:23:30 +02: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
1c51fb80eb Fix memdump printing 2013-04-16 09:13:22 +00:00
Dale Weiler
f2b21158d8 Rewrote memory tracking, now prints highest water mark (most used memory at a given time during compile). Changes all byte representation to MB representation. Added ability to print the contents of the leaked memory to the console when -debug is on (infact the lost messages only print during -debug), -memchk simply reports the memory info at the end (it is also printed when -debug). You can set the memory dump columns with -memdumpcols=# where # is the number of columns you want (default is 16) 2013-04-15 20:54:53 +00:00
Wolfgang Bumiller
1caf1b3ebe util_strdup: don't use util_memory_a with -DNOTRACK 2013-04-15 20:53:53 +02: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
ccc2eb3298 More function flatening 2013-04-14 01:14:14 +00:00
Dale Weiler
5f9f6c11b8 Get it compiling with C++ compilers again. 2013-01-30 06:49:50 +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
4f873e1d9d remove never reached return 2013-01-06 12:39:37 +00: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
861987e13e Work on "did you mean? <ident>" support for errors. Using a three-part Bayes Theorem expression (language model, error model and control mechanisim). 2013-01-03 19:44:13 +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
2f356f12e6 Fix util_vasprintf. 2012-12-31 18:50:57 +00:00
Dale Weiler
f4c3080824 Add todo about util_vasprintf (too lazy to fix right now) 2012-12-31 18:34:13 +00: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
Wolfgang Bumiller
35ba2dcaf9 The very aggressive -Ooverlap-strings 2012-12-25 20:38:05 +01:00
Dale Weiler
f811a4e876 one too many zeros 2012-12-24 08:19:57 +00: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
2382fdee50 util_swa_* + GMQCC_INLINE 2012-12-23 13:11:20 +01: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
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
9ba655e74c Remove more unused code 2012-12-22 07:46:43 +00:00
Dale Weiler
313e442107 Make gmqcc binary smaller (by removing some useless code) 2012-12-22 07:40:17 +00:00
Dale Weiler
ed11fe130b Stick to one hash function (no platform optimized versions) 2012-12-22 07:33:11 +00:00