Dale Weiler
092067482f
added -fdefault-eraseable which is the same as adding [[eraseable]] to all definitions
...
instead the opposite behavior can be controlled with [[noerase]] attribute
2018-05-09 21:18:37 -04:00
Dale Weiler
9a21c638fa
error if a function is called from global scope opposed to crashing
2018-05-05 15:38:12 -04:00
Wolfgang Bumiller
e920766b10
Make parser_find_local only actually search locals
...
Fixes #163
Signed-off-by: Wolfgang Bumiller <wry.git@bumiller.com>
2018-01-14 09:33:05 +01:00
Wolfgang Bumiller
e006aa8238
Revert "search for funciton param first before function locals, this fixes #163 "
...
This reverts commit 3cf2c52fce
.
2018-01-14 09:33:05 +01:00
Dale Weiler
73d3d7eec1
fix some UB
2017-12-01 13:55:19 -05:00
Dale Weiler
3cf2c52fce
search for funciton param first before function locals, this fixes #163
2017-12-01 12:24:50 -05:00
Dale Weiler
1580c23556
Merge branch 'master' of github.com:graphitemaster/gmqcc
2017-11-26 17:48:13 -05:00
Dale Weiler
b14a02e735
don't generate storep for vector field unless it's an ent field
2017-11-26 17:47:27 -05:00
Dale Weiler
d9127bf28a
Merge pull request #180 from xonotic/mem_leak_fix_on_failure_paths
...
two small memory leak fixes on failure paths
2017-11-26 17:30:30 -05:00
Dale Weiler
02b20dbd09
fix member binops on entity fields to generate STOREP, this fixes stuff like ent.vec.x += value.
2017-11-26 17:09:38 -05:00
Wolfgang Bumiller
6ad5f18ef1
cleanup: 'move of a temporary object prevents copy elision'
2017-07-23 10:11:31 +02:00
Wolfgang Bumiller
047ecd426f
move more parser code to c++, fix crashes with gcc
...
we initialized the parser with malloc -> memset to zero ->
placement new. With gcc the latter caused the memset to be
optimized out, causing uninitialized value accesses.
2017-07-23 10:11:31 +02:00
Wolfgang Bumiller
5a0d645ede
cleanup: silence fallthrough warnings
2017-07-23 10:11:31 +02:00
David Carlier
8538658e83
two small memory leak fixes on failure paths
2017-05-23 21:56:03 +01:00
Dale Weiler
17c0812ae4
Just mark LOCAL_RETURN noref instead of checking for '#' in the name
2016-11-24 15:50:48 +00:00
Dale Weiler
3a7848d67c
Remove parser m_uses in favor of {IR,AST}_FLAG_NOREF instead
2016-11-24 15:33:58 +00:00
Dale Weiler
69fa4f8dbd
Fix #158
2016-11-24 14:08:38 +00:00
Dale Weiler
01f3447e5b
Fix #171
2016-11-24 13:40:22 +00:00
Dale Weiler
6938567c6c
Don't generate unused warnings for unused constants
2016-11-19 11:46:32 +00:00
Dale Weiler
eca4e2c309
Unused globals even if they have an initial value should produce unused diagnostic
2016-11-19 10:05:58 +00:00
Dale Weiler
1a18ff5294
Merge branch 'master' into cleanup
2016-01-02 22:30:35 -05:00
Wolfgang Bumiller
ee3c1e43c9
tempcommitting a whole bunch of to-c++ conversions
2015-05-02 09:48:24 +02:00
Wolfgang Bumiller
45236a644f
ast conversion mostly finished
2015-02-01 11:44:00 +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
5c64437189
fix for loops
2015-01-20 20:55:27 +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
380fb3d44f
this can be a move
2015-01-19 13:46:30 +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
Dale Weiler
db9c37d18b
Rewrite constant folder in C++
2015-01-15 20:27:17 -05:00
Dale Weiler
e2ba77a546
Rewrite intrinsic system in C++
2015-01-15 18:11:41 -05: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
0ecfe18f49
Cleanup
2015-01-15 15:11:30 -05:00
Dale Weiler
e8fbae4b3e
Not needed
2015-01-15 15:10:02 -05:00
Dale Weiler
f38e6b48db
Use std::vector for SYA
2015-01-15 15:08:50 -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
b5d8b44503
More std::vector
2015-01-15 01:35:56 -05:00
Dale Weiler
878195bdec
Use C++ naming for structures
2015-01-15 00:05:48 -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
65362d93aa
.c -> .cpp
2015-01-14 21:48:47 -05:00