Abstract:
Ballerina is an open source, strongly typed language for writing microservices and network applications with main focus on solving enterprise integration requirements. The ballerina compiler converts the ballerina source to set of ballerina byte code which is then executed by the ballerina virtual machine (BVM). The BVM does not perform well for most of the CPU bound operations due to its current design. This project focus on compiling ballerina source to JVM byte code and will be executed by the JVM directly, which will solve the performance bottleneck at BVM. This project also proposes a new compiler architecture, in which, the ballerina source code is transformed to an intermediate representation which is a low level representation of the ballerina program and it is used for generating the target JVM byte code. The performance of JVM based compiler backend implementation against the current BVM was compared for certain algorithms and programs. From the evaluation of the test results, it is found that the JVM target outperforms the ballerina runtime by factor of 100 in certain scenarios. With this promising results, the proposed new compiler architecture based on ballerina intermediate representation and the JVM compiler backend can potentially be used as the replacement for current ballerina compiler and runtime.
Citation:
Kishanthan, T. (2019). JVM compiler backend for Ballerina intermediate representation [Master’s theses, University of Moratuwa]. Institutional Repository University of Moratuwa. http://dl.lib.mrt.ac.lk/handle/123/16182