quakeforge/tools/qfcc/source
Bill Currie 9ccfe8aefc [qfcc] Rewrite init_elements
The end goal was to fix erroneous non-constant initializer errors for
the following (ie, nested initializer blocks):

    typedef struct { int x; int y; } Point;
    typedef struct { int width; int height; } Extent;
    typedef struct Rect_s { Point offset; Extent extent; } Rect;
    Rect makeRect (int xpos, int ypos, int xlen, int ylen)
    {
	Rect rect = {{xpos, ypos}, {xlen, ylen}};
	return rect;
    }

However, it turned out that nested initializer blocks for local
variables did not work at all in that the relocations were lost because
fake defs were being created for the generated instructions.

Thus, instead of creating fake defs, simply record the offset relative
to the base def, the type, and the basic type initializer expression,
then generate instructions that all refer to the correct def but with a
relative offset.

Other than using the new element system, static initializers are largely
unaffected.
2020-03-05 11:05:13 +09:00
..
.indent.pro indent whitespace cleanup. not perfect, but a bit more consistent now 2001-12-06 19:49:40 +00:00
class.c [qfcc] Merge method lists instead of copying 2020-03-03 00:11:54 +09:00
codespace.c Nuke the rcsid stuff. 2012-04-22 10:56:32 +09:00
constfold.c Generate default type expressions for folded booleans 2020-02-24 02:11:31 +09:00
cpp.c Replace system defines/includes with qfcc's 2020-02-19 02:35:09 +09:00
dags.c Make operand->type actual type instead of low-level 2019-06-17 23:38:34 +09:00
debug.c Change the naming of ALLOC's free-list. 2013-03-08 22:16:31 +09:00
def.c [qfcc] Rewrite init_elements 2020-03-05 11:05:13 +09:00
defspace.c Implement aligned allocations 2020-02-15 23:49:12 +09:00
diagnostic.c Fix incorrect usage of signed verbosity 2020-02-26 17:15:52 +09:00
disassemble.c Dump operand contents for verbosity > 1. 2012-12-12 16:21:33 +09:00
dot.c Number dot dumps to help identify order 2019-06-16 19:12:18 +09:00
dot_dag.c Remove dead nodes from dags. 2012-12-25 17:07:58 +09:00
dot_expr.c Implement %% (true modulo) support in qfcc 2020-02-16 11:57:58 +09:00
dot_flow.c Better flow dot dump "scripting". 2018-08-23 20:07:11 +09:00
dot_sblock.c Make it possible to dump statement blocks in a flow graph. 2012-12-11 11:31:55 +09:00
dump_globals.c [qfcc] Remove type alias encoding 2020-03-01 16:13:18 +09:00
dump_lines.c Move the debug info out of progs_t 2020-02-25 20:07:29 +09:00
dump_modules.c [qfcc] Emit static instance lists 2020-03-02 10:48:51 +09:00
dump_strings.c [qfcc] Emit static instance lists 2020-03-02 10:48:51 +09:00
emit.c Make operand->type actual type instead of low-level 2019-06-17 23:38:34 +09:00
expr.c [qfcc] Handle bitwise not of enums 2020-03-05 01:45:38 +09:00
expr_assign.c Implicitly cast unadorned floating point constants 2020-02-23 22:28:54 +09:00
expr_binary.c Allow non-short-circuited logic to work 2020-02-24 02:25:28 +09:00
expr_bool.c Improve code for short-circuited float logic 2020-02-24 02:14:44 +09:00
flow.c Use tempop_visit_all for flow and dags 2019-06-16 16:56:39 +09:00
function.c [qfcc] Catch erroneous negative builtin numbers 2020-03-02 13:47:46 +09:00
grab.c Handle all modelgen commands. 2018-08-20 00:11:02 +09:00
idstuff.c [qfcc] Correct a typo 2020-03-01 17:28:51 +09:00
linker.c [qfcc] Fix another infinite loop in the linker 2020-03-03 13:39:24 +09:00
Makefile.am Move short-circuit boolean code to its own file 2020-02-24 01:20:24 +09:00
method.c [qfcc] Pass gcc's purity test 2020-03-03 10:59:01 +09:00
obj_file.c [qfcc] Remove type alias encoding 2020-03-01 16:13:18 +09:00
obj_type.c [qfcc] Remove type alias encoding 2020-03-01 16:13:18 +09:00
opcodes.c Make pr_obcode.c mostly thread safe 2020-02-26 01:20:28 +09:00
options.c Allow constant initialized globals in advanced code 2020-02-23 22:51:00 +09:00
pragma.c Allow pragmas to have arguments 2020-02-15 23:49:12 +09:00
problem_with_nil.txt Document some problems with nil 2019-06-09 22:29:51 +09:00
qc-lex.l Implicitly cast unadorned floating point constants 2020-02-23 22:28:54 +09:00
qc-parse.y [qfcc] Catch use of missing superclass interfaces 2020-03-05 08:50:29 +09:00
qfcc.c Fix writing of frames files when not requested 2020-02-24 00:07:48 +09:00
qfpreqcc Better handling of progs.dat and line numbers. 2012-11-15 15:04:51 +09:00
qfprogs.c Make a bunch of count things positive-only 2020-02-25 21:23:13 +09:00
qp-lex.l Do a pure/const/noreturn/format attribute pass. 2018-10-09 12:42:21 +09:00
qp-parse.y Clean up redundant type parameter to initialize_def. 2018-10-15 22:11:20 +09:00
reloc.c [qfcc] Make reloc functions const-correct 2020-03-05 11:03:23 +09:00
shared.c Rename the storage_class_t enum values. 2012-12-02 10:11:30 +09:00
statements.c Add a missed opcode conversion for %% 2020-02-16 12:10:09 +09:00
strpool.c Add support for \? to qc strings. 2018-08-19 19:31:52 +09:00
struct.c [qfcc] Implement anonymous structs and unions 2020-03-04 16:31:28 +09:00
stub.c Encode function parameter alignment 2020-02-16 17:10:43 +09:00
switch.c Make binary_expr fold constants 2019-06-10 00:36:13 +09:00
symtab.c [qfcc] Support anonymous structs in ivars 2020-03-05 08:47:21 +09:00
type.c [qfcc] Remove type alias encoding 2020-03-01 16:13:18 +09:00
value.c Implement double constants 2020-02-15 23:49:12 +09:00