Commit Graph

31 Commits

Author SHA1 Message Date
Bill Currie c53001800a Create a struct for representing specifiers.
The specifiers are yet to come (next few commits), but this will be
necessary when they do.
2011-02-01 21:15:51 +09:00
Bill Currie 0624408317 Move the diagnostic functions into their own file. 2011-01-24 21:54:57 +09:00
Bill Currie d618e51dc8 Move save_string and make_string into strpool
Might not be the perfect place, but at least they're strongly related.
2011-01-24 21:32:48 +09:00
Bill Currie d5f669af7a Nuke temp reference counting.
The whole reason for this crazy developement branch :)
2011-01-22 11:40:53 +09:00
Bill Currie 52b561f7cb Nuke bind expressions.
Since I'm planning on implementing CSE and other optimizations, they're
rather redundant (and I'm having trouble getting them to work).
2011-01-21 19:07:58 +09:00
Bill Currie f8cc347dce Print expressions as dot files.
While the resulting images can be a little confusing, they're much easier
to read than my cryptic postfix notation.
2011-01-20 15:23:19 +09:00
Bill Currie 5deda9c9b9 Clean out ex_def as ex_symbol replaces it. 2011-01-19 22:25:04 +09:00
Bill Currie e08efe036b Move the constant expression values into their own struct. 2011-01-19 08:43:24 +09:00
Bill Currie d3a98af783 Make internal_error globally available. 2011-01-17 22:34:41 +09:00
Bill Currie c73ac30e3f Turns out decrementing the users was very very bad. 2011-01-11 10:56:36 +09:00
Bill Currie 4af5dad424 More math identities.
I forgot about 0 for multiplication and division. Detects division by zero.
2011-01-11 08:49:43 +09:00
Bill Currie 5b43fc1de3 Improve interaction between temps and const_folding.
Unfortunately, this seems to overdo the decrementing, so it could be
dangerous, but the ruamoko directory builds properly.
2011-01-11 08:47:52 +09:00
Bill Currie 5f70e27613 Quaternions use quaternion_val, not vector_val :P 2011-01-10 13:23:12 +09:00
Bill Currie ba27db6b93 Use some math identities to eliminate operations on non-constants. 2011-01-10 12:25:31 +09:00
Bill Currie 75ec6bf244 Clean out some unnecessary types from the progs engine and clean up the mess.
This is a nasty commit, sorry, but 99% of the commit is interdependent.
2011-01-10 12:25:31 +09:00
Bill Currie 2c84ae4898 Don't let casting in constfold increment users.
This fixes Deek's temp notice. No new notices have shown up, so this should
be the correct fix. The constant folding code no longer calls cast_expr
directly, but rather uses an internal wrapper that decrements users after
cast_expr increments it, resulting in a no-op.
2010-12-12 15:37:26 +09:00
Bill Currie 40fefff847 fix incorrect users for temps resulting from casting the result of ?:
There are probably other situations, but I'll fix them as they show up.
2010-01-13 06:25:06 +00:00
Bill Currie 0bd92e439a fix an interal error caused by losing the error state 2006-12-16 11:45:47 +00:00
Bill Currie 3fb03fc2be hah, should have been using __attribute__((used)) all that time (rather
than __attribute__((unused))). fixes the missing console in -x11
2005-08-04 15:27:09 +00:00
Bill Currie 9f662787e0 get struct copy to/from struct fields via pointers. fixes a bug found by
snax
2005-06-09 10:34:03 +00:00
Bill Currie 634dcbba95 forgot to allow struct move (for struct assigment)
This is an imperfect revision of history.
2004-11-11 22:41:00 +00:00
Bill Currie a97f74a6ac that particular error case is a type mismatch rather than an internal error. found when trying to compare a SEL with a string... oops :)
This is an imperfect revision of history.
2004-11-11 00:20:00 +00:00
Bill Currie 4882005a49 compile fixes (oops) and start working on quaternion support in qfcc 2004-04-08 02:33:20 +00:00
Bill Currie 8a14e30896 cast block expressions 2004-02-04 06:41:07 +00:00
Bill Currie 61da478188 these changes from earlier seem to be ok 2004-02-04 06:00:45 +00:00
Bill Currie 892e80938b that made a royal mess :( 2004-02-04 04:49:46 +00:00
Bill Currie b2474a2b97 better auto-conversion of function parameters (ugh, this is getting messy
:( )
2004-02-04 04:33:08 +00:00
Bill Currie e8a9060219 oops, messed up things like float = int 2004-02-04 00:30:42 +00:00
Bill Currie 3cd806fdcc fix some over-conversions 2004-02-04 00:27:42 +00:00
Bill Currie 7423ee389d better timing for constant folding 2004-01-25 21:36:44 +00:00
Bill Currie 51b0a66ac7 better constant folding with auto-conversion between scalar types (might
make that optional for non-constants)
2004-01-25 08:55:03 +00:00