Wolfgang (Blub) Bumiller
|
f6e5396f9f
|
First generate the globals, then the fields, so the defs have the correct layout for quake
|
2012-08-22 14:15:49 +02:00 |
|
Wolfgang (Blub) Bumiller
|
cafa78d430
|
-printdefs for qcvm
|
2012-08-22 14:15:35 +02:00 |
|
Wolfgang (Blub) Bumiller
|
93e13c3cb1
|
option: -force-crc=number, added -info to executor to just show some file info like the crc, and -printfields to print a list of fields along with their type and position
|
2012-08-22 14:00:57 +02:00 |
|
Wolfgang (Blub) Bumiller
|
330a801ae9
|
Pop off all the locals after a function
|
2012-08-22 12:59:52 +02:00 |
|
Wolfgang (Blub) Bumiller
|
54bdd06aab
|
some vector tests
|
2012-08-22 12:56:34 +02:00 |
|
Wolfgang (Blub) Bumiller
|
5275bdb35e
|
make track=no adds -DNOTRACK WARNING: do not compile only parts of the code with that... it would cause major breakage
|
2012-08-22 12:38:16 +02:00 |
|
Wolfgang (Blub) Bumiller
|
5f2fc64498
|
-Wimplicit-function-pointer, functions without bodies still have a global function variable and thus are function pointers, though this shouldn't really be used, thus -Wimplicit-function-pointer is on by default
|
2012-08-22 12:37:06 +02:00 |
|
Wolfgang (Blub) Bumiller
|
5390782d9b
|
Don't try to generate function code for functions without bodies
|
2012-08-22 12:33:24 +02:00 |
|
Wolfgang (Blub) Bumiller
|
fd835931af
|
Removing -std=c90, which was just used to make sure things stayed portable
|
2012-08-22 11:49:46 +02:00 |
|
Wolfgang (Blub) Bumiller
|
426cab1f24
|
ast_ifthen_codegen: the merge-jumps for an if's branches need to be added to the endblock of the branch, not the beginning
|
2012-08-21 18:25:41 +02:00 |
|
Wolfgang (Blub) Bumiller
|
1f32fe1d8a
|
Since we currently append AINSTR_END to the end of all functions for debugging purposes, and darkplaces complains when the very last statement isn't INSTR_DONE or INSTR_RETURN, we append an INSTR_DONE at the very end
|
2012-08-21 18:12:01 +02:00 |
|
Wolfgang (Blub) Bumiller
|
9eb9c99e72
|
Do not generate an OFS_RETURN variable, the IR doesn't need to know it as such
|
2012-08-21 16:08:23 +02:00 |
|
Wolfgang (Blub) Bumiller
|
3cd1d19a7e
|
Fix getline usage in main.c, fix WARN_VOID_VARIABLE -> WARN_VOID_VARIABLES in main.c
|
2012-08-21 16:05:10 +02:00 |
|
Wolfgang (Blub) Bumiller
|
19b66800ae
|
TYPE_FUNCTION values which are not constant are now allowed to be generated, they are function pointers.
|
2012-08-21 16:01:28 +02:00 |
|
Wolfgang (Blub) Bumiller
|
8f4333df30
|
right... instead of checking for end_sys_globals twice, maybe ACTUALLY check for end_sys_fields too...
|
2012-08-21 15:50:53 +02:00 |
|
Wolfgang (Blub) Bumiller
|
93856bf151
|
-Wvoid-variables, QC uses 2 special void-typed variables: end_sys_globals and .end_sys_fields. However if for some reason someone wants more, we still allow them to be code-generated, but by default warn about them by default
|
2012-08-21 15:49:53 +02:00 |
|
Wolfgang (Blub) Bumiller
|
5da30a46d1
|
let test_ast compile again
|
2012-08-21 12:03:34 +02:00 |
|
Wolfgang (Blub) Bumiller
|
0e3db81cf3
|
uninit.qc test
|
2012-08-21 11:57:23 +02:00 |
|
Wolfgang (Blub) Bumiller
|
812794200c
|
nicer output for lost blocks in memory info
|
2012-08-21 11:45:19 +02:00 |
|
Wolfgang (Blub) Bumiller
|
700860a435
|
memblock_t is now a double-linked list so we can show where data was allocated which hasn't been freed
|
2012-08-21 11:41:01 +02:00 |
|
Wolfgang (Blub) Bumiller
|
22896e5ef6
|
at last, the annoying missing ast_delete(typevar)
|
2012-08-21 11:21:05 +02:00 |
|
Wolfgang (Blub) Bumiller
|
d7f43dfa4d
|
some more error situations where typevar wouldn't get freed
|
2012-08-21 11:18:40 +02:00 |
|
Wolfgang (Blub) Bumiller
|
0674457c51
|
Fix some comment styles...
|
2012-08-21 10:33:37 +02:00 |
|
Wolfgang (Blub) Bumiller
|
24acaa4eaf
|
Fix output of util_memory_d
|
2012-08-21 10:30:53 +02:00 |
|
Wolfgang (Blub) Bumiller
|
8fcc528ffa
|
new warning: -Wlocal-constants
|
2012-08-21 10:18:55 +02:00 |
|
Wolfgang (Blub) Bumiller
|
92e8f08df3
|
don't _move_ values out of immediates, it causes NULL strings to be code-generated
|
2012-08-21 10:08:17 +02:00 |
|
Wolfgang (Blub) Bumiller
|
02cc86db25
|
Since function prototypes now don't cause the function to become a constant, we cannot check for a constant in [frame,think] notations anymore
|
2012-08-20 18:27:27 +02:00 |
|
Wolfgang (Blub) Bumiller
|
0d64e555e2
|
Better handling of EOF - encountering EOF in parser_next will not return false yet, this is a more elegant way...
|
2012-08-20 18:15:31 +02:00 |
|
Wolfgang (Blub) Bumiller
|
5a0995c767
|
better handlign of a too early error condition
|
2012-08-20 18:14:02 +02:00 |
|
Wolfgang (Blub) Bumiller
|
e0ffcfb74b
|
Lexer now returns TOKEN_EOF only once and afterwards TOKEN_FATAL
|
2012-08-20 18:12:04 +02:00 |
|
Wolfgang (Blub) Bumiller
|
198e35a823
|
Fix correction of parsiong of multiple variables: parse past the comma
|
2012-08-20 18:10:06 +02:00 |
|
Wolfgang (Blub) Bumiller
|
99bab76006
|
Creating the ast_function for a function only when encountering its body, so if no body is specified it works like a function pointer - just like QC wants it
|
2012-08-20 18:09:41 +02:00 |
|
Wolfgang (Blub) Bumiller
|
20448b93dc
|
Corrected parsing of declarations of multiple variables
|
2012-08-20 17:59:19 +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
|
9420c01538
|
added -Wused-uninitialized and warning about variables which may be used without being initialized
|
2012-08-19 21:26:14 +02:00 |
|
Wolfgang (Blub) Bumiller
|
ede98f5521
|
Removing the old LIFE_RANGE_WITHOUT_LAST_READ support
|
2012-08-19 21:00:42 +02:00 |
|
Wolfgang (Blub) Bumiller
|
211b11f154
|
strip the newlines out of ir error messages, they're added by the msgprint routine
|
2012-08-19 20:45:26 +02:00 |
|
Wolfgang (Blub) Bumiller
|
a4c6382fa4
|
more context copies
|
2012-08-19 20:43:34 +02:00 |
|
Wolfgang (Blub) Bumiller
|
53b9906242
|
have the ir take over some more context data from the ast
|
2012-08-19 20:43:04 +02:00 |
|
Wolfgang (Blub) Bumiller
|
f0f9680774
|
add the backticks for a warning
|
2012-08-19 20:41:31 +02:00 |
|
Wolfgang (Blub) Bumiller
|
c2925b61f2
|
add the type for the invalid-type-for-global message
|
2012-08-19 20:37:10 +02:00 |
|
Wolfgang (Blub) Bumiller
|
af3d9e0bdf
|
ir_value_set_string needs to use a strdup which doesn't return NULL for an emptystring
|
2012-08-19 20:35:51 +02:00 |
|
Wolfgang (Blub) Bumiller
|
c12e60a510
|
take 'warnreturn' into account, don't ignore the parsewarnin's Werror status
|
2012-08-19 20:32:07 +02:00 |
|
Wolfgang (Blub) Bumiller
|
1cc3705da4
|
Don't have the ast's codegen error on missing returns
|
2012-08-19 20:28:14 +02:00 |
|
Wolfgang (Blub) Bumiller
|
7ef248aadb
|
set -Wmissing-return-values to on by default, new warning: control reaches end of non-void...
|
2012-08-19 20:26:54 +02:00 |
|
Wolfgang (Blub) Bumiller
|
66ec592f94
|
parse_block gets a warn-return bool flag
|
2012-08-19 20:20:39 +02:00 |
|
Wolfgang (Blub) Bumiller
|
14210a62ef
|
functions which have no living values but store_return values may cause the allocator to be run with no allocations being made - in this case we shouldn't try accessing the empty array and simply exit the allocator
|
2012-08-19 19:54:15 +02:00 |
|
Wolfgang (Blub) Bumiller
|
4254845227
|
same as before for loops: don't try creating a jump if the body ends in a return
|
2012-08-19 19:45:53 +02:00 |
|
Wolfgang (Blub) Bumiller
|
49cd86e8ed
|
don't try to create jumps in ifs if the block is already done
|
2012-08-19 19:43:41 +02:00 |
|
Wolfgang (Blub) Bumiller
|
adda894976
|
have function declarations of functions with prototypes take over the actual declaration's body's context data
|
2012-08-19 19:39:58 +02:00 |
|