Commit graph

148 commits

Author SHA1 Message Date
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
Dale Weiler
e1f0e40341 Implemented roboust compile-time endianess check. 2012-12-20 23:07:06 +00:00
Wolfgang Bumiller
1d3fdea432 Fix util_endianswap; and endianswap the LNO data as well 2012-12-20 22:03:51 +01:00
Wolfgang Bumiller
8adbb2f5ac Remove the suffix entirely 2012-12-20 13:44:53 +01:00
Wolfgang Bumiller
7833efd6e1 UL->ULL 2012-12-20 12:55:21 +01:00
Dale Weiler
f1a662a422 ugh todo: seed per ht, not per hash 2012-12-20 10:21:31 +00:00
Dale Weiler
2e57a952a7 No more hacks 2012-12-20 10:20:16 +00:00
Dale Weiler
8fda2233cb Fix murmur hash seeding 2012-12-20 08:46:39 +00:00
Dale Weiler
3e8435783c More fixes 2012-12-20 08:45:54 +00:00
Dale Weiler
9f742271b1 Another fix 2012-12-20 08:19:43 +00:00
Wolfgang (Blub) Bumiller
afaa162aa1 Applying the actual 'Fix FTFBS stuff' part 2012-12-19 22:17:22 +01:00
Wolfgang (Blub) Bumiller
57aaf57dfc Revert "Fix FTFBS stuff"
This reverts commit 2cc51b8eb0.
2012-12-19 22:15:38 +01:00
Dale Weiler
2cc51b8eb0 Fix FTFBS stuff 2012-12-19 21:05:40 +00:00
mhofstra
5fc1cc2414 Small typo fix to make it compile on x86 2012-12-18 21:57:16 +01:00
Wolfgang (Blub) Bumiller
f9b1d057b5 Moving all the global opts_ variables into a struct, now there's one global 'opts' struct 2012-12-06 13:23:53 +01:00
Dale Weiler
ca52ecc20a Remove trailing whitespace for Blub. 2012-11-26 11:12:06 +00:00
Dale Weiler
a336fb62ff fast optimized murmur hash with crc seeding, literally zero collision, and roughly only 52 instructions 2012-11-26 00:21:16 +00:00
Wolfgang (Blub) Bumiller
a1b50603e5 fixing a leak in the hashtables, htdel didn't delete the hash_node_t entries 2012-11-25 15:12:16 +01:00
Wolfgang (Blub) Bumiller
613e1e7247 Change the parser to use the hashtable functions 2012-11-25 13:23:37 +01:00
Dale Weiler
9c0231a58e Some hashtable changes 2012-11-24 21:46:28 +00:00
Dale Weiler
32c928ab6d You made substantial changes to this file, you get a name :P 2012-11-24 21:23:21 +00:00
Dale Weiler
6e047ec65b No copy, just store pointer for hash table 2012-11-23 20:01:58 +00:00
Dale Weiler
46fff99fad ast_binstore_codegen initialize left ir value to null for output left side used for lvalue to prevent clang from warning. Also fixed uninitialized bug in hashtable implementation 2012-11-23 06:26:19 +00:00
Dale Weiler
f4edbe2165 Cleanups 2012-11-23 06:17:21 +00:00
Dale Weiler
9e3399df19 Implemented hashtable as-per Blubs request 2012-11-23 06:12:01 +00:00
Dale Weiler
b5507b3127 Make it compile with -Wall and -pedantic 2012-11-23 02:23:22 +00:00
Dale Weiler
af2324e922 Fix getline 2012-11-22 22:11:53 +00:00
Dale Weiler
fcc57a1185 Fix memory leaks 2012-11-22 21:38:14 +00:00
Dale Weiler
baf69f3725 Fix more warnings 2012-11-22 20:32:08 +00: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
4517072af4 Fixing util_memory_r 2012-11-15 21:36:36 +01:00
Wolfgang (Blub) Bumiller
906f319673 Replaced it all... 2012-11-15 18:32:09 +01:00
Dale Weiler
f0750209b7 preliminary segregated console subsystem 2012-11-14 19:17:43 +00:00
Wolfgang (Blub) Bumiller
b5ea787044 util_memory_r with byte=0 will now call util_memory_d and return NULL 2012-11-10 12:17:05 +01:00
Wolfgang (Blub) Bumiller
09e18e1bbf mem_r to realloc 2012-11-10 11:16:19 +01:00
Dale Weiler
bbdba9b8d7 some awesome documentation about CRC for future viewers 2012-10-02 12:06:25 -04:00
Wolfgang (Blub) Bumiller
c024cbaaa0 Add the actual crc implementation 2012-10-02 17:56:59 +02:00
Wolfgang (Blub) Bumiller
4f0d573275 leaving the old crc in, commented out 2012-10-02 17:54:19 +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
6cbc0a84d7 Mask out "MEM" debug messages when -memchk wasn't used 2012-08-22 15:18:11 +02:00
Wolfgang (Blub) Bumiller
812794200c nicer output for lost blocks in memory info 2012-08-21 11:45:19 +02:00
Wolfgang (Blub) Bumiller
700860a435 memblock_t is now a double-linked list so we can show where data was allocated which hasn't been freed 2012-08-21 11:41:01 +02:00
Wolfgang (Blub) Bumiller
24acaa4eaf Fix output of util_memory_d 2012-08-21 10:30:53 +02:00
Wolfgang (Blub) Bumiller
8dfba4db6d -_- file->filename 2012-08-16 14:05:04 +02:00
Wolfgang (Blub) Bumiller
0d9435d326 util_fopen... 2012-08-16 14:01:47 +02:00
Wolfgang (Blub) Bumiller
c3bcfe84b0 strcpy->memcpy in util_getline 2012-08-16 13:01:30 +02:00
Wolfgang (Blub) Bumiller
78971ab85a cast mem_a returns in util_getline 2012-08-16 12:38:00 +02:00
Dale Weiler
d73100ad1b gmqcc now builds on visual studio 2012-08-14 19:06:53 -04:00
Wolfgang Bumiller
93105d4c2c Added missing parameter names 2012-07-28 19:31:02 +02:00
Wolfgang Bumiller
3321748e4a util_strtocmd, util_strtononcmd 2012-07-28 19:28:27 +02:00
Wolfgang Bumiller
c81eb57480 reuse old opts_, renamed all opt_ to opts_ to be consistent, making code.c use OPTS_FLAG() for OMIT_NULL_BYTES and DARKPLACES_STRING_TABLE_BUG 2012-07-28 19:20:19 +02:00
Dale Weiler
4a1f67bb97 Updated readme 2012-05-06 16:58:30 -04:00
Dale Weiler
99971b7806 util_strncmpexact 2012-05-04 22:01:02 -04:00
Dale Weiler
510d795c06 More assembler code (less allocations too) 2012-05-03 16:54:34 -04:00
Dale Weiler
8156374a71 Invoke tests 2012-04-29 17:28:01 -04:00
Dale Weiler
c3df4edebd Remove trailing whitespace 2012-04-28 19:03:16 -04:00
Dale Weiler
3e7a8c0e78 All code is now C89/C90 compat 2012-04-28 18:56:09 -04:00
Dale Weiler
05966ee009 Remove trailing whitespace from everything 2012-04-28 16:43:39 -04:00
Dale Weiler
1d6594a491 Fixed all invalid mmeory accesses 2012-04-28 06:31:16 -04:00
Dale Weiler
72053e16d2 Interface change 2012-04-28 05:35:32 -04:00
Dale Weiler
de01d34925 type parsing for constants, globals and locals. Sanatize constants to select internal functions to prevent possible runtime issues that could be a result of atoi working for what we consider invalid strings containing constants. 2012-04-28 03:53:23 -04:00
Dale Weiler
07c6aea7dc assembler can parse internal functions. Wrote all internal functions (that are not extensions) to test.qs 2012-04-28 03:26:40 -04:00
Dale Weiler
403901d6ee More assembly work 2012-04-28 02:34:39 -04:00
Dale Weiler
20f203495d More assembler code 2012-04-27 16:45:34 -04:00
Dale Weiler
7aee8ac2ef Working on the assembler 2012-04-27 16:31:38 -04:00
Dale Weiler
dd66080aaf removed clutter 2012-04-26 23:20:35 -04:00
Dale Weiler
fe5c322e38 Implemented support for multiple element (with assisted length) insertion on VECTOR_ expansions 2012-04-25 16:43:25 -04:00
Dale Weiler
6b5776776d CRC16 implementation 2012-04-24 16:52:53 -04:00
Dale Weiler
a68b56c2c3 AUTHORS 2012-04-24 13:05:19 -04:00
Dale Weiler
cda5076356 undo util_endianswap 2012-04-22 16:59:00 -04:00
Dale Weiler
691d146d9b -fdarkplaces-stringtablebug 2012-04-22 16:58:12 -04:00
Dale Weiler
4d001da04e Language type selection at command line. 2012-04-21 22:55:30 -04:00
Dale Weiler
7849f8c597 slightly faster hash function (using crc32), with precomputed polynomial table (256x32-bit entries, eight shifted xor operations). QuakeC header files include a crc16 in them (this isn't it, that is on the TODO list) 2012-04-21 16:02:33 -04:00
Dale Weiler
03295d7adc command line argument parsing. 2012-04-20 01:20:22 -04:00
Dale Weiler
36ff87c130 Indentation 2012-04-19 18:03:30 -04:00
Dale Weiler
082caf61bd ensure all data is LE format, cleanups, etc. 2012-04-19 16:41:03 -04:00
Dale Weiler
32b804864e Fix clang warnings 2012-04-17 17:31:07 -04:00
Dale Weiler
2bef34a4f7 Fix memory leaks, more memory tracker stuff as well. 2012-04-17 17:16:11 -04:00
Dale Weiler
477e80f1fb tabulators->four spaces 2012-04-17 16:24:22 -04:00
Dale Weiler
9031c57e39 Fix potential bug with derefrencing a NULL pointer 2012-04-17 16:22:28 -04:00
Dale Weiler
7501444add replaced getline with util_getline 2012-04-17 16:14:00 -04:00
Dale Weiler
6e3819a76c Work in progress assembler, cleanups and more. 2012-04-17 04:29:58 -04:00
Dale Weiler
98b0e11890 Cleanups 2012-04-15 17:47:14 -04:00
Dale Weiler
29a3c02c35 Removed primitive AST tree generator ... I'm planning a rewrite as we speak. 2012-04-15 07:59:22 -04:00
Dale Weiler
e4e6185d5f Count file lines 2012-04-11 15:53:40 -04:00
Dale Weiler
bda6fc826c code.c, info.txt 2012-04-10 05:09:55 -04:00