This thesis presents an extended compiler for the PINS programming language, developed as an extension of the compiler implemented during the course Compilers and Virtual Machines in the second semester of the second year of study. The aim of the thesis is to upgrade the existing compiler so that, instead of interpreting the program within the Java Virtual Machine, it generates machine code. This is achieved using the open-source LLVM framework, which allows the program to be compiled into LLVM intermediate representation, from which an executable file is then created. The thesis provides a detailed description of the process of compiling individual language constructs into the intermediate representation. Additionally, it compares the execution speed of the generated executable files with the interpretation speed of the original compiler and the execution speed of programs written in the C programming language.
|