|
i love the way that this triggers certain people "the C code I wrote in 1992 ran as I expected then and is therefore correct and should always run as it did!" I'll admit to a slight amount of this myself: I do expect things like *foo = 12; to work even if foo is NULL because IMO dereferncing NULL shouldn't be undefined in C as it can be important in certain use cases (embedded & OS work on some architectures), but I'm OK with that being an extension that has to be enabled
|
# ¿ Jun 29, 2017 16:57 |
|
|
# ¿ May 13, 2024 10:29 |
|
Raluek posted:restore from tape, probably tfw u boot from tape (actually booted and installed an Apollo from "tape" in MAME, 'twas interesting though not as interesting as actually using the system) (also never actually used the QIC drive on my LispM)
|
# ¿ Jun 29, 2017 17:00 |
|
rjmccall posted:the way better alternative is to say that basic blocks can have parameters and gotos can have arguments, which ends up looking kindof like a functional program with a lot of explicit tail calls: this looks like a transformation, is there a semantic difference I'm not seeing or is it really just a means of making phi nodes implicit so they're easier to reason about?
|
# ¿ Jun 29, 2017 17:05 |
|
Cocoa Crispies posted:write one to disabuse yourself of that notion start by reading An Incremental Approach to Compiler Construction and the more complete tutorial Compilers: Backend to Frontend and Back to Front Again
|
# ¿ Jun 29, 2017 17:24 |
|
is it PowerPC Mach-O, which is gratuitously different than the ABI defined as part of the architecture itself?
|
# ¿ Jun 30, 2017 22:28 |
|
is it the classic Mac, where calls to OS & Toolbox functions had to be emit as individual instructions in the 0xA000 range, some passing parameters and receiving return values via specific registers, and where every 32KB of code had to be in its own segment due to the use of PC-relative addressing for everything (to accommodate manual loading and unloading of segments on low-memory systems)?
|
# ¿ Jun 30, 2017 22:35 |
|
every so often I think it might be fun to write a toy Pascal compiler that targets LLVM
|
# ¿ Aug 4, 2017 19:17 |
|
like basically follow Wirth’s classic Compiler Construction but tweak it for classic Pascal and wire it up to LLVM
|
# ¿ Aug 4, 2017 19:34 |
|
|
# ¿ May 13, 2024 10:29 |
|
Volmarias posted:I would like to write a toy compiler (or even just an interpreter for a toy language) but not want to have to read 10,000 pages first. Where should I realistically start? that Nicklaus Wirth “Compiler Construction” book, seriously in print it’s a trade paperback under 1cm thick and is all built around exercises
|
# ¿ Aug 4, 2017 23:22 |