Skip to content
Commit 6448830d authored by Matthew Dawson's avatar Matthew Dawson
Browse files

Massive change for type handling in expressions.

When dealing with expressions, and generating output for them, types have
to be exactly known.  However, when two literals are added together (like:
5+5), the type to use for that is unknown.  To fix this issue, type information
has to be forced down the pipe.  So know the addition operation now knows it
needs to produce a particular type (ex Real or Fixed Point), and then tests
what the subexpressions can produce (for literals, they can produce either,
but a variable can only be what it is).

For Real, that is fine.  However a fixed point can take an infinite number of
different possibilities, and one cannot test for every combination.  So instead
a type "marker" is introduced.  This marker instead identifies that a fixed
point type is generally wanted, but specifics are unknown.  The system will
query for an appropriate type, and requires the specific type is returned, and
not a marker.  All types are also markers for themselves, so Reals, for instance,
don't need anything special.

While the marker system sounds good in theory, it currently is fully implemented,
so fixed point is currently broken.

git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_javization@10705 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
parent 61586e98
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment