Abstract

Stack-based typed assembly language

Highlights

  • Introduction and MotivationStatically typed source languages have efficiency and software engineering advantages over their dynamically typed counterparts

  • In Morrisett et al [23], we presented a typed assembly language (TAL) and proved that its type system was sound with respect to an operational semantics

  • We demonstrated the expressiveness of this type system by sketching a type-preserving compiler from an ML-like language to TAL

Read more

Summary

Introduction and Motivation

Typed source languages have efficiency and software engineering advantages over their dynamically typed counterparts. Many of the complex tasks of code generation including register allocation and instruction scheduling are left unchecked and types cannot be used to specify or explain these low-level code transformations. These observations motivated our exploration of very low-level type systems and corresponding compiler technology. The compiler we presented was critically based on a continuation-passing style transform, which eliminated the need for a control stack. Allocating continuation closures on the heap has many advantages over a conventional stack-based implementation. The framework further elucidates the connection between a heap-based continuation-passing style compiler, and a conventional stack-based compiler. We can explain the callee-saves registers of SML/NJ [5, 3, 1] and the callee-saves registers of a stack-based compiler as instances of a more general CPS transformation that is independent of the continuation representation

Overview of TAL and CPS-Based Compilation
Adding Stacks to TAL
Exceptions
Exception Calling Conventions
Compound Stacks
Using Compound Stacks
Related and Future Work
Summary
Findings
A Formal STAL Semantics
Full Text
Paper version not known

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.