scholarly journals Use of Design Criteria for Intermediate Languages

1976 ◽  
Vol 5 (59) ◽  
Author(s):  
Ole Lehrmann Madsen ◽  
Bent Bruun Kristensen ◽  
Jørgen Staunstrup

A number of design criteria for intermediate languages are proposed. The intermediate language is viewed as an interface between the (syntax) analysis and the synthesis (code generation). To illustrate the ideas we propose an intermediate language for an existing high level language. The translation from the source language to the intermediate language is defined formally by an affix translation grammar.

1978 ◽  
Vol 7 (88) ◽  
Author(s):  
Peter Kornerup ◽  
Bent Bruun Kristensen ◽  
Ole Lehrmann Madsen

The possibility of supporting high level languages through intermediate languages to be used for direct interpretation and as intermediate forms in compilers is investigated. An accomplished project in the construction of an interpreter and a code generator using one common intermediate form is evaluated. The subject is analyzed in general, and a proposal for an improved design scheme is given.


2021 ◽  
Vol 5 (OOPSLA) ◽  
pp. 1-30
Author(s):  
Haoran Xu ◽  
Fredrik Kjolstad

Fast compilation is important when compilation occurs at runtime, such as query compilers in modern database systems and WebAssembly virtual machines in modern browsers. We present copy-and-patch, an extremely fast compilation technique that also produces good quality code. It is capable of lowering both high-level languages and low-level bytecode programs to binary code, by stitching together code from a large library of binary implementation variants. We call these binary implementations stencils because they have holes where missing values must be inserted during code generation. We show how to construct a stencil library and describe the copy-and-patch algorithm that generates optimized binary code. We demonstrate two use cases of copy-and-patch: a compiler for a high-level C-like language intended for metaprogramming and a compiler for WebAssembly. Our high-level language compiler has negligible compilation cost: it produces code from an AST in less time than it takes to construct the AST. We have implemented an SQL database query compiler on top of this metaprogramming system and show that on TPC-H database benchmarks, copy-and-patch generates code two orders of magnitude faster than LLVM -O0 and three orders of magnitude faster than higher optimization levels. The generated code runs an order of magnitude faster than interpretation and 14% faster than LLVM -O0. Our WebAssembly compiler generates code 4.9X-6.5X faster than Liftoff, the WebAssembly baseline compiler in Google Chrome. The generated code also outperforms Liftoff's by 39%-63% on the Coremark and PolyBenchC WebAssembly benchmarks.


2012 ◽  
Vol 47 (6) ◽  
pp. 1-12 ◽  
Author(s):  
Christophe Dubach ◽  
Perry Cheng ◽  
Rodric Rabbah ◽  
David F. Bacon ◽  
Stephen J. Fink

1978 ◽  
Vol 6 (8) ◽  
pp. 20-22
Author(s):  
Lyle A. Cox ◽  
James R. McGraw ◽  
Charles S. Wetherell

Aphasiology ◽  
1997 ◽  
Vol 11 (1) ◽  
pp. 39-57 ◽  
Author(s):  
Jennifer B. Lethlean ◽  
Bruce E. Murdoch

Sign in / Sign up

Export Citation Format

Share Document