Commit Graph

57 Commits

Author SHA1 Message Date
Bill Currie 75ec6bf244 Clean out some unnecessary types from the progs engine and clean up the mess.
This is a nasty commit, sorry, but 99% of the commit is interdependent.
2011-01-10 12:25:31 +09:00
Bill Currie fac98536f0 make sure def->space points to the space the def's location is allocated from to ensure that freeing the location works properly (fixes the bogus address triggered by prozaccoop: thanks, phrosty) 2010-02-22 13:11:41 +00:00
Bill Currie d558444b77 make temp def problems a little easier to understand
o  set return_address whenever a temp def is requested, no only when it is
    actually created.
 o  make the notices about temp reference counting problems a little more
    readable and include the name of the temp
2010-01-13 06:24:29 +00:00
Bill Currie 680bc22697 better error reporting for redefines 2007-05-13 09:02:51 +00:00
Bill Currie 52d178b3be Add a code generation option, "local-merging", to control qfcc's merging of local variable blocks into one block. Defaults to on for advanced mode and off for traditional. 2007-04-10 13:00:21 +00:00
Bill Currie 0382b05780 various unsigned long -> uintptr_t conversions 2007-04-04 11:22:48 +00:00
Bill Currie 3fb03fc2be hah, should have been using __attribute__((used)) all that time (rather
than __attribute__((unused))). fixes the missing console in -x11
2005-08-04 15:27:09 +00:00
Bill Currie 116860bb66 don't segfault when running out of globals 2005-06-10 05:16:20 +00:00
Bill Currie 66257e3a88 run in fear, function overloading is here
This is an imperfect revision of history.
2004-11-13 11:50:00 +00:00
Bill Currie 50dc955652 fix a couple out-by-one errors highlighted by quaternions 2004-04-09 02:20:47 +00:00
Bill Currie 0360859a0f all warnings (except for @self and self) are now fully controllable 2004-02-17 00:39:21 +00:00
Bill Currie bf592412f8 give temp defs a name, making it easier to read disassembly output (.tmpN) 2004-02-06 08:58:19 +00:00
Bill Currie 385a90e8fb correct pr_symtab_t to include the pointer to the array of selectors used
in the module. Unfortunatly, this requires a version bump on both qfo and
progs files due to the changes structure layout.
2003-08-23 06:15:19 +00:00
Bill Currie 6ecb707257 revamp the struct system so "struct foo;" does the right thing (ala C) 2003-07-30 04:11:45 +00:00
Bill Currie 378c477b8e setup vector fields properly 2003-07-23 18:40:09 +00:00
Bill Currie 778cd78c35 fix some namespace issues with names both being a field and an ivar 2003-07-23 18:28:31 +00:00
Bill Currie b6b5089ccc add a "nosave" flag to defs making it easier to make defs that don't get
saved automaticly
2003-04-25 17:00:22 +00:00
Bill Currie 2f6fc5d80c general revamp so params and the return value use proper defs rather than
hardcoded locations. this will allow use of quaternions in the future.
2003-04-22 15:29:32 +00:00
Bill Currie eb099ae0d3 make qf gcc 3.3 clean 2003-04-17 00:01:48 +00:00
Bill Currie 5a58c58e7a don't initialize external defs. this broke source line/file tracking for
@extern defs in headers.
2003-02-24 19:13:56 +00:00
Bill Currie 761a7546dd re-arrange things so __attribute__ and __builtin_expect are properly
autoconfiscated so rcsid will continue to work with gcc 3.3
2003-01-15 15:31:36 +00:00
Bill Currie 567b905590 copyright block work 2002-10-22 14:53:18 +00:00
Bill Currie 22d3cf9664 rename the def_void and dev_function defs 2002-10-09 19:17:45 +00:00
Bill Currie a20bb946f6 type.[ch]:
provide a vector structure def so vector.[xyz] can be implemented
def.c:
	record the return address in get_temp to aid debugging
