Talk:CompilerDev/Implementing Conditional Statements And Loops
Why is there a tutorial on implementing loops in some language or another on an OS development wiki? --Love4boobies 20:52, 26 October 2016 (CDT)
- There is a standing plan to (eventually) create a separate wiki and forum for language design and compiler development. To this end, the OS wiki group established a set of pages for bootstrapping it, to be temporary hosted here. No one else has worked on it for a while, but the subject of how certain constructs came up in the fora, and was relevant to OS dev (because a question arose about efficiency for explicit loops versus gotos - one of the posters was using goto extensively on this basis, and we were able to show that it was not faster in general), so I thought it would make sense to add this as a permanent part of the CompilerDev wiki project.
- This argument is ridiculous and can very well be used to justify all sorts of nonsense. Implementing anything efficiently may be useful in an OS... or any other software project, for that matter. That doesn't mean it has a place here. For instance, learning how to program is a prerequisite to writing an operating systems. Does that mean we should dedicate pages to teaching basic programming? What about implementing efficient sorting algorithms? Someone on the forum even suggested we have a page describing the MP3 format. We are just making a wiki that is in a sorry state much worse. And, frankly, I am not entirely convinced it has a place even on a wiki about compiler theory. I strongly recommend we delete this page. --Love4boobies 07:44, 28 October 2016 (CDT)
Assembly Snippets Architecture
Most people are familiar with the x86 syntax. Could we consider converting the MIPS assembly snippets to x86 assembly snippets (preferably in Intel syntax)?
- OK, that sounds reasonable. I was using MIPS mainly because it presents fewer problems for compiler code generation than x86 as a rule (though the expanded register file in the x86-64 makes register painting easier, which is usually the biggest problem for x86 compiler writers), but as you said, it isn't familiar for most of the people using the wiki. If the wiki had a way to show multiple code examples as tabs, however, that would allow us to have examples for several ISAs.
- The vast majority of compilers will implement the branch instructions and perform optimizations on its own intermediate code, rather than doing it at the machine code level. Thus some sort of pseudocode is probably more appropriate for this article. John 13:50, 30 October 2016 (CDT)