pulkomandy, French
@pulkomandy@mastodon.tetaneutral.net avatar

Ok, who had the idea to do this with an if and dangling else instead of a do {} while(0) ? Was that not yet invented in 1987?

I guess that works... until you forget a ; and then it compiles fine but the next line is never executed?

https://dl.acm.org/doi/pdf/10.1145/38807.38839

pulkomandy,
@pulkomandy@mastodon.tetaneutral.net avatar

More generally, the paper says "we made a plain C, portable implementation of this thing and it runs reasonably fast" and then goes on to explain how they hack and postprocess the assembler output to have global registers, and do peephole optimizations by using editor macros to replace known sequences of asm instructions...

phf,
@phf@social.sdf.org avatar

@pulkomandy Just goes to show that terrible hacks exist in every decade... 😁 (And I guess the authors of those often find them useful.)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • rosin
  • thenastyranch
  • ethstaker
  • osvaldo12
  • mdbf
  • DreamBathrooms
  • InstantRegret
  • magazineikmin
  • Youngstown
  • ngwrru68w68
  • slotface
  • GTA5RPClips
  • kavyap
  • cubers
  • JUstTest
  • everett
  • cisconetworking
  • tacticalgear
  • anitta
  • khanakhh
  • normalnudes
  • Durango
  • modclub
  • tester
  • provamag3
  • Leos
  • megavids
  • lostlight
  • All magazines