Commit Graph

21 Commits

Author SHA1 Message Date
Adam Olsen 3bba5398ba - audit malloc usage. now everything checks the return value :) 2001-10-24 22:50:06 +00:00
Bill Currie 6553c81a41 proper scoping for QC ala C. 2001-10-24 06:39:49 +00:00
Bill Currie 5ca785e7e8 uninitialized variable detection. not perfect (lots of false negatives, but
fewer than before;) but prozac isn't giving any false positives.
2001-10-18 20:05:26 +00:00
Bill Currie 7407e4f1b7 and some more 2001-09-28 07:09:38 +00:00
Bill Currie c74fc1c0df make the unused var warning like gcc's 2001-09-24 17:51:15 +00:00
Bill Currie 7aec6e253a unused local variable detection 2001-09-22 23:41:47 +00:00
Bill Currie 9f715ae9f8 more small old-parser cleanups 2001-09-15 20:31:17 +00:00
Bill Currie 4c48851096 fix a buffer overflow in new_label_expr
use reference counting for temp defs and call PR_FreeTempDefs at the end
of emit_sub_expr as well as emit_expr.
fix a (relatively harmless) bug in type processesing of foo.bar =
2001-08-22 21:55:01 +00:00
Bill Currie 4388bf0519 good bye, old parser 2001-08-10 18:35:55 +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 2647e63810 finally fix the tupe corruption. 2001-06-19 16:01:38 +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 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 a26f799de4 allocate temps based on size rather than type (get better re-usage this way)
put temps onto the local scope.
2001-06-05 05:22:11 +00:00
Bill Currie 17e19f3892 regain about 5000 globals for customTF, but this fixes possible breakage with
premature temp var re-usage (ie, it puts the temps back into the locals space).
2001-06-04 22:35:54 +00:00
Bill Currie e090f3c9e3 do proper temp def handling so we don'e use any where near as many defs for
temporary variables (customTF went from 35941 to 12587 pr_globals).
2001-06-04 17:52:50 +00:00
Bill Currie 53e9fb65d1 prepare PR_Statement for proper temporary usage 2001-06-04 05:45:51 +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 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 59e55834ed Another massive speadup caused by using hash tables to lookup already
generated immediate values. frikbot now compiles in just over 1s on my
machine.
2001-04-01 06:01:02 +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