2002-10-08 22:35:37 +00:00
Bill Currie f992090b18 don't do extra manipulations for unnamed defs 2002-10-08 18:03:23 +00:00
Bill Currie 412db7e27d "for example" is more appropriate than "that is" 2002-09-16 15:42:11 +00:00
Bill Currie 090e65bc09 mark allocated fields constant 2002-09-12 18:34:17 +00:00
Bill Currie f6cdbdf63c make sure an initialized def has the correct source file and line info 2002-09-07 06:45:51 +00:00
Bill Currie c927b2e834 quakefs.c:
allow . and .. in a path so long as the result doesn't escape from the
	game directory
cl_menu/Makefile.am:
	don't strip source paths
optoins.qc:
	use InputLine object
def.c:
	use notice to show stray temps
emit.c:
	make sure expression args get emitted for function calls
expr.c:
	'C' is a cast
	rewrite cast_expr to handle casted pointere derefs
2002-08-20 06:11:10 +00:00
Bill Currie cab813c559 check the scope when checking for duplicate vector sub-defs 2002-08-16 16:51:00 +00:00
Bill Currie 0840678465 handle extern -> defined transition properly for vectors 2002-08-13 21:19:30 +00:00
Bill Currie b0d568d85f local defs for debug info now work 2002-07-17 15:40:08 +00:00
Bill Currie 678a45cfe2 entity fields seem to work. I guess this means separate compilation is now
useful :)
2002-07-16 21:59:47 +00:00
Bill Currie c36b7e36d2 fix external vectors and only complain about undefined externals that are
actually used
2002-07-16 20:09:14 +00:00
Bill Currie 3cf754db30 keep the return def out of .qfo files (for now, anyway) 2002-07-12 15:54:46 +00:00
Bill Currie 24d473c386 more linking fixes 2002-07-12 06:17:24 +00:00
Bill Currie a9899087d3 fix a bunch of silly bugs and get the linked output written (hangs, though) 2002-07-11 21:04:09 +00:00
Bill Currie 2df43ef941 make data handling a little easier 2002-07-11 15:42:20 +00:00
Bill Currie 8a402381e6 redo how progs strings are stored so multiple pools can exist 2002-07-05 20:02:10 +00:00
Bill Currie 46bad45c7a move s_file, pr_source_line and pr_error_count into pr, make the linker
errors more meaningful, and fix a blasted string.h issue (damn old gcc;P)
2002-07-03 21:32:03 +00:00
Bill Currie 102eab0d84 linker.[ch]:
start working on the linker.
class.[ch]:
	redo class defs so the pointer works (needs relocs still)
obj_file.h:
	add prototype for read_obj_file, QFO_* data access macros and include
	pr_debug.h
type.[ch]:
	separate type system initialisation and recording of the standard types
	so find_type works properly in multiple compilation
def.c:
	don't mark static defs as initialized
expr.c:
	proper class pointer def stuff
immediate.c:
	clean out dead vars/code
obj_file.c:
	allocate space for the line info and bail if the file can't be opened.
qfcc.c:
	register the standard types for each compile pass and start linking the
	files
2002-07-03 20:16:32 +00:00
Bill Currie 9332ea30bc oops, forgot to copy the string again when I went from strdup to save_string 2002-07-03 19:12:29 +00:00
Bill Currie b81f77803c make extern more of a no-op when the def alread exists 2002-07-03 06:42:54 +00:00
Ragnvald Maartmann-Moe IV 4bd03bfff3 Hack to make error-on-warnings happy. *pokes taniwha* 2002-07-03 00:36:44 +00:00
Bill Currie 211b11c8ae some storage and obj file fixes 2002-07-02 23:08:44 +00:00
Bill Currie e6c4e0b576 some more storage class work 2002-07-02 21:34:40 +00:00
Bill Currie 66aa36b73f start implementing storage classes (extern, static, etc) 2002-06-28 17:59:32 +00:00
Bill Currie 8415db2d84 clear out the hash tables for compiling multiple object files 2002-06-28 16:00:01 +00:00
Bill Currie 001571e25a various memory saving tricks. seems to have not broken anything 2002-06-27 22:48:28 +00:00
Bill Currie cbffb4b140 clean up the vector def setup 2002-06-17 02:43:38 +00:00