Compiler for an Embedded Extension Language on Android

Bytecode interpreters are a common implementation strategy for scripting languages. Source code is translated to bytecode to improve time and memory performance. The Android platform includes the Dalvik virtual machine, which typically executes bytecode compiled from Java source code. This thesis de...

Full description

Bibliographic Details
Main Author: Rasmus, Svensson
Format: Others
Language:English
Published: Linköpings universitet, Programvara och system 2012
Subjects:
Online Access:http://urn.kb.se/resolve?urn=urn:nbn:se:liu:diva-119545
Description
Summary:Bytecode interpreters are a common implementation strategy for scripting languages. Source code is translated to bytecode to improve time and memory performance. The Android platform includes the Dalvik virtual machine, which typically executes bytecode compiled from Java source code. This thesis describes how this virtual machine can be reused to execute bytecode compiled from a scripting language. A compiler is written for a test bed scripting language and the time and memory performance is evaluated. The Dalvik virtual machine, designed for a statically typed object-oriented language, was flexible enough to successfully host a dynamically typed scripting language that allows for objects to be transported cheaply between scripts and Java code. The compiled code executes one to two orders of magnitude faster than with a naive interpreting implemetation. Numeric performance is lacking in general, though simpler cases are optimized.