Wolfgang Bumiller
9335bc2f4f
BROKEN: more ast nodes converted
2015-01-29 20:29:34 +01:00
Wolfgang Bumiller
6149f6a1d0
BROKEN: in the middle of converting ast nodes to c++ with constructors and methods
2015-01-25 09:24:26 +01:00
Wolfgang Bumiller
9d98805dfb
a whole lotta 'm_'s
2015-01-24 12:25:46 +01:00
Wolfgang Bumiller
566e761546
more c++ migration for ast/ir/code; reached a working condition here
2015-01-20 20:25:56 +01:00
Wolfgang Bumiller
f09c6a5d63
temp committing major c++ification
2015-01-20 16:43:58 +01:00
Wolfgang Bumiller
794396df79
making ast nodes derive from ast_expression
2015-01-19 14:00:04 +01:00
Wolfgang Bumiller
dedb3a49bd
ast_expression: params -> type_params
2015-01-19 13:46:10 +01:00
Wolfgang Bumiller
9535805c02
renaming ast_function::vtype to function_type
2015-01-19 13:37:22 +01:00
Wolfgang Bumiller
44b0d7f658
ast_expression now derives from ast_node
2015-01-19 13:33:39 +01:00
Wolfgang Bumiller
1826971301
renaming some ast_node members before making ast_expression an ast_node to use the compiler to help find possible clashes
2015-01-19 13:32:26 +01:00
Dale Weiler
76278e8b97
s/NULL/nullptr/
2015-01-15 15:18:33 -05:00
Dale Weiler
6e68526680
Use std::vector for static_names
2015-01-15 15:15:35 -05:00
Dale Weiler
f38e6b48db
Use std::vector for SYA
2015-01-15 15:08:50 -05:00
Dale Weiler
a1f13499f9
Use std::vector for break and continue ast blocks
2015-01-15 14:22:22 -05:00
Dale Weiler
539dc4a3dc
Use std::vector for ast switch cases
2015-01-15 14:19:07 -05:00
Dale Weiler
2e037832d3
Use std::vector for ast blocks
2015-01-15 14:15:44 -05:00
Dale Weiler
987f765c20
std::vector for initlist
2015-01-15 14:07:26 -05:00
Dale Weiler
4de08db0e7
More std::vector migration
2015-01-14 23:45:00 -05:00
Dale Weiler
67a3c9b031
Initial movement to std::vector
2015-01-14 23:34:43 -05:00
Dale Weiler
b5ac2745d6
Remove license headers. The LICENSE file is sufficent
2015-01-13 21:38:40 -05:00
Dale Weiler
0a00807e57
More cleanup
2015-01-13 21:36:09 -05:00
Dale Weiler
783b7b6594
Update license headers
2015-01-09 14:53:35 -05:00
Dale Weiler
53e9ed0d96
Merge branch 'arithmetic_exceptions' into cooking
...
Conflicts:
doc/gmqcc.1
gmqcc.ini.example
opts.def
parser.c
2014-05-25 03:01:47 -04:00
Dale Weiler
6424ebaf98
Perliminary work on arithmetic exception handling in the constant evaluator. We can safely check for arithmetic underflow, overflow, divison by zero and inexactness now. Inexactness of expressions are propagated through the AST such that using an inexact value in a comparison will trigger a warning with -Winexact-compares.
2014-05-24 09:53:38 -04:00
Wolfgang Bumiller
8dafdfc5e2
use INSTR_STATE by default, add -femulate-state to switch to emulation, and -state-fps=NUM to set its emulation FPS
2014-04-08 14:34:55 +02:00
Wolfgang Bumiller
4ff68e07e8
Adding coverage support:
...
The -coverage option causes all values have AST_FLAG_BLOCK_COVERAGE
set by default.
The coverage attribute can be used to control coverage:
It takes an optional list of coverage types, currently only "block"
and "none" is recognized.
[[coverage]] defaults to [[coverage(block)]].
Use [[coverage(none)]] or [[coverage()]] to disable.
2014-01-07 14:36:00 +01:00
Dale Weiler
a934e0fe4b
Happy new year!
2014-01-01 06:24:16 -05:00
Wolfgang Bumiller
50f905b821
adding 'final'
2013-12-06 22:41:15 +01:00
Wolfgang Bumiller
c3cc6f184e
static variables now don't get re-initialized in functions; cannot be initialized with non-constants anymore; and a counter has been added so you can use the same name in a different scope for another static variable again.
2013-11-28 12:04:01 +01:00
Dale Weiler
c90807dec6
Some correctly-sized type flags for the AST and IR, this culls back memory usage a little.
2013-10-19 23:39:37 -04:00
Wolfgang Bumiller
8d5e719026
replacing the current [[accumulate]] implementation: shorter and simpler, and also supports non-void return types
2013-10-18 11:26:41 +02:00
Dale Weiler
2c975bb344
Implemented [[accumulate]] attribute. This will hopefully be used by Xonotic to replace it's ACCUMULATE_FUNCTION stuff.
2013-10-17 03:21:30 -04:00
Dale Weiler
c63bebd7d8
float and double shouldn't be used here, this is what qcfloat_t is for. This fixes the memcmp bug in the folder.
2013-10-16 21:32:31 -04:00
Dale Weiler
a7c1f6f021
Implement [[eraseable]] attribute. When used with a function it instructs the AST (which than transfers logic to the IR) that the function (or variable) is potentially unused (verified by checking the read count). This than propogates through the IR and prevents the IR from generating both the definition and global/function. The intrinsics system uses this as well to prevent intrinsic functions from being generated unless they're used.
2013-08-29 00:05:37 -04:00
Dale Weiler
3b4a5667ea
Constant fold intrinsics if their arguments are constant. TODO: reference count intrinsics such that they're not generated unless they're used, currently when an intrinsic can be folded-away it's marked for generation and makes it to the final output binary even though it isn't used.
2013-08-28 12:46:22 -04:00
Wolfgang Bumiller
988b4b4960
ast_binary->right_first and an execution order check
2013-08-27 10:42:13 +02:00
Dale Weiler
b10a2d1fd5
Remove the attempt at ast_intrinsic node
2013-08-14 03:05:14 +00:00
Dale Weiler
216330a7e2
Some intrinsic cleanups
2013-08-14 03:03:49 +00:00
Dale Weiler
10b75fd8b9
Move const-branch-elision into fold.c
2013-07-31 19:34:38 +00:00
Dale Weiler
d6ca5673dc
Use the _t consistency naming scheme. Also various cleanups.
2013-07-30 16:00:51 +00:00
Dale Weiler
5694c77d16
I added it for a reason, because I was smart. I forgot about it because of life :(
2013-06-15 11:04:08 +00:00
Wolfgang Bumiller
179da9241c
working on vararg piping: detecting several error cases, adding -Wunsafe-types and -funsafe-varargs
2013-06-15 09:46:44 +02:00
Wolfgang Bumiller
8ce331b563
allow array size to be inferred from the initializer
2013-06-12 15:47:11 +02:00
Wolfgang Bumiller
7a36a8bdd8
parsing array initializers
2013-06-12 14:32:12 +02:00
Wolfgang Bumiller
afdc0c9dc8
assignable return value now lives in ast_function, as globals can get overwritten randomly; removed parser_find_retval; updated parse_return
2013-05-29 16:51:59 +02:00
Dale Weiler
2923b718e1
Merge branch 'union-replacement' into cooking
...
Conflicts:
ast.c
2013-05-29 03:43:49 +00:00
Dale Weiler
f892b32335
Major export cleanup. Anything that was exported but wasn't used outside where it was implemented has been turned into static, and their exports have been removed. This actually makes the compiler compile slightly faster.
2013-05-29 03:29:04 +00:00
Wolfgang Bumiller
d70b571769
killing the union types
2013-05-11 22:34:01 +02:00
Wolfgang Bumiller
ef6e2bd583
first step to getting rid of those unions we don't use anyway
2013-05-11 22:05:30 +02:00
Wolfgang Bumiller
9f8bee4bf1
ast_value now has an initializer list array, still unused but it's there for later
2013-04-26 10:47:55 +02:00