Commit Graph

29 Commits

Author SHA1 Message Date
Bill Currie b1f264b203 using qfpreqcc is now vewy vewy qwiet ('e's 'unting wabbits) 2001-07-03 21:17:02 +00:00
Bill Currie f2bb7ace41 add an option (--warn=error) to treat warnings as errors 2001-06-28 23:15:10 +00:00
Bill Currie 9c2398d923 stop processing files after errors have occured 2001-06-28 23:08:52 +00:00
Bill Currie 3fa3ab59a9 clean up error reporting a little 2001-06-25 23:42:49 +00:00
Bill Currie 625915288c hopefully make line directives work 2001-06-25 23:38:32 +00:00
Bill Currie 53b66ef2e0 better label handling and strings are now completely parsed (including escapes) 2001-06-25 22:11:20 +00:00
Bill Currie df897255ff make usage of the new parser easier to configure 2001-06-25 18:22:53 +00:00
Bill Currie 56aafce20c qfcc.h:
rearrange def_t a little and add def_next (leaving next free for other
	uses)
pr_def.c:
	use def_next instead of next to link /all/ of the named defs
qfcc.c:
	ditto
2001-06-20 03:05:50 +00:00
Bill Currie 327e95a3c8 gcc 3.0 fixes 2001-06-20 02:07:20 +00:00
Bill Currie eeaab95be5 beginnings of expression and def handling. 2001-06-15 19:38:43 +00:00
Bill Currie 373ea8132a more work on the code generation and make generally usable again by disabling
the new stuff
2001-06-15 07:16:18 +00:00
Bill Currie d7ebba6a74 parses CustomTF now, but no code generation 2001-06-13 18:35:41 +00:00
Bill Currie c89da89b69 almost parses CustomTF ($macro junk next) 2001-06-13 07:16:39 +00:00
Bill Currie bbc97079e0 pr_comp.h:
define PROG_ID_VERSION as 6 and redefine PROG_VERSION as 0x00fff001
	(0.fff.001) for the new qc features.
pr_edict.c:
	support version 6 and version 0.fff.001 progs
qfcc.h:
	add version field to options_t
	add min_version field to opcode_t
pr_opcode.c:
	set the minumum version of each opcode (gee, that table is getting ugly)
	filter out opcodes with too high a min_version when initializing the opcode
	hash tables.
qfcc.c:
	update help output.
	accept --id to limit code generation to id compatable (ver 6) progs.
	default progs generation to 0.fff.001
2001-06-09 06:25:33 +00:00
Bill Currie 7ef4c2776e Immidiate sharing now /works/ (shaved off two pr_globals from CustomTF, too:).
Detect assignments to initialized globals and give an error, unless the --cow
(copy on write) option is given, and then allocate a new global for the var,
clear its initialized flag.
Relocate all globals.
2001-06-08 06:32:15 +00:00
Bill Currie 867260d27d report the size of the locals pool 2001-06-06 00:34:35 +00:00
Bill Currie c3cdfce12b don't bother writing out local defs as they mess up progs dumping now that
they overlap
2001-06-06 00:12:10 +00:00
Bill Currie d86ed9a3b9 relocate the locals defs as well as their references 2001-06-05 23:52:34 +00:00
Bill Currie bbb37d0080 customTF is now down to 4989 pr_globals. all parameters, local veriables and
termporary variables sit in one pool of memory (at the end of the globals)
thus drasticly reducing globals requirements. This works because the whole
lot is declared to be in the function's local variable space which is copied
to the locals stack in the progs engine.
2001-06-05 08:09:12 +00:00
Bill Currie e339e82c01 hash.h is now const correct as is a lot of qfcc 2001-06-04 04:52:14 +00:00
Bill Currie ddcd172a03 re-write the opcode selection to be a hash table lookup and statment generation
to get the opcode from the table record rather than the location within the
table (ewww). gives a nice speed boost /and/ makes the opcode table easier to
maintain.
2001-06-04 02:41:45 +00:00
Bill Currie 351e70b3bd replace a missing / when producing files.dat 2001-05-22 18:23:29 +00:00
Bill Currie 02b09f4e5c no more redundant strings. costs ~7ms, though, but HALVING the strofs size
in frikbot seems worth it.
2001-04-01 06:40:51 +00:00
Bill Currie 43ea8f4fc0 Rip out I_FloatTime from cmdlib.
Use Sys_DoubleTime instead of I_FloatTime and print out ms for compilation
2001-04-01 03:33:11 +00:00
Bill Currie ec16ffaa65 move to using hash tables for variable lookups.
WARNING: this fixes a scope bug in qcc and thus you WILL get different (but
now correct) code for the following:

float foo;

void () bar =
{
	local float foo;
	foo = 0;
}

ie, the local foo will, as is correct, now be a separate var to the global
foo.
2001-04-01 02:12:57 +00:00
Bill Currie 8866d86fba rip out the crc code in favour of libqfutil 2001-03-28 23:40:54 +00:00
Bill Currie cb5c262ffc qtypes.h:
remove includes of qdefs.h and compat.h
pr_comp.h:
	merge pr_comp.h from quake and qfcc, removing the copy in qfcc
cmdlib.[ch]:
	nuke the endian code.
qendian.c:
	initialise the LittleLong etc pointers at compile time rather than run
	time
com.c (both nq and qw):
	nuke the LittleLong etc init code
everything else:
	fix up after the qtypes.h cleanup
2001-03-28 17:17:56 +00:00
Bill Currie 21fa23a747 the crc field in progs.dat is evily generated from the crc of progsdef.h, so
change the header to produce a matching crc. This is an interrim fix until a
better solution can be found.
2001-03-12 20:04:22 +00:00
Jeff Teunissen 2dd03876af QFCC -- the QuakeForge Code Compiler -- an autoconfiscated qcc.
It sucks, but it works, and will form the basis for something that Does
Not Suck.
2001-02-24 06:58:54 +00:00