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.
Identifer | oai:union.ndltd.org:UPSALLA1/oai:DiVA.org:liu-119545 |
Date | January 2012 |
Creators | Rasmus, Svensson |
Publisher | Linköpings universitet, Programvara och system, Linköpings universitet, Tekniska fakulteten |
Source Sets | DiVA Archive at Upsalla University |
Language | English |
Detected Language | English |
Type | Student thesis, info:eu-repo/semantics/bachelorThesis, text |
Format | application/pdf |
Rights | info:eu-repo/semantics/openAccess |
Page generated in 0.002 seconds