Calling hell from heaven and heaven from hell
Proceedings of the fourth ACM SIGPLAN international conference on Functional programming
Linear scan register allocation
ACM Transactions on Programming Languages and Systems (TOPLAS)
Journal of Functional Programming
Harpy: run-time code generation in haskell
Haskell '07 Proceedings of the ACM SIGPLAN workshop on Haskell workshop
Hoopl: a modular, reusable library for dataflow analysis and transformation
Proceedings of the third ACM Haskell symposium on Haskell
Maxine: An approachable virtual machine for, and in, java
ACM Transactions on Architecture and Code Optimization (TACO) - Special Issue on High-Performance Embedded Architectures and Compilers
Hi-index | 0.00 |
We present a JVM prototype implemented in the purely-functional language Haskell. It exploits several features of the language, such as strong static typing to implement an intermediate representation, and abstraction mechanism to express machine code generation in the manner of a domain specific language. The compiler consists of (i) a pass to transform Java bytecode to a register-based intermediate representation, (ii) application of an existing data-flow analysis framework to our intermediate representation and (iii) machine code generation that targets the x86 architecture. The implementation follows a compile-only approach. To implement certain Java features efficiently, code patching is used. Various code samples demonstrate the elegance of our prototype. Results prove reasonable performance compared to real-world implementations.