Master's thesis

An Ahead-of-time Compiler for a Subset of TypeScript

Bc. Petr Kubica, UČO 514403
Abstract

Tato práce se věnuje návrhu a implementaci "ahead-of-time" překladače pro podmnožinu jazyka TypeScript. Překladač je implementován jako rozšíření knihovny Jaculus-machine - zabudovatelného běhového prostředí pro JavaScript. Překladač využívá typových anotací TypeScriptu, aby generoval více monomorfní kód, než umožňuje čistý JavaScript. Překladač umožňuje překládat části vstupních programů do strojového …more

Abstract

This thesis describes the design and implementation of an ahead-of-time compiler for a subset of TypeScript. The compiler is implemented as an extension of Jaculus-machine - an embeddable JavaScript runtime environment. The compiler makes use of TypeScript's type annotations to generate more monomorphic code than what is possible by using JavaScript. It can compile parts of an input program to machine …more

Thesis description
The goal of this thesis is to write a per-function, ahead-of-time compiler for a subset of TypeScript. The compiler will decide, separately for each function, whether it is possible to compile it (given the restricted language support in the compiler). It will then generate machine code for the selected subset of input functions in such a way that the remainder of the code can be interpreted using an existing JavaScript interpreter and seamlessly call compiled versions of functions if available. The motivation for this approach is to reduce the overhead associated with using JavaScript in restricted environments (especially on microcontrollers), where it is likely that the performance-sensitive parts of the input program will be sufficiently simple to compile ahead of time.
The thesis has been checked:
26/5/2025 12:35, RNDr. Petr Ročkai, Ph.D., UČO 139761
Language used
English English
Defence date
20/6/2025
The thesis was defended successfully

Supervisor

RNDr. Petr Ročkai, Ph.D., UČO 139761
KPSK FI MU

Reader

Ing. David Kozák
Oracle Labs a FIT VUT v Brně

  • Přidání souboru

    Soubor nebo složku lze nahrát pomocí tlačítka Přidat.
  • Další operace se soubory

    Podrobnosti lze zjistit označením příslušného řádku.
  • Pohled pro experty

    Pro častou práci je možné zvolit režim Více možností.
  • Vyhledávání souborů

    Vyhledávaný výraz můžete zadat přímo do adresního řádku.
  • Rychlý přístup k souborům

    Pomocí funkce Nedávné je možné se rychle vrátit k právě prohlíženým souborům. Oblíbené soubory je také možné označit Hvězdičkou.