by arto on 8/28/20, 10:03 AM with 19 comments
by dang on 8/29/20, 5:04 AM
by pizlonator on 8/29/20, 5:02 PM
It’s also misleading to say that register machines defeat SSA. It’s not hard to convert from a register machine to SSA - the algorithm is almost linear. Powerful backends (like WK’s B3) recompute SSA after some transformations anyway.
I think that wasm combines elements of a stack machine and a register machine in a way that leads to a compact format and multiple reasonable paths to converting to the sort of IR you’d want for converting a platform agnostic form like wasm into any contemporary instruction set. I’m no wasm fanboy but as far as binary IRs for transporting code into optimizing compilers go, this one is pretty slick.
by IshKebab on 8/29/20, 1:17 PM
by lebuffon on 8/29/20, 1:51 PM
https://www.researchgate.net/publication/2414672_A_Prelimina...
by kevingadd on 8/29/20, 2:03 PM
Incidentally this claim is false: "No streaming compiler had yet been built, hell, no compiler had yet been built." Early in development we had at least two different compilers used to generate test cases - one compiler for a home-grown imperative language written by Nick Bray, and another compiler for a subset of C# that I wrote [1]. Having those two compilers generating code early on was useful given that neither emscripten or LLVM were capable of compiling real apps so we were flying blind without them. Development of LLVM integration also started very early, the problem is just that it took a long time until it was usable.
As for whether the lessons from those compilers were actually paid attention to or acted upon, well...
P.S. I still don't understand the reasoning behind "blocks have return values". Does any popular programming language out there do this except maybe some of the ML-derived ones? I've never run into it in production software. It's certainly not something a typical compiler would generate unless the source language had it as a primitive.
1: https://github.com/kg/ilwasm/blob/master/third_party/tests/R...
by trumpeta on 8/29/20, 10:56 AM
by transfire on 8/29/20, 1:09 PM
Any idea how likely is this to make it in to the spec?
by gridlockd on 8/29/20, 10:37 AM
"Oh, but the implementation details will leak through!"
So what? This is an ivory-tower concern. When you are designing a standard, you must have your mind on possible implementations, which is far more difficult without having created an actual implementation. You can't design in a total vacuum, otherwise your standard can't be implemented properly at all.