Talk About Network



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 > Compilers > Optimizing in m...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 2325 of 2420
Post > Topic >>

Optimizing in my toy compiler

by Boriel <boriel@[EMAIL PROTECTED] > Feb 7, 2008 at 12:05 PM

Hi (and hope this is the right place to post this).

I've like compilers and studying them. I've recently created my own
compiler toolkit in python. It generates LR(k) backtracking parsers,
cutting the tree-search using 1 Lookahead and viable prefixes (well,
I'm not sure how is this technique called :-P I just went my own way
and it seems to optimize very well) and now I'm interested in creating
intermediate code for a test-language (a pseudo ZX Spectrum BASIC)
compiler created with this tool.

If I'm not wrong, stack-oriented code is easy to generate, but
difficult to optimize whilst three or quad code is much easy to
optimize. Any ideas? Which one should you suggest? I'm with "The
Dragon book", and it have *too* much information. :-P

Regards,
J. Rodriguez
[Depends what you want to do.  RPN is indeed easy to generate and
interpret, but it's a pain to optimize.  Triples and quads aren't much
harder to interpret but are easier to optimize because the connection
between sources and uses of data are more explicit.  -John]




 3 Posts in Topic:
Optimizing in my toy compiler
Boriel <boriel@[EMAIL   2008-02-07 12:05:06 
Optimizing in my toy compiler
Nils M Holm <nmh@[EMAI  2008-02-11 06:48:52 
Re: Optimizing in my toy compiler
Max Hailperin <max@[EM  2008-02-12 19:00:54 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan12V112 Mon May 12 17:33:26 CDT 2008.