Abstract
This article presents the code generation scheme of the OCaml-Java compiler. The goal of the OCaml-Java project is to allow execution of OCaml programs on a Java Virtual Machine. In order to achieve decent performance, it is necessary to build a compiler producing optimized bytecode that will rely on an efficient support library at runtime.
The OCaml-Java project thus provides \((i)\) an efficient runtime written in pure Java, and \((ii)\) an optimizing compiler based on the original OCaml compilers for the front-end and on the Barista library for the back-end.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
Already present in previous version, but not production-ready.
- 2.
Despite their name, some constants may in fact be modified, hence the impossibility to share them between programs running in the very same Java Virtual Machine.
- 3.
The Hotspot compiler can remove such tests if it can prove that no illegal access will happen, but the developer can not request to remove such tests.
- 4.
- 5.
References
Clerc, X.: OCaml-Java: OCaml on the JVM. In: Loidl, H.-W., Peña, R. (eds.) TFP 2012. LNCS, vol. 7829, pp. 167–181. Springer, Heidelberg (2013)
Danelutto, M., Di Cosmo, R.: Parmap: minimalistic library for multicore programming. https://gitorious.org/parmap
Stolpmann, G.: Plama: Map/Reduce and distributed filesystem. http://plasma.camlcity.org/
Chailloux, E., Canou, B., Wang, P.: OCaml for Multicore Architectures. http://www.algo-prog.info/ocmc/web/
Hickey, R.: The clojure programming language. In: Proceedings of the 2008 Symposium on Dynamic Languages. DLS ’08, pp. 1:1–1:1. ACM, New York (2008)
Odersky, M., et al.: The Scala Language. http://www.scala-lang.org/
Nutter, C.O., et al.: JRuby. http://jruby.org
Clerc, X.: The Barista library. http://barista.x9c.fr
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Clerc, X. (2013). OCaml-Java: From OCaml Sources to Java Bytecodes. In: Hinze, R. (eds) Implementation and Application of Functional Languages. IFL 2012. Lecture Notes in Computer Science(), vol 8241. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-41582-1_5
Download citation
DOI: https://doi.org/10.1007/978-3-642-41582-1_5
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-41581-4
Online ISBN: 978-3-642-41582-1
eBook Packages: Computer ScienceComputer Science (R0)