Abstract

Ada 2005 adds an important capability to the language by allowing the construction and return of an object of a limited type by a function. New syntax for an extended return statement was added to enhance this capability further. This capability to return newly constructed objects of a limited type from a function, when combined with the additional capability to use aggregates to construct objects of a limited type, goes a long way to making use of limited types far more friendly and effective. Although the extended return statement and the associated ability to construct and return objects of a limited type brings new power to Ada, it also brings new choices and challenges to the Ada compiler implementor, when trying to decide how best to implement this feature. This presentation will review some of these alternatives, and present a high-level description of one particular approach based on the notion of an object creation context (OCC) which is designed to minimize the complexity of the generated code while providing an efficient and flexible implementation.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.