Conversation

Jarkko Sakkinen

Edited 4 days ago
WebAssembly is one of the worst ideas in the industry during past 10 years. why end up with stack machine and purposely complicate JIT. Never really grabbed it engineering wise TBH but maybe I'm missing something who knows.

You don't need to be an engineer to get it. It just tends to be easier to find ways map registers to registers, and requires more stretch to move between stack and register machine.
1
0
0
Edited 4 days ago

@jarkko you would have to make assumptions about target register capabilities.. there goes your portability ? though they did make dalvik work so 🤷‍♀️ my beef with wasm is the lowest common denominator stuff that gets often done over

2
0
0
@pinkforest well yeah of course you need to address contraints when designing "softcore" (i guess this a term?) :-)

First, you need some register space for book keeping (like one or two registers at least) and it unfortunately shares space with softcores registers.

So problem at hand is like:

1. Reduce softcores register space i.e., it will have less registers than host CPU.
2. "Share-and-swap" registers with the softcore for the colliding part.

This of course assumes that ISA is similar enough to x86-64 and aarch64 but that is quite fair constraint to set from the get go for obvious reasons :-)

Anyhow, it will quite simple and sound translation with no artificial stack machines blocking the way :-)
1
0
0
Multi-core was already a thing (and Moore's law for single core was reached) when wasm was invented and its execution pipeline is really better fit for hardware that precursors it by multiple years.
0
0
0