Commit graph

3010 commits

Author SHA1 Message Date
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
679e3771de
Merge pull request #177 from xonotic/terencehill/warning_removal
Get rid of a warning on Windows
2017-11-26 17:30:42 -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
fa7dce495b fix writing of globaldefs for vector subcomponents so that FTE field remapping works 2017-11-26 17:26:00 -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
fb3af2831b cleanup some silly more warnings 2017-07-23 10:11:31 +02:00
Wolfgang Bumiller
5a0d645ede cleanup: silence fallthrough warnings 2017-07-23 10:11:31 +02:00
terencehill
27c0886ffb Get rid of a warning on Windows 2017-06-23 16:21:22 +02:00
Wolfgang Bumiller
163c4b99a4 tests: add check for vector negation 2017-06-22 08:45:38 +02:00
Wolfgang Bumiller
eb2d478770 qcvm: add stov builtin #16 2017-06-22 08:45:18 +02:00
Wolfgang Bumiller
3f5305af58 ir: fix vector negation using the nil value
We cannot use OFS_NULL as it is only a single value and
overlaps with OFS_RETURN.
2017-06-22 08:44:36 +02:00
David Carlier
8538658e83 two small memory leak fixes on failure paths 2017-05-23 21:56:03 +01:00
Wolfgang Bumiller
8b2149e315 sanitize: shift 1u (unsigned) for flag bits 2017-02-14 19:24:04 +01:00
Wolfgang Bumiller
c285eb385d c++: exec.cpp 2017-02-11 11:43:58 +01:00
Wolfgang Bumiller
2dde6d903e c++: ir_function::m_params 2016-12-03 21:42:15 +01:00
Wolfgang Bumiller
4bf63bb379 c++: ir: function_allocator 2016-12-03 21:39:09 +01:00
Wolfgang Bumiller
95d232ca72 c++: ir_block::m_instr 2016-12-03 21:30:33 +01:00
Wolfgang Bumiller
90f190f5e1 c++: ir_block::m_exits 2016-12-03 20:34:42 +01:00
Wolfgang Bumiller
566c17a964 c++: ir_block::m_entries 2016-12-03 20:32:26 +01:00
Dale Weiler
a5636899f2 Cleaner way to set the mask for -Wunused-component 2016-11-24 19:54:17 +00: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
def1a26b12 Add -Wunused-component like -Wunused-variable but warns about unused components of vector 2016-11-24 14:52:57 +00:00
Dale Weiler
eab20602b1 more intelligent handling of unused vector fields 2016-11-24 14:44:28 +00:00
Dale Weiler
69fa4f8dbd Fix #158 2016-11-24 14:08:38 +00:00
Dale Weiler
966991601c Fix #161 2016-11-24 13:41:26 +00:00
Dale Weiler
01f3447e5b Fix #171 2016-11-24 13:40:22 +00:00
Dale Weiler
9821b6a075 Fix fieldfuncs test and track unused variables through writes as well. 2016-11-19 12:19:00 +00:00
Dale Weiler
6938567c6c Don't generate unused warnings for unused constants 2016-11-19 11:46:32 +00:00
Wolfgang Bumiller
0b94d7583c fix access to fields of vector members
When ast_member encounters the result of an ast_entfield it
has to replace the ast_entfield's codegen as we cannot
evaluate the field access first.

We then perform the same action as ast_entfield but call
vectorMember on the field before issuing the load/address
instruction.

This effectively turns the codegen of the following ast
structure:
    member_of {
        field_of {
            entity,
            a_vector
        }
        memberid
    }
into the one of this structure:
    field_of {
        entity,
        member_of {
            a_vector
            memberid
        }
    }
2016-11-19 16:22:18 +01:00
Wolfgang Bumiller
4c48bae203 Revert "Fix ent.vec.{x,y,z} writes"
This reverts commit ad1cfcfeaa.
2016-11-19 16:22:13 +01:00
Dale Weiler
ad1cfcfeaa Fix ent.vec.{x,y,z} writes 2016-11-19 10:42:33 +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
167207e98c Warning 2016-05-23 16:47:40 -04:00
Wolfgang Bumiller
e06ad170de update .gitignore 2016-02-10 19:01:12 +01:00
Dale Weiler
3714a507c2 Merge pull request #172 from TimePath/cmake
Add CMakeLists.txt
2016-01-03 01:15:18 -05:00
TimePath
63c679ee81 Add CMakeLists.txt 2016-01-03 17:14:02 +11:00
Dale Weiler
be64736dd4 Fixes 2016-01-03 00:38:58 -05:00
Dale Weiler
f6bc9705d2 eh 2016-01-03 00:35:12 -05:00
Dale Weiler
5d8c18dcab Fix makefile 2016-01-03 00:34:29 -05:00
Dale Weiler
1a18ff5294 Merge branch 'master' into cleanup 2016-01-02 22:30:35 -05:00
Dale Weiler
3f4659b5d5 oops 2015-12-28 08:00:54 -05:00
Dale Weiler
6024e377ba Fix unary negation (-) 2015-12-28 07:58:54 -05:00
Wolfgang Bumiller
ee3c1e43c9 tempcommitting a whole bunch of to-c++ conversions 2015-05-02 09:48:24 +02:00
Wolfgang Bumiller
a9ac6987a6 remove a bunch of unnecessary c-casts to ast_expression* 2015-02-01 12:15:30 +01:00
Wolfgang Bumiller
fab640da4c Merge branch 'cleanup' of git://github.com/graphitemaster/gmqcc into cleanup 2015-02-01 12:13:59 +01:00
Wolfgang Bumiller
fd0cc40b9c fix std::string constructed from nullptr 2015-02-01 12:13:22 +01:00