Javascript has truly become the "Write Once, Run Anywhere" language.
https://www.destroyallsoftware.com/talks/the-birth-and-death... (2014)
The idea was that the cost of using WASM would be entirely offset by the speedup of removing the cost of hardware memory protection. We could do that if everything ran in one big VM because the VM would enforce the memory protection.
Unfortunately, now we can't rely on a VM for memory protection anymore. We have to assume that any code running in the same address space can access any memory in the same address space.
So we need the hardware memory protection after all. You can say goodbye to your WASM-only future.
V8 at least have given up on the concept of trying to protect memory within the same address space.
It doesn't seem likely. The chipmakers will fix the vulnerabilities that break isolation between processes and between user-kernel, but the within-process issues will probably stick around.
This is an interesting way to put it. I would have said "applies to pretty much every CPU manufactured in the last decades." Your statement would make sense if speculation in hardware was some niche thing, but I think you would be hard-pressed to find an invulnerable CPU that is used in situations where people care about both performance and security.
That's great for the mill, but isn't relevant to the world outside of mill computing.
WASM already has this problem, what with 5 or 6 different incompatible runtimes already in existence.
It’s not literally “run anywhere” it’s “for all intents and purposes run anywhere”.
(Emphasis on optional)
As the OP said: this is reinventing the JVM, just worse. Including making all the mistakes again.
(At least for the server, that is. I see a great future for WebAssembly on client systems, where the JVM can be considered a failure.)
Also WASM isn't really ideal for interpretation, this could make implementing the CPU harder (however I have no clue about implementing CPUs, so this is just a guess).
What would be the advantage? Performance? Probably not much after JIT compiling WASM to native machine instructions. If there is an actual problem there, I guess it would be better to just add new native instructions that support WASM semantics. The JIT can then use these instructions if available.
Right now WASM can't do much without a runtime, so I think a WASM-only CPU is probably infeasible for some time.
People have tried to create high level language CPUs but often failed in terms of performance. An overview can be found here: https://en.wikipedia.org/wiki/High-level_language_computer_a...
And the long forgotten SWF, P-Code, M-Code, UNCOL, ANDF, Xerox bytecode.