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
feedmegin
Jul 30, 2008

Writing compilers is fun I wrote a compiler and it taught me stuff

Adbot
ADBOT LOVES YOU

feedmegin
Jul 30, 2008

rjmccall posted:

it's fun to imagine starting from scratch: writing a primitive assembler in machine code, then a primitive compiler in assembly, then slowly bootstrapping that into a complete system

on the other hand, how exactly are we writing the machine code without a computer? once upon a time i think you could toggle this stuff directly into memory using switches or something on the side of the storage system, but those days are gone. and why did They Who Done The Event wipe all the drives but not any of the firmware? maybe somebody hid a compiler in the firmware. oh, and a kernel, that would be grand

What if the firmware is OpenFirmware and you already have a nice Forth to play with?

feedmegin
Jul 30, 2008

Silver Alicorn posted:

again, totally not the use case for C (operating systems, low level programs and embedded code too big for assembly)

use java or Visual Basic or whateverthefuck

It's nothing to do with that, it's because single pass compilers were important in like 1970 because their computers were slow and had the memory of a modern microwave. Theres no real excuse for it in 2017 and it would have no effect on what actual code is generated.

feedmegin
Jul 30, 2008


Auto getting up there

  • Locked thread