3 ms·
I'll take "what is due diligence" for 300, Alex.
by zachrip 6y ago
I'll take "what is due diligence" for 300, Alex.
- kerkeslager 6y agoI guess I was technically wrong in that it does have an emitter, but I wasn't wrong in that it still doesn't emit assembly. gcc (or whatever you're using to compile your C) is still doing all the nuclear reactor part.
- azhenley 6y agoVery few "commercial" compilers emit assembly directly. They use LLVM or C or some other intermediate language.
- kerkeslager 6y agoSorry that I'm coming across as critical of your work here--that wasn't my intent but I didn't do enough to avoid it. Your article isn't the problem, it's just proximal to the problem I'm describing. I should have been more clear about that in my post. To address your post: I'm not aware of any widely used compilers that compile from a general-purpose language to C. There are a handful of DSLs that do, and there may be some mainstream general-purpose language compiler that does that I don't know of. Compiling to LLVM or GCC's RTL has a lot more in common with compiling to Assembly than it does with compiling to C. Compiling to LLVM/RTL/assembly is fundamentally different from compiling to another high-level language. When compiling to C for example, you get to compile your for loops into C for loops--it's a fairly easy one-to-one conversion. Compiling to conditional jumps is a much more complicated endeavor, requiring more architecture.
- jermaustin1 6y agoI believe what you are meaning by assembly is native code or the executable bytes that a compiler/linker/assembler output? Assembly is just another language (or more precisely: family of languages).
- kerkeslager 6y agoI wasn't confused about what assembly was. Compiling a for loop to a slightly different syntax of for loop is a much different problem from compiling a for loop to conditional jumps.