Commit graph

74 commits

Author SHA1 Message Date
Adam Olsen
67e4fa85bf add support for \<, \>, and \^ to qfcc. \< bolds all characters (toggles bold really) until \>, and \^ bolds (toggles) the next character. 2001-06-19 23:27:07 +00:00
Bill Currie
20bf698330 fix \x handling for 0-9 2001-06-19 22:26:16 +00:00
Bill Currie
f50ce04ccb d'oh, forgot to add 10 for a-f and A-F 2001-06-19 22:13:35 +00:00
Bill Currie
af701d74cd fix infinite loop for \x... 2001-06-19 21:45:57 +00:00
Bill Currie
2647e63810 finally fix the tupe corruption. 2001-06-19 16:01:38 +00:00
Bill Currie
bdc0ba32ca pr_lex.c:
add PR_PrintType (and lotsa debug to PR_FindType)
qc-parse.y:
	fix up one bit of type corruption, only to find another :/
2001-06-19 07:28:50 +00:00
Bill Currie
89fecd7cee slowly getting there with defs processing. still borked 2001-06-18 22:51:49 +00:00
Bill Currie
9f158b148e now cross builds out-of-the-box 2001-06-16 05:16:02 +00:00
Bill Currie
7254dc0052 rename filelength to FileLength to avoid a name clash in windows 2001-06-16 04:27:22 +00:00
Bill Currie
b595f0122f got function params scope sort of sorted out 2001-06-15 20:38:57 +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
f9baacd440 beginnings of code generation. hangs :) 2001-06-14 21:49:47 +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
2c26de2c2b oops 2001-06-12 22:26:52 +00:00
Bill Currie
72b93d0062 more stuff 2001-06-12 22:26:10 +00:00
Bill Currie
489ddbc7a7 getting closer. soon timie to start putting real code in there 2001-06-12 21:06:28 +00:00
Bill Currie
7d52f12248 clean up C warnings 2001-06-12 20:24:02 +00:00
Bill Currie
3be018e1f9 beginnings of a bison grammar for qc 2001-06-12 19:44:26 +00:00
Bill Currie
c0654f3541 miss tagged string != string 2001-06-12 15:29:05 +00:00
Bill Currie
aa825853bf full \ handling in strings (including \e for escape (why C doesn't have that
is beyond me))
2001-06-11 23:37:01 +00:00
Bill Currie
dfb6062f9d fix an out-by-one for line directives at the beginning of the file 2001-06-11 17:51:09 +00:00
Bill Currie
c732d098f4 add '# 1 "foo.qcc" ...' (flags ignored) processing to qfcc so preprocessed
output can make sense.
2001-06-11 15:43:06 +00:00
Adam Olsen
f094db3977 add support for --with-qf=/usr/local as a prefix for lib and include dirs 2001-06-10 13:07:30 +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
0186732130 make initialized local variables work /properly/
local float urk = 0;
STORE_F    46(IMMEDIATE)  0.0   55(?)
2001-06-08 20:13:10 +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
8656eb998a add ChangeLog 2001-06-08 00:18:53 +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
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
55d58f8d46 ignore .vimrc 2001-06-04 18:33:50 +00:00
Bill Currie
42c880ab8a formatting cleanup 2001-06-04 18:33:32 +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
4aa47d728a use the correct STORE_ op for function arges, rather than STORE_V. Should
speed up progs in general.
2001-06-04 03:57:15 +00:00
Bill Currie
275e74161b string comparison operators 2001-06-04 03:36:35 +00:00
Bill Currie
7178824ee6 put ADD_S up where it belongs :) 2001-06-04 02:49:59 +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
09118bc01e pr_comp.h:
add OP_ADD_S. WARNING!!! this /will/ move.
progs.h:
	add prototype for PR_PrintStatement
pr_edict.c:
	add OP_ADD_S support in the progs checker
pr_exec.c:
	implement OP_ADD_S
tools/qfcc/include/.gitignore:
	add config.h.in
qfcc.h:
	nuke PR_NameImmediate and change PR_ParseImmediate's prototype (see
	pr_imm.c)
pr_comp.c:
	add ADD_S, adjust for PR_ParseImmediate's prototype, make
	PR_ParseExpression work with non-sequential opcodes (slow, will work on
	that next). Fix up initialised global parsing.
pr_imm.c:
	nuke PR_NameImmediate. didn't work well and wasn't such a good idea anyway.
	PR_ParseImmediate now accepts a def_t * arg. if null, will allocate a
	new global def, otherwise it will initialize the def passed in.
qwaq/main.c:
	sports some debugging code (dumps info about the progs it's running)
qwaq/main.qc:
	better ADD_S testing
2001-06-03 17:36:49 +00:00
Bill Currie
297f7c0567 this shouldn't be here 2001-06-02 05:23:00 +00:00
Bill Currie
351e70b3bd replace a missing / when producing files.dat 2001-05-22 18:23:29 +00:00
Bill Currie
2f2ba28bb7 pr_lex.c:
rewrite PR_LexPunctuation to avoid looping. 6x speedup for that function
	according to gprof on customTF
configure.in:
	--enable-profile
2001-04-03 16:50:31 +00:00
Bill Currie
f896506835 heh, seem to have forgotten this 2001-04-02 21:30:16 +00:00
Bill Currie
b7aba0b643 allow named constants to be checked for immediate constants. qfcc now produces
the same number of globals etc as it used to
2001-04-02 18:43:10 +00:00