Bill Currie
51b0a66ac7
better constant folding with auto-conversion between scalar types (might
...
make that optional for non-constants)
2004-01-25 08:55:03 +00:00
Bill Currie
5f97de56d1
fix a few bugs
2003-10-22 09:14:53 +00:00
Bill Currie
945006494f
short circuit logic for && and || (as per C). forces standard precedence
...
(ie, breaks --traditional) when enabled (no choice at the moment, next fix)
2003-10-22 08:05:17 +00:00
Bill Currie
23b525059f
cast between integer and unsigned just by changing access method
...
effectively deprecating conv.ui and conv.iu (they'll die eventually:)
2003-09-02 16:45:36 +00:00
Bill Currie
3a6c8b8b16
wrong place to decrement uses. now have a problem in switch :/
2003-09-02 06:23:57 +00:00
Bill Currie
b01d4d4589
get the type for the destination from the right place (hope that wasn't
...
a bugfix for something else:)
2003-08-24 20:38:32 +00:00
Bill Currie
7cffeb27bf
correct the temp def counting when casting
2003-08-24 08:17:31 +00:00
Bill Currie
6086aa2b99
allow casts between pointers and integers
2003-08-24 08:03:25 +00:00
Bill Currie
b38486d405
make rel_def_op work properly
2003-08-22 19:48:14 +00:00
Bill Currie
e9ca03416a
create the temp def for bound defs properly
2003-08-22 18:16:30 +00:00
Bill Currie
11c7c27f70
better relocations: pointers to structure members now work
2003-08-21 02:21:30 +00:00
Bill Currie
448b6f24be
make the useless expression warning more interesting
2003-08-05 21:41:48 +00:00
Bill Currie
8099f0d8f2
handle addresses of void defs
2003-07-30 20:57:50 +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
dedb2fa6bf
get [super ...] working correctly
2003-05-15 05:58:31 +00:00
Bill Currie
f59f766af1
use the correct type when taking the address of a pointer derefernece
2003-05-13 19:42:14 +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
a21054fdfc
handle def aliases properly in emit_move_expr
2003-04-22 17:26:49 +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
627c6f70f5
allow casting between function types
2003-03-10 21:23:05 +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
71196fedf6
make gcc more anal about prototypes, string constants and function
...
visibility (ie, global functions must have a prototype)
2003-01-06 18:28:13 +00:00
Bill Currie
567b905590
copyright block work
2002-10-22 14:53:18 +00:00
Bill Currie
262baccd0e
remove debug code :P
2002-10-20 03:31:08 +00:00
Bill Currie
7bb6dd7197
make chained structure assignments (mostly) work. found a bug in the
...
handling of pointer immediates which needs fixing before this will work in
general
2002-10-20 02:35:12 +00:00
Bill Currie
54564a4726
structure copies now seem to work
2002-10-16 17:07:01 +00:00
Bill Currie
0c0e4b23de
d'oh, temps are never global
2002-10-16 06:39:49 +00:00
Bill Currie
6af57049d5
make pointers work a bit better
2002-10-16 02:04:06 +00:00
Bill Currie
823822301f
support emitting bind sub-expressions
2002-10-09 19:16:55 +00:00
Bill Currie
308ff7163f
emit.c:
...
implement % for v6 code. hacky, but it works :) (Closes : #29 )
expr.c:
emit the body of a block expresion before emitting its result (needed
for v6 %)
2002-09-13 17:12:26 +00:00
Bill Currie
882d0f25ce
the code memory block can move around so take the address of a statement
...
after statments have been emitted, not before.
2002-08-30 05:33:34 +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
8d6c491390
fix branches (been broken for a while :/)
2002-07-17 18:45:17 +00:00
Bill Currie
34da93f251
get line numbers working on link and fix a bug in the creation of aux
...
functions
2002-07-17 14:19:30 +00:00
Bill Currie
b9b9f03e82
keep short defs out too
2002-07-12 16:01:40 +00:00
Bill Currie
2cb6138f2b
fix a silly segfault and make statement allocation saner
2002-07-08 20:31:59 +00:00
Bill Currie
c1894db59f
split the emit stuf out of expr.h into emit.h
2002-07-08 18:53:07 +00:00
Bill Currie
4c8e157db2
nuke pr.statement_linenums as it was redundant and the info never used anyway
2002-07-08 03:05:44 +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
fb0318621d
and for my next amazing feat, I'll remove the debug code :P
2002-06-13 07:22:53 +00:00
Bill Currie
5bbcbe0185
arrays seem to be working nicely now (menus work:)
2002-06-13 07:20:15 +00:00
Bill Currie
88fc0be127
arrays are /almost/ working again
2002-06-12 22:37:18 +00:00
Bill Currie
f7d8c2968f
better global (and other space) def re-use
2002-06-10 23:14:32 +00:00
Bill Currie
1f67ea412d
add a global flag to def_t to make checking easier
...
rename pr.globals to pr.near_data and add pr.far_data
2002-06-10 20:54:22 +00:00
Bill Currie
1e57351be1
there, no more PR_* functions or pr_* files :)
2002-06-09 04:30:02 +00:00
Bill Currie
943c2eefb3
redo def allocation to come from configurable `spaces' (locals, globals, far
...
globals, etc).
2002-06-09 03:57:20 +00:00
Bill Currie
dc0e31916f
fix a minor oopsie with the relocations
2002-06-07 17:39:57 +00:00
Bill Currie
00a54ad918
redo relocations
2002-06-07 17:29:30 +00:00
Bill Currie
38d3a15413
d'oh, forgot to compile test :P
2002-06-05 19:31:43 +00:00