Google
 
   
Login
Username:

Password:


Lost Password?

Register now!
Search
Main Menu
top books
Polls
What do you think about php-deluxe.net?
Excellent!
Cool
Hmm..not bad
What the hell is this?
encyclopedia
recommendation
compare webbrowser
Freenet DSL
Who's Online
7 user(s) are online (6 user(s) are browsing encyclopedia)

Members: 0
Guests: 7

more...
browser tip
Unix Befehle
manual of unix befehle
recommendation!
Sponsored
partner

Byte-code

Byte-code is a sort of intermediate representation that is more abstract than machine language. It is often treated as a binary computer file containing an computer program much like an object_file, which is a binary file containing a machine code produced by compilers.

Byte-code is called so because usually each op code is one byte in length but the length of instruction code varies. Each instruction has one byte operation code from 0 to 255 followed by parameters such as registers or memory address. This is a typical case, but the specification of bytecode largely varies in language.

As in intermediate code, it is a form of output code used by programming language implementers to reduce dependence on specific hardware and ease interpreter (computer software).

Less commonly, bytecode is used as an intermediate representation code of a Compiler. Some systems, called dynamic translators, or just-in-time compilation compilers, translate bytecode into machine language immediately prior to Runtime to improve execution speed.

A byte-code program is normally interpreted by a byte-code interpreter (usually called virtual machine since it is like a computer machine). The advantage is portability, that is, the same binary code can be executed across different platforms or architectures. This is the same advantage as that of interpreted languages. However, because bytecode is usually less abstract, more compact, and more computer-centric than program code that is intended for human modification, the performance is usually better than mere interpretation. Because of its performance advantage, today many interpreted languages are actually compiled into bytecode once then executed by bytecode interpreter. Such languages include Perl, PHP, Python programming language and Tcl (Tool Command Language). Java programming language code is typically transmitted as bytecode to a receiving machine, which then uses a Just-in-time compilation compiler to translate the bytecode to machine code before execution. The current implementation of the Ruby programming language actually does not use bytecode, instead, it relies on tree-like structures, which resembles intermediate representation used in compilers.

Also of interest are p-Codes, which are just like byte codes, but may be physically larger than a single byte and may vary in size (much like Opcodes on many Central processing units). They work at very high levels, such as print this string and clear the screen . Many versions of BASIC programming language and some versions of Pascal programming language use p-Codes.

= Examples =

*O-code machine of the BCPL programming language *p-Code machine of UCSD Pascal implementation of the Pascal programming language *Bytecodes of many implementations of the Smalltalk programming language *Java programming language byte code, which is executed by the Java virtual machine **Javassist **JMangler *Microsoft .NET Common Intermediate Language, executed by the .NET Common Language Runtime *Byte Code Engineering Library *CLISP implementation of Common Lisp compiles only to bytecode *CMUCL implementation of Common Lisp can compile either to bytecode or to native code; bytecode is much more compact *Icon programming language *Ocaml programming language optionally compiles to a compact bytecode form *Parrot virtual machine *Infocom used the Z-machine to make its software applications more portable.