The objects it creates are analogous to local variables declared in the body of a backquote expression, but they can be used across backquote expressions, rather than being restricted to the scope of one expression.
For error-checking purposes, `C forbids goto statements from transferring control outside the enclosing backquote expression.
While VCODE generates code quickly, it only has access to local information about backquote expressions; the quality of its code could often be improved.
It compiles each dynamic part--each backquote expression--to a code-generating function (CGF), which is invoked at run time to generate code for dynamic expressions.
Additionally, the intermediate representation of each backquote expression is processed by the common subexpression elimination and other local optimizations performed by the lcc front end, tcc also uses copt [Fraser 1980] to perform static peephole optimizations on the code-generating macros used by CGFs.
Closures are data structures that store five kinds of necessary information about the run-time environment of a backquote expression: (1) a function pointer to the corresponding statically generated CGF; (2) information about inter-cspec control flow (i.e., whether the backquote expression is the destination of a jump); (3) the values of run-time constants bound via the $ operator; (4) the addresses of free variables; (5) pointers to the run-time representations of the cspecs and vspecs used inside the backquote expression.
For each backquote expression, tcc statically generates both its code-generating function and the code to allocate and initialize closures.