• Refine Query
  • Source
  • Publication year
  • to
  • Language
  • 1
  • Tagged with
  • 1
  • 1
  • 1
  • 1
  • 1
  • 1
  • 1
  • 1
  • 1
  • 1
  • 1
  • 1
  • 1
  • 1
  • 1
  • About
  • The Global ETD Search service is a free service for researchers to find electronic theses and dissertations. This service is provided by the Networked Digital Library of Theses and Dissertations.
    Our metadata is collected from universities around the world. If you manage a university/consortium/country archive and want to be added, details can be found on the NDLTD website.
1

A JavaScript Backend for the Miking Compiler

Rågstad, William January 2022 (has links)
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. / Detta examensarbete presenterar design och implementation för utveckling av Miking-kompilatorn, med syfte att möjliggöra generering av JavaScript-kod för olika exekveringsmiljöer och webbläsare. Miking är ett ramverk för att utveckla domänspecifika och generella programmeringsspråk genom sund komposition av språksfragment som kan används för att skapa effektiva kompilatorer. Miking Core ramverket innehåller ett metaspråk kallat Miking Lang, vilket ”sänks” till det mer grundläggande funktionella Miking Expression-språket. ”Sänkning” betyder i huvudsak att skriva om mer komplexa semantiska konstruktioner i form av enklare. Den backend som presenteras översätter Miking-uttryck till semantiskt ekvivalenta JavaScript program som också är effektiva, läsbara, sunda och korrekta. I denna rapport diskuteras och utvärderas även utvecklingsutmaningar, implementeringsmetod och andra tekniker som har använts under arbetet. På samma sätt presenteras detaljer om JavaScript-specifika optimeringar och mönstermatchningskompilering, inklusive hur svansrekursion hanteras för att möjliggöra kompilering av komplexa Miking-program till flexibel och effektiv JavaScript med hjälp av ”trampoline” teknik.

Page generated in 0.0449 seconds