Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
what is best in optimizer pipeline
value numbering
code motion
peepholing
loop idiom recognition
legalization
thread gassing
op banning
View Results
 
  • Locked thread
Angela Merkle Tree
Jan 4, 2012

the definition of open: "mkdir android ; cd android ; repo init -u git://android.git.kernel.org/platform/manifest.git ; repo sync ; make"
College Slice
compiler dev is fun because you get to say and type sexp a lot

Adbot
ADBOT LOVES YOU

Angela Merkle Tree
Jan 4, 2012

the definition of open: "mkdir android ; cd android ; repo init -u git://android.git.kernel.org/platform/manifest.git ; repo sync ; make"
College Slice

Shinku ABOOKEN posted:

how does incremental compilation work? what are the different approaches? are there any really good examples out there?

in my mind it's just having a dictionary of AST nodes and binary code but i don't really know.

i have no formal compiler experience but hacked together a compiler and code reloader for gta:sa's script engine, and the way i implemented it was storing the symbol list from the previous compile, and patching jumps that reference the changed code in the process's memory

you could potentially do the same thing for binaries on-disk, but you might need a fancy executable container that allows you to shove new code in at the end? i don't actually know much about this stuff lol

Angela Merkle Tree
Jan 4, 2012

the definition of open: "mkdir android ; cd android ; repo init -u git://android.git.kernel.org/platform/manifest.git ; repo sync ; make"
College Slice
spent two weeks on my own hobby compiler trying to figure out why it's stack implementation returned 10006 for (5000 + 3 + 2)

turns out the assembler had a destructive check in an inner loop instead of an outer loop when evaluating index-plus-offset (like stack[ebp - 4]) variables

it would get emitted as stack[ebp - 4] once, then as stack[ebp] for the rest of the uses of that variable

holy poo poo i was so mad at myself when i finally figured it out

  • Locked thread