Bytecode
The bytecode is an intermediate code more abstract than the computer code not directly achievable. It is contained in a binary Fichier which represents a program, just like a file object produces by a Compilateur.
It is called bytecode because of its format where each instruction is coded in Binaire.
Since it is a code which is not achievable directly by a Processeur (except for certain processors managers the Bytecode Java nativement), it is used by the creators of computer programming languages like an intermediate code reducing the dependence with the material and facilitating its interpretation on several architectures.
Certain compilers use the bytecode as intermediate representation. Certain systems, called “dynamic translators”, or “compilers JIT (just-in-time)”, translate the bytecode of computer code right before the execution, in order to increase speed of it.
A program containing bytecode is carried out by an interpreter called virtual Machine, owing to the fact that it is about a program which carries out the code just like a microprocessor. The advantage is the portability: same the bytecode can be carried out on varied platforms or architectures for which an interpreter exists. A program in the form of bytecode can thus be transmitted of a machine to another and be carried out without modification by the machine executer whatever it is. The advantage is the same one as for the scripts, which are directly interpreted (and not compiled in bytecode ). However, the bytecode is less abstract, more compact and easier to handle than a script, envisaged, him, to be humanly understandable. Of this fact the performances of the interpreters of bytecode are generally much better than those of the interpreters of scripts.
To profit from these advantages, today of many languages interpreted in fact are compiled in bytecode before being carried out by an interpreter. It is the case for example of (when it is used for applications), Tcl and of Python. A program Java is usually transmitted in the form of bytecode to a machine host which will use a compiler JIT to translate the bytecode of computer code before execution. The current implementations of Perl and Ruby do not use a bytecode , but a structure out of tree which approaches the intermediate representation of the compilers.
The P-Code S differ from the bytecodes by the coding of their operations, which can be several bytes with a variable size, just like the opcodes of many processors. They have more a descriptive high level, like “posting this character string” or “erasing the screen”. The BASIC and some versions of Pascal use a p-Code .
Examples
- O-code of BCPL
- CLISP, an establishment of Common Lisp, compiles only in bytecode
- CMUCL, an establishment of Common Lisp, can compile in bytecode or native code; the native code is much more compact
- OCaml can compile a compact bytecode
- Microsoft .NET Common Intermediate Language, carried out by the Common Language Runtime (CLR)
- Java of Sun Microsystems (see Bytecode Java).
- Python
See too
| Random links: | Marie-Anne of Trémoille | Folds back (Malta) | FM 99.00 Dub Manifest | Borris-in-Ossory | Fancy Lala | USS_Philadelphie_(1799) |