Talk:Bytecode: Difference between revisions

Content deleted Content added
SineBot (talk | contribs)
Line 42:
 
Smalltalk-80 used the term Bytecode as well, and, it was always a inconsistent notion. Smalltalk bytecode do not use a fixed size to encode opcodes, but 4bit to 8bit, and there are instructions which are encoded with 2byte. So,in essence, the term Bytecode is usually used to name a VM instruction set which is designed with a hardware instruction set architecture in mind. 2009-08-20 <span style="font-size: smaller;" class="autosigned">—Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/134.184.43.183|134.184.43.183]] ([[User talk:134.184.43.183|talk]]) 12:09, 20 August 2009 (UTC)</span><!-- Template:UnsignedIP --> <!--Autosigned by SineBot-->
 
 
Well, I will just comment that personally I find both this article, as well as the one on interpreters, to be rather vague / misleading.
 
For example, usually it is not "semantic analysis" (as I understand the term) which produces bytecode, rather, it is more commonly the process of flattening an AST which produces bytecode, with this process driving the remainder of the compiler logic, and often with little or no "semantic analysis" (at least for many dynamic languages, where most of this is left to be figured out at runtime).
 
As for Java and Bytecode, I think Java popularized the term, but they by no means own it.
Generally, it refers to a byte-centric opcode-based structure, with 1 (or more) bytes for an opcode, and usually any arguments directly following. Usually, it is understood to be interpreted linearly as well (similar to machine code), and often handling control flow via offsets and jumps, rather than being tree or graph structured or using high-level control flow.
 
Its main property then is usually that of being similar to, but at the same time usually far less complex and bit-twiddly than, machine code (as well as traditionally interpreted or JIT-compiled rather than being directly run on a piece of hardware).
 
==Layman's terms==