Opened 14 months ago

#206 new enhancement

Replace Lvalues With References

Reported by: ajbeach Owned by:
Priority: major Component: cfa-cc
Version: 1.0 Keywords:
Cc:

Description

We have worked through the theory of replacing all lvalues with references. References can already be used in every place an lvalue can be so to remove lvalues from the language would be to replace the existing uses of lvalue.

For instance consider a variable of type int. In C (and current CFA) a use of this variable would be of type int and an lvalue. With this change a use would be of int & and not an lvalue because that question is irrelevant.

This does not add any functionality but it would simplify the language description.

For implementation the compiler will still have to know about lvalues; at least as long as we use C as output. The current system (once corrected, see #205) could be used, lvalue could be treated as a flag on reference type or the passes that work with C code could just handle it themselves but that seems dangerous.

Change History (0)

Note: See TracTickets for help on using tickets.