Re:c4x86 - JIT compiler for x86 in 86 lines
by jrockway on Saturday December 13, 2014 @04:16PM
(#8746446)
By 86 lines, do they mean 542 lines?
[ Parent
| on HN ]
Re:c4x86 - JIT compiler for x86 in 86 lines
by tptacek on Saturday December 13, 2014 @06:36PM
(#8746908)
Aside from 'dmytrish (the author of this fork)'s point about the code generator: this is extraordinarily tight C code. There's no fat on it anywhere, unless you want to call support for the ternary operator "fat". It's not obfuscated or artificially shrunk down at all. It's just sort of perfect.
I took an hour to read through it and comment the hell out of it, and it was some of the most pleasant reading I've done all year. I really, really like this code.
Re:c4x86 - JIT compiler for x86 in 86 lines
by dmytrish on Saturday December 13, 2014 @04:20PM
(#8746468)
I meant the code generator size: it starts at line 448 and ends at 535, so its size is about 86 lines. The rest of the code is taken from original c4 and is not changed.
Re:c4x86 - JIT compiler for x86 in 86 lines
by tomcam on Saturday December 13, 2014 @04:56PM
(#8746597)
..and SNAP! Great work, dmytrish. This is a godsend to people trying to fight their way through traditional compiler texts. Thanks for a truly impressive contribution to the language dev world.
Re:c4x86 - JIT compiler for x86 in 86 lines
by dmytrish on Saturday December 13, 2014 @05:11PM
(#8746653)
Thank you. rswier's c4 was a great inspiration for me. I am glad If my humble two cents are helpful for somebody.
Re:c4x86 - JIT compiler for x86 in 86 lines
by jrockway on Saturday December 13, 2014 @04:53PM
(#8746586)
I kind of noticed that, though lines(c4x86.c) - lines(c4.c) is closer to 30.
Re:c4x86 - JIT compiler for x86 in 86 lines
by petercooper on Saturday December 13, 2014 @05:15PM
(#8746662)
86 in base 67.