@gron

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

, , and . Journal of Computer Languages, (2019)
DOI: 10.1016/j.cola.2019.01.003

Abstract

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.

Description

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

Links and resources

Tags

community

  • @gron
  • @dblp
@gron's tags highlighted