Commit graph

3034 commits

Author SHA1 Message Date
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
Wolfgang Bumiller
6d4539814e ast_unary::make: safer double-negation optimization check 2015-02-01 12:13:05 +01:00
Wolfgang Bumiller
896d4c53a3 fix backward propagateSideEffect impl 2015-02-01 12:12:40 +01:00
Wolfgang Bumiller
d8e9b1b35d destructor call order is important here 2015-02-01 11:52:58 +01:00
Wolfgang Bumiller
66d908f39b ir_instr_delete_quick needs to clear _m_ops 2015-02-01 11:49:46 +01:00
Wolfgang Bumiller
45236a644f ast conversion mostly finished 2015-02-01 11:44:00 +01:00
Dale Weiler
fa21d85820 Same on the cleanup branch 2015-01-30 00:46:25 -05:00
Dale Weiler
e922403aa8 Don't allocate globals for constants that aren't read 2015-01-30 00:40:59 -05:00
Dale Weiler
ff37abb0c7 Constant folding for strings 2015-01-30 00:25:10 -05:00
Dale Weiler
90b5a6538a Merge branch 'cleanup' of github.com:graphitemaster/gmqcc into cleanup 2015-01-30 00:20:41 -05:00
Dale Weiler
866fc3e247 Constant folding for string comparisons too 2015-01-30 00:18:52 -05:00
Dale Weiler
41a76ab91d Fix for loops 2015-01-29 23:33:59 -05:00
Dale Weiler
b640049912 For now 2015-01-29 23:13:55 -05:00
Wolfgang Bumiller
9335bc2f4f BROKEN: more ast nodes converted 2015-01-29 20:29:34 +01:00
Wolfgang Bumiller
49f4fedecf add another test that we just didn't have anywhere else yet 2015-01-25 09:29:02 +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
e7d1e701c4 why didn't gcc catch that... 2015-01-24 10:26:43 +01:00
Wolfgang Bumiller
5c64437189 fix for loops 2015-01-20 20:55:27 +01:00
Wolfgang Bumiller
5968e3faa0 for now just call the dtors like this 2015-01-20 20:33:07 +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