System programming languages are typically compiled in a linear pipeline process, which is a completely opaque and isolated to end-users. This limits the possibilities of performing meta-programming in the same language and environment, and the extensibility of the compiler itself by end-users. We propose a novel redefinition of the compilation process in terms of interpreting the program definition as a script. This evaluation is performed in an environment where the full compilation pipeline is implemented and exposed to the user via a meta-object protocol, which forms the basis for a meta-circular definition and implementation of the programming language itself. We demonstrate the feasibility of this approach by bootstrapping a self-compiling implementation of Sysmel, a static and dynamic typed Smalltalk and C++ inspired programming language.
翻译:系统编程语言通常采用线性流水线流程进行编译,这一过程对最终用户而言完全是不透明且封闭的。这限制了在相同语言与环境中执行元编程的可能性,也限制了用户对编译器自身的可扩展性。我们提出了一种全新的编译过程重定义方式,即将程序定义解释为脚本进行执行。该评估在完整编译流水线已实现并通过元对象协议向用户暴露的环境中进行,这构成了编程语言本身元循环定义与实现的基础。我们通过自举实现Sysmel——一种受Smalltalk与C++启发的静态与动态类型编程语言——的自编译实现,论证了该方法的可行性。