A JavaScript Backend for the Miking Compiler

Detta är en Kandidat-uppsats från KTH/Skolan för elektroteknik och datavetenskap (EECS)

Sammanfattning: This thesis presents the design and implementation of an extension of the self-hosted Miking compiler to enable the generation of JavaScript code for different runtime environments and web browsers. Miking is a framework for developing domain-specific and general-purpose programming languages through sound language fragment composition, among other things, to create efficient compilers. Miking Core encapsulates a meta-language called Miking Lang and a fundamental functional Miking Expression language which Miking Lang itself is also lowered to. The presented backend translates Miking expressions into semantically equivalent effective, readable, sound, and correct JavaScript programs. In this report, development challenges, implementation methods, and techniques are also discussed and evaluated along with a review of the final compiler backend. Likewise, details on JavaScript-specific optimizations and pattern-matching compilation are presented, including how tail recursion is handled to enable complex Miking programs to be compiled into flexible and efficient JavaScript.

  HÄR KAN DU HÄMTA UPPSATSEN I FULLTEXT. (följ länken till nästa sida)