4 ms·
Because the underlying philosophy was not the same. Java bytecode was never originally intended as a generic low-level assembly language. Its semantics are def
by int_19h 1y ago
Because the underlying philosophy was not the same.
Java bytecode was never originally intended as a generic low-level assembly language. Its semantics are defined largely by the needs of Java the language, which means that, on one hand, it doesn't even have pointers (only object references; so you can't e.g. point into the middle of an array), and, on the other hand, it has opcodes like "call method" that map nicely to what Java does but not necessarily to what other languages do.
wasm, on the other hand, is sufficiently low-level that you can compile C into it.