Commit graph

55 commits

Author SHA1 Message Date
Wolfgang (Blub) Bumiller
b2315777d1 cache the IMMEDIATE string in the builder directly 2012-08-24 19:52:06 +02:00
Wolfgang (Blub) Bumiller
74cb075665 cache filenames as such instead of using code_cachedstring 2012-08-24 19:44:29 +02:00
Wolfgang (Blub) Bumiller
04dca17cff ir_value now checks if a name was specified 2012-08-24 18:14:39 +02:00
Wolfgang (Blub) Bumiller
5e4b8846d1 slight change to ir_value_dump_life; fixing ir_value_life_merge_into: TODO test this seperately, all cases 2012-08-23 22:07:32 +02:00
Wolfgang (Blub) Bumiller
fe3b1b2e8d ir_values which are members of a vector should know that, so that liferange calc can use the vector rather than the member 2012-08-19 21:37:29 +02:00
Wolfgang (Blub) Bumiller
e606913187 IR generation: for functions: first generate all defs, then the code, so access to prototyped functions doesn't result in NULL code 2012-08-19 18:00:53 +02:00
Wolfgang (Blub) Bumiller
b3d4e406ec it's not undefined, stupid 2012-08-16 12:58:26 +02:00
Wolfgang (Blub) Bumiller
7e3edea621 fixing the messup of MUL_FV and _VF being swapped - getting rid of additions that really have no place here (YET) (matrix/quaternion types) 2012-08-12 11:34:55 +02:00
Wolfgang (Blub) Bumiller
d68d19dbfd Merging master to handle vector members, fields, and members of vector fields 2012-08-12 10:08:41 +02:00
Wolfgang (Blub) Bumiller
1559dedfd9 ir_value_set_field 2012-08-11 15:41:10 +02:00
Wolfgang (Blub) Bumiller
55743936d9 Merge branch 'master' into blub/bc3 2012-08-10 20:48:42 +02:00
Wolfgang (Blub) Bumiller
9c2e6a2334 Experimental ast_member to access vector members 2012-08-08 14:49:37 +02:00
Wolfgang (Blub) Bumiller
ae251d3914 Merge branch 'master' into blub/bc3 2012-08-08 12:05:08 +02:00
Wolfgang Bumiller
d05bee94d1 code_alloc_field to allocate entityfield data, ir now has ir_builder_create_field - so that globals and fields can be created separately - properly 2012-07-28 21:55:01 +02:00
Wolfgang Bumiller
22e6b8558b Merge branch 'master' into blub/bc3 2012-07-26 23:22:53 +02:00
Wolfgang Bumiller
e22d340e23 ast/ir support for unary instructions 2012-07-26 20:45:18 +02:00
Wolfgang Bumiller
aef49d9667 Merge branch 'master' into blub/bc3 2012-07-22 12:21:43 +02:00
Wolfgang Bumiller
a4617d0e61 ast_function generates parameter locals, ir_function_create_local now allows adding parameters as long as no local variables have been added yet 2012-07-22 12:15:48 +02:00
Wolfgang Bumiller
e9ac1c9e21 First thing: we want quaternions and 4x4 matrices 2012-07-10 19:26:07 +02:00
Wolfgang Bumiller
ed24ea0cef creating and generating builtin functions, ast-macros for builtins, todo: params 2012-07-03 23:38:38 +02:00
Wolfgang (Blub) Bumiller
856c9d16a5 generating an ir_value for an ir_function at creation now 2012-06-29 13:25:31 +02:00
Wolfgang (Blub) Bumiller
c1ea9cc409 function in the ast now MUST have an output type in their 'next' ast_expression pointer, the IR's outtype of functions is now filled 2012-06-29 13:07:19 +02:00
Wolfgang (Blub) Bumiller
67fa4ce07b ir_builder_create_call to take return type from the ir_value 2012-06-29 12:55:35 +02:00
Wolfgang (Blub) Bumiller
01b3f5ef58 ast_call_codegen, ir_block_create_call plus call-related functions, ir_value->outtype TODO: fill outtype in ir_value 2012-06-28 17:21:26 +02:00
Wolfgang (Blub) Bumiller
2073834b9a ir_instr can now store a list of parameters, will be used for CALLs 2012-06-28 15:50:51 +02:00
Wolfgang (Blub) Bumiller
21b7005541 ir_function.allocated_locals now contains the number of locals a function requires, renamed code.slot to code.local, makes more sense 2012-06-25 17:43:10 +02:00
Wolfgang (Blub) Bumiller
214c063b3f value position allocation, fixing a possible endless loop in ir_values_overlap 2012-06-25 16:06:01 +02:00
Wolfgang (Blub) Bumiller
db7b9a4f96 ir_value_life_merge_into, to merge the liferange of one value into the range of another, testing in test_ir 2012-06-25 14:51:31 +02:00
Wolfgang (Blub) Bumiller
dfc0f6fab3 TYPE_VARIANT in codegen, writing code from ast-test 2012-05-09 17:30:08 +02:00
Wolfgang (Blub) Bumiller
61d3a9d1a0 generating block code in a simple naive order for now - the ast / parser should help improving order 2012-05-09 15:03:19 +02:00
Wolfgang Bumiller
5ca6f4abca More work on generating code - still not instantiating function-statements, 2 kinds of FIXME comments: relocation and creation of ir_values for ir_functions 2012-05-09 15:03:19 +02:00
Wolfgang Bumiller
8ab51544be Comment about the form of instruction general_instr is used for 2012-05-01 16:29:29 +02:00
Wolfgang Bumiller
3c07ed15c0 expose create_general_instr in ir.h for now... 2012-05-01 16:24:16 +02:00
Wolfgang Bumiller
6ae8a69ab0 ir_block_create_fieldaddress - and fixing operand-numbering in load_from_ent 2012-05-01 16:20:44 +02:00
Wolfgang Bumiller
eb21f1e733 alignment fix 2012-05-01 12:43:10 +02:00
Wolfgang Bumiller
45651cea8d Implementation of liferange overlap test 2012-05-01 12:40:37 +02:00
Wolfgang Bumiller
4c38566877 ir_block_create_load_from_ent - long name, I know, but we need to be able to load from pointers too at some point... 2012-05-01 12:12:53 +02:00
Wolfgang Bumiller
340daeabc4 ir_block_create_storep for storing through pointers, the IR does not implicitly create conversions for now when using pointers, but it could 2012-05-01 11:58:52 +02:00
Dale Weiler
05966ee009 Remove trailing whitespace from everything 2012-04-28 16:43:39 -04:00
Dale Weiler
b09d75518c almost ISO C now, fixed all the MEM_VECTOR trailing semicolon issues. 2012-04-28 05:54:24 -04:00
Wolfgang Bumiller
75b78720fd lex_ctx_t -> lex_ctx, vector_t -> vector 2012-04-28 11:15:29 +02:00
Dale Weiler
89ed723efa astir.h -> gmqcc.h 2012-04-28 05:08:03 -04:00
Wolfgang Bumiller
da827e6098 Removed the qc_type enum and replaced all qc_* by TYPE_* 2012-04-28 10:42:03 +02:00
Wolfgang Bumiller
1bf4aa379a Header guards and macros get {} in oneline ifs and loops 2012-04-28 10:17:32 +02:00
Wolfgang (Blub) Bumiller
e4d92130da Using GMQCC_WARN some more where it makes sense 2012-04-27 13:31:40 +02:00
Wolfgang (Blub) Bumiller
86564686f3 Turned nearly every void-returning function into a bool-returning function, and checking return values wherever necessary to be able to properly exit on failures 2012-04-27 13:28:39 +02:00
Wolfgang (Blub) Bumiller
13ec68bc4f qbool -> bool 2012-04-26 10:16:15 +02:00
Wolfgang (Blub) Bumiller
8d121af47c Copyright notices 2012-04-25 17:27:49 +02:00
Wolfgang (Blub) Bumiller
418430e05d Get stuff ready to compile - #if 0 on instructions not yet added to the instruction list (eg integer ones) 2012-04-25 17:27:48 +02:00
Wolfgang (Blub) Bumiller
095d403acc more weak typing 2012-04-25 17:27:48 +02:00