Commit graph

50 commits

Author SHA1 Message Date
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
37ccf19769 added __STD_VERSION_[MINOR/MAJOR]__, and vec_upload 2012-12-02 04:30:46 +00:00
Wolfgang (Blub) Bumiller
836935fba2 Remove unused omit-nullbytes code in code.c 2012-12-01 23:14:52 +01:00
Wolfgang (Blub) Bumiller
6fc00e523d All ir_instrs now get their lex-context, so that we can create an LNO file with -flno 2012-11-30 18:20:02 +01:00
Dale Weiler
5c0a62be96 Add respective license headers + some cleanups 2012-11-24 21:22:35 +00:00
Dale Weiler
f454a9f9cd Whitespace 2012-11-24 20:33:03 +00:00
Wolfgang (Blub) Bumiller
906f319673 Replaced it all... 2012-11-15 18:32:09 +01:00
Wolfgang (Blub) Bumiller
354dd94b95 Generating checksums 2012-10-02 17:09:49 +02:00
Wolfgang (Blub) Bumiller
9a1ec9aaa3 code_crc added, initializing to 0 2012-10-02 16:01:35 +02:00
Wolfgang (Blub) Bumiller
9f411a533a Add the empty globaldef/fielddef to the object, savegame skips that null-def when saving variables... 2012-08-23 18:40:10 +02:00
Wolfgang (Blub) Bumiller
defb0fb6c4 using %i for instruction opcode output is a little more consistent with the above data, so you can quickly spot if an operand is a local or something else 2012-08-22 18:27:49 +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
Wolfgang (Blub) Bumiller
0d9435d326 util_fopen... 2012-08-16 14:01:47 +02:00
Wolfgang Bumiller
d05bee94d1 code_alloc_field to allocate entityfield data, ir now has ir_builder_create_field - so that globals and fields can be created separately - properly 2012-07-28 21:55:01 +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
Wolfgang (Blub) Bumiller
f1a2ac624f Moving prog_section and prog_header to gmqcc.h to not have it twice: previously was in code.c and exec.h 2012-06-27 22:04:58 +02:00
Wolfgang (Blub) Bumiller
24d35d8ab8 generate the trailing zero 2012-06-25 11:52:34 +02:00
Wolfgang (Blub) Bumiller
9ef0435f9d fixing fwrite calls I had messed up 2012-05-09 18:24:13 +02:00
Wolfgang Bumiller
1fd7e30de6 code_cachedstring 2012-05-09 15:03:19 +02:00
Wolfgang Bumiller
edcb976053 Convenience function to store a predefined string in the qc string area 2012-05-09 15:03:19 +02:00
Wolfgang Bumiller
8bfbe4d619 Preparing to generate code from the IR - code_write should return a bool, and take a filename rather than use program.dat hardcoded 2012-05-09 15:03:19 +02:00
Dale Weiler
510d795c06 More assembler code (less allocations too) 2012-05-03 16:54:34 -04:00
Dale Weiler
c1a85378d5 Trailing whitespace was imminent, pending editor configuration change to accomodate insanity. 2012-05-02 18:03:17 -04:00
Dale Weiler
fbe86450dc argsize parsing for assembler 2012-05-02 15:48:00 -04:00
Dale Weiler
bc318bb68e More function parsing for assembler 2012-05-02 11:48:46 -04:00
Dale Weiler
ca7ab3fd5f assembly statement operand parsing. Now all we need is tables and state to generate some valid code. 2012-05-01 20:36:37 -04:00
Dale Weiler
d51718118a Function parsing for the assembler now works, and adds the function to the function table for the code writer, quake and darkplaces can see it as well (since a def is also created) 2012-05-01 16:42:11 -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
b09d75518c almost ISO C now, fixed all the MEM_VECTOR trailing semicolon issues. 2012-04-28 05:54:24 -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
1fd2666fba code_strings_add replaced with proper multiplie element insertion vector support just added 2012-04-25 16:49:04 -04:00
Dale Weiler
8049252f65 new progs format proposal for engine developers (45% of globals are 0, why write them, let the engine populate them. We can essentially save 9884 bytes in xonotic's progs.dat with this new format.) 2012-04-24 08:19:48 -04:00
Dale Weiler
691d146d9b -fdarkplaces-stringtablebug 2012-04-22 16:58:12 -04:00
Dale Weiler
857cb72a94 Starting assembly 2012-04-20 00:44:44 -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
477e80f1fb tabulators->four spaces 2012-04-17 16:24:22 -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
e8a1cfae25 Fixes 2012-04-14 04:22:48 -04:00
Dale Weiler
9493da4f8b I got parsing to work finally. 2012-04-12 02:22:28 -04:00
Dale Weiler
e4bc0a2d6a More parsing stuff (still totally broken) 2012-04-11 19:41:04 -04:00
Dale Weiler
51e2f2b731 Implemented support for #include, but it doesn't add an include to the lexer yet. 2012-04-11 12:13:31 -04:00
Dale Weiler
9a7fa82bd0 It does hello world 2012-04-11 08:40:17 -04:00
Dale Weiler
387a6ecfa7 Test program 2012-04-11 04:18:40 -04:00
Dale Weiler
9904bb58c4 Fix memory leak 2012-04-11 03:58:31 -04:00
Dale Weiler
0b322a8944 Some perliminary code gen code (just writes a header) 2012-04-11 03:54:01 -04:00
Dale Weiler
bda6fc826c code.c, info.txt 2012-04-10 05:09:55 -04:00