`C(ID:3610/c::008)pronounced "Tick-C" An extension of ANSI C that supports dynamic code generation Related languages
References: Despite the growing use of dynamic code generation, no mainstream language provides flexible, portable, and efficient support for it. We describe `C (Tick C), a superset of ANSI C that allows flexible, high-level, efficient, and machine-independent specification of dynamically generated code. `C provides many of the performance benefits of pure partial evaluation, but in the context of a complex, statically typed, but widely used language. `C examples illustrate the ease of specifying dynamically generated code and how it can be put to use. in [ACM SIGACT-SIGPLAN] Thirteenth ACM Symposium on Principles of Programming Languages, ACM, Jan. 1986. view details in [ACM SIGACT-SIGPLAN] Thirteenth ACM Symposium on Principles of Programming Languages, ACM, Jan. 1986. view details ---It describes the `C language, and motivates the design of the language. ---It describes tcc, with special emphasis on its two runtime systems, one tuned for code quality and the other for fast dynamic code generation. ---It presents an extensive set of `C examples, which illustrate the utility of dynamic code generation and the ease of use of `C in a variety of contexts. ---It analyzes the performance of tcc and tcc-generated dynamic code on several benchmarks. Measurements show that use of dynamic compilation can improve performance by almost an order of magnitude in some cases, and generally results in two- to four-fold speedups. The overhead of dynamic compilation is usually recovered in under 100 uses of the dynamic code; sometimes it can be recovered within one use. The rest of this paper is organized as follows. Section 2 presents `C. Section 3 describes tcc. Section 4 illustrates some sample applications of `C. Performance measurements appear in Section 5. We discuss related work in Section 6, and summarize our conclusions in Section 7. Appendix A describes the syntactic differences between `C and ANSI C. in Computer Languages 24(4) view details |