3 ms·
Isn't this almost what LLVM is doing - creating a common instruction set for language designers to target and which compiles to a large amount of machines? Sry
by olodus 9y ago
Isn't this almost what LLVM is doing - creating a common instruction set for language designers to target and which compiles to a large amount of machines?
Sry if it is stupid question. I'm interested in programming language design but are still very much learning the ropes. I might have misunderstood the real problem LLVM or this wants to solve.
- thechao 9y agoIt's the same idea, yes. Although, the specification of UNCOL is... a little odd. It has a bunch of cells (referenced by address); instructions refer to a previous instruction, and an address for their arguments---so like a stack machine, but the second argument is always a pointer. Or ... some such thing. The one paper I read spends 80% of its effort defining the representation of text.
- msla 9y ago> The one paper I read spends 80% of its effort defining the representation of text. These days, an equivalent effort would incorporate Unicode and UTF-8 by reference, which together amount to much more verbiage, especially Unicode. Back then, text standards weren't quite so mature, and it's possible nothing existing at the time really solved their problem.
- glangdale 9y agoFrom what I recall, this is called out as a specific non-goal in the LLVM documentation. I don't remember the details but I think that the instruction set is meant to be an easy way to write passes that communicate with each other but is not designed to be a universal intermediate format.
- abecedarius 9y agoWeb Assembly seems closer: there's less undefined behavior, as I understand it. (I've read much of the wasm spec but not LLVM docs.) https://github.com/WebAssembly/design/blob/master/Rationale.md https://github.com/WebAssembly/design/blob/master/Rationale....
- pjmlp 9y agoThat has been done multiple times before LLVM. Most mainframe assembly is referred to as bytecode in old papers, because CPUs were micro-programmed, some of them you could already load such micro-program on boot. For example on this Alto demo they upload the micro-program to enable the Smalltalk environment. Notorious common instruction sets are P-Code, JVM, MSIL, TIMI.