5 ms·
Yes...? I'm disputing the characterization of WebAssembly as assembly. There does not exist a CPU which runs a trivial translation of WebAssembly.
by souprock 5y ago
Yes...? I'm disputing the characterization of WebAssembly as assembly. There does not exist a CPU which runs a trivial translation of WebAssembly.
- cmeacham98 5y agoWhat about the JVM? Tools for modifying java bytecode call themselves "assemblers" and "disassemblers"[1]. There have been previous attempts at a physical CPU that runs JVM bytecode[2] but to my knowledge none exist for the current version. 1: https://github.com/Storyyeller/Krakatau https://github.com/Storyyeller/Krakatau 2: https://en.wikipedia.org/wiki/Java_processor https://en.wikipedia.org/wiki/Java_processor
- userbinator 5y agohttps://en.wikipedia.org/wiki/Jazelle https://en.wikipedia.org/wiki/Jazelle is one notable implementation, unfortunately details are proprietary and there doesn't seem to be much in the way of RE attempts (you'd think more people would be curious about finding out how a completely undocumented instruction set extension works...)
- dnautics 5y agoI feel similarly about the erlang vm bytecode assembly. When you read it it helps to know something about true assembly languages, as you're mostly manipulating registers and sending them to operands.
- dtech 5y agoI don't think that's a fair definition. If such a CPU could be reasonably made, you could still call it assembly.
- FatalLogic 5y agoBut it hasn't been made. Isn't that the point? Assembly maps very closely to actual hardware instructions/opcodes
- pjmlp 5y agoNot on x86 it doesn't.
- FatalLogic 5y agoWell, nonetheless, it's the lowest level you can code at, isn't it?
- pjmlp 5y agoSame applies to any bytecode format, when an hardware implementation for it happens to exist. It was how Xerox PARC workstations worked, the bytecode of Interlisp-D, Mesa, Mesa/Cedar, Smalltalk worked, with microcode interpreter loaded on boot for them. How Lillith (Modula-2) and Cedar (Oberon) workstations worked, with hardware implementation of their bytecode formats. How some Java CPUs like Jazelle and JavaOS worked. How Pascal USCD worked on Constellation OS by Corvus Systems. How Burroughs B5500 mainframes worked, with ESPOL/NEWP intrinsics, still being shipped by Unisys nowadays on a completely unrelated hardware form. I certainly can dig out a couple of other examples.
- FatalLogic 5y agoThis is interesting, thanks, but I don't understand how it supports the refutation you made about x86, which is what I was responding to
- pjmlp 5y agoModern x86 is just bytecode for a microcode only Intel has the tooling available.
- FatalLogic 5y agoI understand that. Then this is probably just a disagreement about the definition of 'Assembly'. I define Assembly as the lowest level that is user-accessible. I think you would say that's a rather arbitrary division in the case of x86, when there is a sophisticated microcode language underneath it?