• Home
  • Search
  • Compiling scala for the Java virtual machine
  • Cite Icon17
  • https://doi.org/10.5075/epfl-thesis-3302Copy DOI Icon

Compiling scala for the Java virtual machine

  • Abstract
  • Literature Map
  • References
  • Citations
  • Similar Papers
Abstract

Scala is a new programming language developed at EPFL and incorporating the most important concepts of object-oriented and functional languages. It aims at integrating well with the Java and .NET platforms: their respective libraries are accessible without glue code, and the compiler can produce programs for both virtual machines. This thesis focuses on the compilation of two important concepts of Scala : mixin inheritance and run time types. The compilation techniques are presented in the context of the Java virtual machine, but could be adapted easily to other similar environments. Mixin inheritance is a relatively recent form of inheritance, offering new capabilities compared to single inheritance, without the complexity of multiple inheritance. We propose two implementation techniques for mixin inheritance: code copying and delegation. The implementation used in the Scala compiler is then presented and justified. Run time types make it possible for a program to examine the type of its values during execution. This possibility is interesting in itself, offering new capabilities to the programmer. Furthermore, run time types are also required to implement other high level concepts, like pattern matching, type-safe serialisation and reflection. We propose an implementation technique based on the representation of types as values, and show how to use the run time types of the underlying virtual machine to implement those of Scala. The techniques presented in this thesis have been implemented in our Scala compiler, scalac. This enabled us to evaluate these techniques, in particular their impact on the performances of programs. This evaluation was performed on several real, non-trivial programs.

Similar Papers
  • Research Article
  • Citations19

Compiling Scala for Performance

  • Jan 01, 2010
  • Infoscience (Ecole Polytechnique Fédérale de Lausanne)
  • Iulian Dragos
  • Supplementary Content

Costrutti ed Applicazioni di Programmazione Generica in Linguaggi Object-Oriented

  • Apr 30, 2010
  • AMS Dottorato Institutional Doctoral Theses Repository (University of Bologna)
  • Maurizio Cimadamore
  • Conference Article
  • Citations2

Just-In-Time Java? Compilation for the Itanium® Processor

  • Sep 22, 2002
  • Tatiana Shpeisman +2
  • Conference Article
  • Citations50

Don't get caught in the cold, warm-up your JVM: understand and eliminate JVM warm-up overhead in data-parallel systems

  • Nov 02, 2016
  • David Lion +5
  • Conference Article
  • Citations6

Virtual class support at the virtual machine level

  • Oct 25, 2009
  • Anders Bach Nielsen +1
  • Supplementary Content

Co-Contextual Type Systems: Contextless Deductive Reasoning for Correct Incremental Type Checking

  • Mar 02, 2020
  • TUbilio (Technical University of Darmstadt)
  • Edlira Kuci
  • Research Article
  • Citations1

Implementing functional languages on object-oriented virtual machines

  • Jan 01, 2004
  • IEE Proceedings - Software
  • N Perry +1
  • Research Article
  • Citations6

Hardware/software co-design for virtual machines

  • Jan 01, 2005
  • IEE Proceedings - Computers and Digital Techniques
  • K.B Kent +2
  • Research Article
  • Citations10

The Warp programming environment

  • Jan 01, 1987
  • afips
  • Bernd Bruegge +6
  • Research Article
  • Citations5

Miniboxing

  • Oct 29, 2013
  • ACM SIGPLAN Notices
  • Vlad Ureche +2
  • Conference Article
  • Citations14

SJFuzz: Seed and Mutator Scheduling for JVM Fuzzing

  • Nov 30, 2023
  • Mingyuan Wu +7
  • Research Article

Superblock compilation and other optimization techniques for a Java-based DBT machine emulator

  • Mar 16, 2013
  • ACM SIGPLAN Notices
  • Marco Kaufmann +1
  • Research Article
  • Citations5

Promoting rewriting to a programming language: a compiler for non-deterministic rewrite programs in associative-commutative theories

  • Mar 01, 2001
  • Journal of Functional Programming
  • Kirchnerhélène +1
  • Conference Instance

Proceedings of the Third Workshop on Virtual Machines and Intermediate Languages

  • Oct 25, 2009
  • Conference Article
  • Citations9

Techniques and applications for guest-language safepoints

  • Jul 04, 2015
  • Benoit Daloze +3
Cactus Communications logo

Copyright 2026 Cactus Communications. All rights reserved.