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: Cudder !MhMRSATORI!fR8duoqGZdD/iE5 2012-09-29 4:18

Compiler for what language? That has a big influence on what you should do.
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.
Without knowing the language, I would say in the evaluation tree, which should be after variable resolution but before code generation.

offset from ebp.
This isn't 16-bit x86. Use ESP and free up another register for use. It is astounding how many compilers don't default to doing this, out of tradition or something. There is no disadvantage, only advantage.

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