4 ms·
I had some trouble understanding the problem, since I've never had to translate a program that relies on goto into a purely structured one. Does this article co
by shadowofneptune 5y ago
I had some trouble understanding the problem, since I've never had to translate a program that relies on goto into a purely structured one. Does this article cover it well? https://medium.com/leaningtech/solving-the-structured-control-flow-problem-once-and-for-all-5123117b1ee2 https://medium.com/leaningtech/solving-the-structured-contro...
- jfmc 5y agoThe requirement for structured programs dates back from the asm.js hack. Both relooper and stackifier are still workarounds. CPUs do not require structure programs at all. Unless there is a really good reason this still looks a hack driven by limitations of the underlying code generation. I understand that some compilation passes are easier/cheaper with structured control. But then... why are not LLVM and GCC enforcing them as well (at least their roadmaps)?
- astrange 5y agoIt’s for security reasons and enabling static code analysis, there’s no particular need to make compilation “easier”. PNaCL also had a lot of limitations though I don’t remember what they actually were.
- deleted 5y ago[deleted]