Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a21ab45b1e72a3ae

Jump to content

// Workers AI · dad joke modeWhat did meta-tracing say to its date? You're a path I want to follow.

From Wikipedia, the free encyclopedia

Meta-tracing is a mostly automatic transformation that takes an interpreter as input and produces a tracing just-in-time compiler as output. Since interpreters are usually easier to write than compilers, but run slower, this technique can make it easier to produce efficient implementations of programming languages.[1]

The essence of the approach is based on the use of two levels of interpretation, in which a tracing interpreter is used to execute a second interpreter that interprets the target language for which a compiler is to be generated; the tracing interpreter then watches the second interpreter as it executes sequences of instructions generated from the input program.[2]

This approach is used by the PyPy project to create their Python compiler, by meta-tracing a Python interpreter written in RPython, a restricted version of the Python programming language.[3] In the special case of RPython, the RPython language is itself interpreted by an interpreter written in the full Python language, symbolized by the PyPy project's logo of an ouroboros.

RPython has also been used to create an interpreter for the Scheme programming language.[2]

Meta-tracing can be compared to the AST-guided partial evaluation approach for generating compilers, such as the Truffle/JS compiler for the JavaScript programming language.[4] Both meta-tracing and AST-guided partial evaluation can be viewed as examples of Futamura projection.

References

[edit]
  1. Bolz, Carl Friedrich; Pape, Tobias; Siek, Jeremy; Tobin-Hochstadt, Sam (2014). "Meta-tracing makes a fast Racket" (PDF). Presented at the 8th Workshop on Dynamic Languages and Applications, June 2014 in Edinburgh, UK
  2. 1 2 Vandercammen, Maarten (June 2015). "The Essence of Meta-Tracing JIT Compilers" (PDF).
  3. Bolz, Carl Friedrich; Cuni, Antonio; Fijalkowski, Maciej; Rigo, Armin (2009-07-06). "Tracing the meta-level: PyPy's tracing JIT compiler". Proceedings of the 4th workshop on the Implementation, Compilation, Optimization of Object-Oriented Languages and Programming Systems. ICOOOLPS '09. New York, NY, USA: Association for Computing Machinery. pp. 18–25. doi:10.1145/1565824.1565827. ISBN 978-1-60558-541-3.
  4. Marr, Stefan; Ducasse, Stéphane (2015-10-23). "Tracing vs. Partial evaluation: Comparing meta-compilation approaches for self-optimizing interpreters". Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications. OOPSLA 2015. New York, NY, USA: Association for Computing Machinery. pp. 821–839. doi:10.1145/2814270.2814275. ISBN 978-1-4503-3689-5.

See also

[edit]