Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Languages Misc > Re: issue: RPN,...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 8 of 9 Topic 1113 of 1217
Post > Topic >>

Re: issue: RPN, TAC+SSA, and x86-style ASM

by "robertwessel2@[EMAIL PROTECTED] " <robertwessel2@[EMAIL PROTECTED] > Feb 25, 2008 at 03:04 PM

On Feb 23, 4:08=A0am, "cr88192" <cr88...@[EMAIL PROTECTED]
> wrote:
> well, recently I came up with an idea, but it has turned into a bit of a
> mess on me...
>
> I have an existing C compiler I wrote before, and it is organized about
li=
ke
> this:
> Preprocessor;
> Parser;
> Upper Compiler, converts syntax trees to RPNIL;
> Lower Compiler, converts RPNIL to assembler;
> Assembler;
> Linker.
>
> so, the upper-compiler ends up being fairly sparse, mostly being a
fairly
> dumb converter.
>
> the output, I call RPNIL, is a vaguely Forth or PostScript like language
> representing the intermediate version of the language.
>
> some of the basic types-related processing, constant folding, some
branch
> elimination, ... has been done before any of this RPNIL code is
generated
> (likewise, the various high level constructions have been decomposed
into
> labels and conditional jumps).
>
> meanwhile, the lower-compiler does much of the "heavy lifting",
implementi=
ng
> many things I had not really originally intended (nearly the entire
types
> tower, operator overloading, inlining, ...), and goes all the way down
to
> machine code (when this compiler project was started, it was originally
> assumed that this lower end would be simple and stupid, but it ended up
> being one of the largest and complicated pieces of the project).


The front-end/back-end split is usually such that there are no
lexical, syntactic or semantic issues left for the back end to deal
with.  Almost universally it's considered a good idea to begin code
generation with no ambiguities left in the source (obviously excluding
anything that's defined to be ambiguous until runtime).  If you've got
a significant amount of that sort of stuff left in your back end, you
may want to consider getting that moved up first.
 




 9 Posts in Topic:
issue: RPN, TAC+SSA, and x86-style ASM
"cr88192" <c  2008-02-23 20:08:55 
Re: issue: RPN, TAC+SSA, and x86-style ASM
"Rod Pemberton"  2008-02-23 06:53:30 
Re: issue: RPN, TAC+SSA, and x86-style ASM
"cr88192" <c  2008-02-23 22:55:32 
Re: issue: RPN, TAC+SSA, and x86-style ASM
Reinder Verlinde <rein  2008-02-23 17:35:17 
Re: issue: RPN, TAC+SSA, and x86-style ASM
"cr88192" <c  2008-02-24 07:15:19 
Re: issue: RPN, TAC+SSA, and x86-style ASM
Phil Carmody <thefatph  2008-02-24 14:09:15 
Re: issue: RPN, TAC+SSA, and x86-style ASM
"cr88192" <c  2008-02-25 20:27:57 
Re: issue: RPN, TAC+SSA, and x86-style ASM
"robertwessel2@[EMAI  2008-02-25 15:04:32 
Re: issue: RPN, TAC+SSA, and x86-style ASM
"cr88192" <c  2008-02-26 10:46:45 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 18:11:38 CDT 2008.