Commit graph

113 commits

Author SHA1 Message Date
Wolfgang Bumiller
3a4aba0b31 Grrrr 2013-04-24 17:47:42 +02:00
Wolfgang Bumiller
66305c676a Allow string concatenation in the parser as well, for now only for immediate strings and __FUNC__, maybe later -fpermissive or somethign could allow it on const-delcared string variables 2013-04-24 17:27:04 +02:00
Dale Weiler
489ad486bc Get it compiling in visual studio again. 2013-04-24 01:43:53 +00:00
Dale Weiler
160e7cf7ee Remove trailing whitespace 2013-04-21 10:24:55 +00:00
Dale Weiler
e464cc1ea6 Implemented generalized attribute aliases. You can now alias functions, locals, or globals with [[alias("old_name")]] type new_name; 2013-02-06 05:30:09 +00:00
Dale Weiler
b3e87c3280 ast referencing 2013-02-05 17:14:56 +00:00
Wolfgang Bumiller
72106b0982 removing some left-over alloc checks 2013-02-05 17:34:40 +01:00
Wolfgang Bumiller
1410840ef6 Make the varargs counter more stable, it'll now work with a function pointer with a different number of fixed params 2013-01-17 10:30:32 +01:00
Wolfgang Bumiller
a01388ea7d Copying arg counter into the local 2013-01-12 15:06:19 +01:00
Wolfgang Bumiller
973122ed9b ast_call now has a va_count which causes a store to reserved:va_count before the call 2013-01-12 13:29:47 +01:00
Wolfgang Bumiller
6dfdf69a8e vararg accessor generation 2013-01-12 13:01:20 +01:00
Wolfgang Bumiller
c69ba2c734 parsing of vararg-counter 2013-01-12 11:29:03 +01:00
Wolfgang Bumiller
ca947d782c Declaration of type-restricted varargs 2013-01-12 11:03:17 +01:00
Wolfgang Bumiller
6df3c625b0 Added a flag to both ast and ir which enforces the generation of a globaldef for a value 2013-01-11 19:15:59 +01:00
Wolfgang Bumiller
e146fd121c parse_expression now takes a boolean flag on whether or not it should be creating ast_labels for undefined identifiers; creating the label later will pick it up and set its undefined flag to false 2013-01-03 12:46:33 +01:00
Dale Weiler
29db4a44ed Happy new years! 2013-01-01 05:08:55 +00:00
Dale Weiler
46374e94ca Add support for user defined messages for [[deprecated]] generalized attribute 2012-12-30 09:58:52 +00:00
Dale Weiler
921877e8a4 Implement [[deprecated]] general attribute, will mark functions as deprecated. Making calls to functions marked as such will trigger a compiler warning. Enabled by default. 2012-12-30 06:43:07 +00:00
Wolfgang Bumiller
755ee5462f Properly support globals initialized to nil 2012-12-29 21:15:59 +01:00
Wolfgang Bumiller
33be9d4559 Don't allow code like: v * '0 1 0' = 3; to actually work... 2012-12-29 15:13:54 +01:00
Wolfgang Bumiller
14e954284e more general qualifier/attribute parsing, added not-yet-used AST_FLAG_INLINE and [[inline]] 2012-12-28 19:46:28 +01:00
Wolfgang Bumiller
f1fa8f6055 So why doesn't any popular compiler complain about this 2012-12-28 11:50:03 +01:00
Wolfgang Bumiller
a60d0182db finish parsing of labeled loops; ast support added 2012-12-28 00:04:09 +01:00
Wolfgang Bumiller
ebb7cb2ae3 parsing of loop labels 2012-12-27 23:43:20 +01:00
Wolfgang Bumiller
2b468cb0ee Added the 'static' keyword.
Implements #71
2012-12-24 11:30:58 +01:00
Wolfgang Bumiller
b4e38a8fed Fix: ast_value.cvq must be an int, not a bool;
Fixes #62
2012-12-22 12:30:20 +01:00
Wolfgang Bumiller
a985a5cab1 while/for/do now all use process_condition, ast_loop got 2 new parameters for more efficient translation 2012-12-20 20:22:31 +01:00
Wolfgang (Blub) Bumiller
ba434c8e22 removing ast_expression_common.variadic, adding ast_expression_common.flags, added AST_FLAG_VARIADIC and AST_FLAG_NORETURN 2012-12-19 20:45:48 +01:00
Wolfgang (Blub) Bumiller
8777624fe2 ast_block_add_expr now lets the block fully adopt the type of the added expression 2012-12-05 12:57:00 +01:00
Wolfgang (Blub) Bumiller
02ec45363e Get rid of some code duplication 2012-12-02 17:57:08 +01:00
Wolfgang (Blub) Bumiller
2a3e7c1cff field constants - revert globals generated after fields 2012-11-30 21:11:25 +01:00
Wolfgang (Blub) Bumiller
316298650e remember if an ast_value is a field-declaration, build fields before globals 2012-11-30 21:03:57 +01:00
Wolfgang (Blub) Bumiller
6acd159c9c Keeping track of numbers for debugging 2012-11-30 16:23:42 +01:00
Wolfgang (Blub) Bumiller
5e23e8296d don't just store a 'bool constant' in the ast/ir, store the complete qualifier: 'int cvq', moved CV_ defines into gmqcc.h 2012-11-30 13:47:28 +01:00
Wolfgang (Blub) Bumiller
ec2ff09eff operator &~= must not cause the generated binstore to free the destination twice 2012-11-26 00:15:07 +01:00
Wolfgang (Blub) Bumiller
24f9b63475 parsing goto 2012-11-25 21:53:14 +01:00
Wolfgang (Blub) Bumiller
f431b7a693 Support codegen of ast_label and ast_goto in any order 2012-11-25 21:40:26 +01:00
Wolfgang (Blub) Bumiller
474d8bd6f0 ast_label, and labels later used for goto 2012-11-25 21:27:14 +01:00
Wolfgang (Blub) Bumiller
39f572fe99 constant flag, -finitialized-nonconstants to turn initialized globals into mutable variables 2012-11-25 19:35:00 +01:00
Wolfgang (Blub) Bumiller
6e400ca81f ast: isconst->hasvalue, const keyword will set the const flag 2012-11-25 19:30:10 +01:00
Wolfgang (Blub) Bumiller
ca033e5acd Some side-effect propagation for better warnings, so that comma-operators with assignments in them don't cause the -Weffectless-statement warning, and fixing ternary precedence for fte operator list 2012-11-25 19:19:36 +01:00
Wolfgang (Blub) Bumiller
613e1e7247 Change the parser to use the hashtable functions 2012-11-25 13:23:37 +01:00
Wolfgang (Blub) Bumiller
a7fb45f102 removed phi_out from ast_ternary since we have a place in ast_expression_common for this kind of value 2012-11-21 20:13:31 +01:00
Wolfgang (Blub) Bumiller
21c2fcb929 A note about how early-out in if-expressions can be translated more efficiently 2012-11-21 19:22:28 +01:00
Wolfgang (Blub) Bumiller
06ba28f2a0 ast_switch 2012-11-19 21:17:44 +01:00
Wolfgang (Blub) Bumiller
ea75003cf4 break and continue support 2012-11-19 19:39:52 +01:00
Wolfgang (Blub) Bumiller
906f319673 Replaced it all... 2012-11-15 18:32:09 +01:00
Wolfgang (Blub) Bumiller
0340a6a6e7 support for ast_entfield nodes with specific output types, fixing array-field instantiating code to print the correct name on error 2012-11-12 22:39:43 +01:00
Wolfgang (Blub) Bumiller
1ab303c528 Store accessors in the ast_value for access from within the ast - generate accessors after generating all the globals to not mess up the order of globals in the output 2012-11-11 16:22:09 +01:00
Wolfgang (Blub) Bumiller
7d9568f806 array accessor function genaration 2012-11-11 16:06:27 +01:00