Loading…

eJSTK: Building JavaScript virtual machines with customized datatypes for embedded systems

•Suitable VM of a subset of JavaScript depends on the program that run on it.•Type-based dispatch code can be optimized by a decision diagram algorithm.•Generating suitable VM for each program makes the VM compact and fast. Using JavaScript as a description language can increase the productivity of...

Full description

Saved in:
Bibliographic Details
Published in:Journal of computer languages (Online) 2019-04, Vol.51, p.261-279
Main Authors: Ugawa, Tomoharu, Iwasaki, Hideya, Kataoka, Takafumi
Format: Article
Language:English
Subjects:
Citations: Items that this one cites
Items that cite this one
Online Access:Get full text
Tags: Add Tag
No Tags, Be the first to tag this record!
Description
Summary:•Suitable VM of a subset of JavaScript depends on the program that run on it.•Type-based dispatch code can be optimized by a decision diagram algorithm.•Generating suitable VM for each program makes the VM compact and fast. Using JavaScript as a description language can increase the productivity of application programs on embedded systems. Since JavaScript is a dynamic language, it is important for a JavaScript virtual machine (VM) to efficiently identify the types of first-class values and perform type-based dispatches. For embedded systems, the type-based dispatching code is desired to be compact as well as fast. Although operators of JavaScript are heavily overloaded and capable of accepting a variety of datatypes as operands, all the datatypes are not always necessarily used in a specific program. If some datatypes are never used in this program, a VM for a subset of JavaScript with operators that support limited datatypes suffices. Such a VM is expected to be compact and efficient. In addition, internal representation of datatype of each value may affect performance of type-based dispatching. This paper presents a novel framework that can generate a VM for a subset of JavaScript on the basis of operand specifications and datatype specifications given by the programmer. The operand specifications describe possible operand datatypes for every instruction and the datatype specifications describe adequate internal representations of necessary datatypes for a target program. The generated VM is specialized in the sense that it has efficient and minimum type-based dispatching code for all instructions.
ISSN:2590-1184
2590-1184
DOI:10.1016/j.cola.2019.01.003