Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

compiler design question

Name: Anonymous 2012-09-28 21:13

In my compiler, I have an emitter function that outputs assembly, affecting the stack, and a variable resolution function that manages local variables and their offset from ebp.

I'm trying to track types through intermediate computations, though, and i don't know whether to put this functionality in the emitter, in the scope resolution system, or to merge the two.

A touhou for your thoughts?

Name: Anonymous 2012-09-28 21:39

In fact, by moving types into the emitter, variable names could follow, and scope resolution could proceed by simply traversing the stack until a stack frame was reached.

Although linear in performance, for a small number of local variables it will not impede compile times compared to the overhead of a hashtable.

This requires the construction of an inner- and outer- emitter to separate the architecture-depending code generation from an imaginary stack-independent virtual bytecode system.

I shall provisionally title this combined emitter/resolution architecture the Joined Inner Declaration Framework

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List