发表机构
Compiler Technology Department; Ivannikov Institute for System Programming of the Russian Academy of Sciences (ISP RAS)(编译器技术部门; 俄罗斯科学院伊万尼科夫系统编程研究所)
机构由 AI 辅助整理,请以论文原文为准。AI 中文总结
本文提出类C系统语言CPL,研究其用于编译器实验的便利性,设计了含基础构造的语言与编译器,经x86_64、i386微基准测试,其代码生成性能可与GCC等主流编译器媲美。
AI 中文摘要
本文介绍了Cordell编程语言(CPL),这是一种类C的紧凑系统语言,它保留了C对内存、布局和机器接口的直接访问能力,同时尝试采用更简洁的语法并借鉴了新语言的部分便利特性。本文还研究了类C语言是否比现代方法和范式更便于用于编译器实验。该语言及其编译器提供了原始值、指针、数组、带方法的容器、联合体、泛型函数、重载、入口点和段控制、系统调用以及内联汇编,但不提供类、内置方法、标准库或内存保护等高级构造。本文描述了该语言设计、编译器流水线、目标后端、静态分析架构以及面向操作系统的用例,随后使用可复现的x86_64和i386微基准测试,将该原型后端与C编译器基线进行评估。获得的结果表明,该编译器生成的代码可与GCC、Clang等生产级编译器以及TinyC、SmallerC等小型编译器生成的代码相媲美。
英文摘要
This paper presents Cordell Programming Language (CPL), a compact C-like systems language that retains C's direct access to memory, layout, and machine interfaces while experimenting with a smaller grammar and selected conveniences from newer languages. Also this paper studies whether C-like are more convenient to use for compiler experiments than modern approaches and paradigms. While the language and compiler provide primitive values, pointers, arrays, containers with methods, unions, generic functions, overloads, entry-point and section control, system calls, and inline assembly, they do not provide high-level constructs such as classes, built-in methods, a standard library, or memory protection. The article describes the language design, compiler pipeline, target backends, static-analysis architecture, and OS-facing use cases, then evaluates the prototype backend with reproducible x86_64 and i386 microbenchmarks against C compiler baselines. The obtained results suggest that the compiler can produce code comparable to that produced by production compilers such as GCC and Clang, as well as by small compilers such as TinyC and SmallerC.