All Topics  
Bytecode

 

   Email Print
   Bookmark   Link






 

Bytecode



 
 
Bytecode is a term which has been used to denote various forms of instruction set
Instruction set

An instruction set is a list of all the instruction , and all their variations, that a processor can execute.Instructions include:* Arithmetic such as add and subtract...
s designed for efficient execution by a software interpreter
Interpreter (computing)

In computer science, an interpreter normally means a computer program that execution , i.e. performs, instructions written in a programming language....
 as well as being suitable for further compilation into machine code. Since instructions are processed by software, they may be arbitrarily complex, but are nonetheless often akin to traditional hardware instructions; stack machine
Stack machine

In computer science, a stack machine is a model of computation in which the computer's memory takes the form of one or more stack s. The term also refers to an actual computer implementing or simulating the idealized stack machine....
s are common, for instance. Different parts may often be stored in separate files, similar to object modules
Object file

In computer science, object code, or an object file, is the representation of code that a compiler or assembler generates by processing a source code file....
, but dynamically loaded during execution.

The name bytecode stems from instruction sets which have one-byte
Byte

A byte is a basic unit of measurement of Computer storage in computer science. In many computer architectures it is a Byte addressing memory address space....
 opcode
Opcode

In computer technology, an opcode is the portion of a machine language instruction that specifies the operation to be performed. Their specification and format are laid out in the instruction set architecture of the processor in question ....
s followed by optional parameters.






Discussion
Ask a question about 'Bytecode'
Start a new discussion about 'Bytecode'
Answer questions from other users
Full Discussion Forum



Encyclopedia


Bytecode is a term which has been used to denote various forms of instruction set
Instruction set

An instruction set is a list of all the instruction , and all their variations, that a processor can execute.Instructions include:* Arithmetic such as add and subtract...
s designed for efficient execution by a software interpreter
Interpreter (computing)

In computer science, an interpreter normally means a computer program that execution , i.e. performs, instructions written in a programming language....
 as well as being suitable for further compilation into machine code. Since instructions are processed by software, they may be arbitrarily complex, but are nonetheless often akin to traditional hardware instructions; stack machine
Stack machine

In computer science, a stack machine is a model of computation in which the computer's memory takes the form of one or more stack s. The term also refers to an actual computer implementing or simulating the idealized stack machine....
s are common, for instance. Different parts may often be stored in separate files, similar to object modules
Object file

In computer science, object code, or an object file, is the representation of code that a compiler or assembler generates by processing a source code file....
, but dynamically loaded during execution.

The name bytecode stems from instruction sets which have one-byte
Byte

A byte is a basic unit of measurement of Computer storage in computer science. In many computer architectures it is a Byte addressing memory address space....
 opcode
Opcode

In computer technology, an opcode is the portion of a machine language instruction that specifies the operation to be performed. Their specification and format are laid out in the instruction set architecture of the processor in question ....
s followed by optional parameters. Intermediate representations such as bytecode may be output by programming language
Programming language

A programming language is a machine-readable artificial language designed to express computations that can be performed by a machine, particularly a computer....
 implementations to ease interpretation, or it may be used to reduce hardware and operating system dependence by allowing the same code to run on different platforms. Bytecode may often be either directly executed on a virtual machine
Virtual machine

In computer science, a virtual machine is a software implementation of a machine that executes programs like a real machine.Definitions...
 (i.e. interpreter), or it may be further compiled into machine code for better performance.

Unlike human-readable
Human-readable

The term "human-readable" refers to a representation of data that can be naturally Reading by humans. In most contexts, the alternative representation is a machine-readable format or medium of data primarily designed for reading by electronic, mechanical or optical devices, or computers....
 source code
Source code

In computer science, source code is any collection of statements or declarations written in some human-readable computer programming language....
, bytecodes are compact numeric codes, constants, and references (normally numeric addresses) which encode the result of parsing and semantic analysis
Compiler

A compiler is a computer program that transforms source code written in a programming language into another computer language . The most common reason for wanting to transform source code is to create an executable program....
 of things like type, scope, and nesting depths of program objects. They therefore allow much better performance than direct interpretation of source code.

Execution

A bytecode program is normally executed by parsing the instructions one at a time. This kind of bytecode interpreter is very portable. Some systems, called dynamic translators, or "just-in-time
Just-in-time compilation

In computing, just-in-time compilation , also known as dynamic translation, is a technique for improving the runtime performance of a computer program....
" (JIT) compilers, translate bytecode into machine language as necessary at runtime
Runtime

In computer science, runtime or run time describes the operation of a computer program, the duration of its execution, from beginning to termination ....
: this makes the virtual machine unportable, but doesn't lose the portability of the bytecode itself. For example, Java
Java (programming language)

Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java ....
 and Smalltalk code is typically stored in bytecoded format, which is typically then JIT compiled to translate the bytecode to machine code before execution. This introduces a delay before a program is run, when bytecode is compiled to native machine code, but improves execution speed considerably compared to interpretation—normally by several times.

Because of its performance advantage, today many language implementations execute a program in two phases, first compiling the source code into bytecode, and then passing them to the virtual machine. Therefore, there are virtual machines for Java
Java (programming language)

Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java ....
, Python
Python (programming language)

Python is a general-purpose high-level programming language. Its design philosophy emphasizes code readability. Python's core syntax and semantics are Minimalism , while the standard library is large and comprehensive....
, PHP
PHP

PHP is a scripting language originally designed for producing dynamic web pages. It has evolved to include a command line interface capability and can be used in Standalone software Graphical user interface....
, Forth, and Tcl
Tcl

Tcl is a scripting language created by John Ousterhout. Originally "born out of frustration"?according to the author?with programmers devising their own languages intended to be embedded into applications, Tcl quickly gained wide acceptance on its own and is generally thought to be easy to learn, but powerful in competent hands....
. The current reference implementation of Perl
Perl

In computer programming, Perl is a high-level programming language, List of programming languages by category, Interpreter , dynamic programming language....
 and Ruby instead work by walking an abstract syntax tree
Abstract syntax tree

In computer science, an abstract syntax tree , or just syntax tree, is a directed tree representation of the abstract syntactic structure of source code written in a certain programming language....
 representation derived from the source code.

Examples

  • O-code
    O-code machine

    The O-code machine is a virtual machine that was developed by Martin Richards in the late 1960s to give machine independence to BCPL, the low-level forerunner to C and C++....
     of the BCPL programming language
  • p-code
    P-Code machine

    In computer programming, a p-code machine or pseudo-code machine is a virtual machine designed to execute p-code . This term is applied both generically to all such machines , and to specific implementations, the most famous being the p-Machine of UCSD Pascal....
     of UCSD Pascal
    UCSD Pascal

    UCSD Pascal or UCSD p-System was a portable, highly machine-independent operating system. The University of California, San Diego Institute for Information Systems developed it in 1978 to provide students with a common operating system that could run on any of the then available microcomputers as well as campus Digital Equipment Corpora...
     implementation of the Pascal programming language
  • Bytecodes of many implementations of the Smalltalk programming language
  • Java bytecode
    Java bytecode

    Java bytecode is the form of instructions that the Java virtual machine executes. Each bytecode instruction or opcode is one byte in length; however, not all of the possible 256 instructions are used....
    , which is executed by the Java virtual machine
    Java Virtual Machine

    A Java Virtual Machine is a set of computer software programs and data structures which use a virtual machine model for the execution of other computer programs and Scripting language....
    • ASM
      ObjectWeb ASM

      The ASM library is a project of the ObjectWeb consortium. It provides a simple API for decomposing, modifying, and recomposing binary Java classes ....
    • BCEL
    • Javassist
      Javassist

      Javassist is a Java software library providing means to manipulate the Java bytecode of an application. In this sense Javassist provides the support for structural reflection , i.e....
    • JMangler
  • Emacs
    Emacs

    Emacs is a class of feature-rich text editors, usually characterized by their extensibility. Emacs has, perhaps, more editing commands than any other editor or word processor, numbering over 1,000....
     is a text editor with a majority of its functionality implemented by its specific dialect
    Emacs Lisp

    Emacs Lisp is a dialect of the Lisp programming language used by the GNU Emacs and XEmacs text editors . It is used for implementing most of the editing functionality built into Emacs, the remainder being written in C ....
     of Lisp. These features are compiled into bytecode. This architecture allows users to customize the editor with a high level language, which after compilation into bytecode yields reasonable performance.
  • EiffelStudio
    EiffelStudio

    EiffelStudio is a development environment for the Eiffel developed and distributed by Eiffel Software.EiffelStudio includes a combination of tools integrated under a single user interface: compiler, interpreter, debugger, browser, metrics tool, profiler, diagram tool....
     for the Eiffel programming language
    Eiffel (programming language)

    Eiffel is an International Organization for Standardization-standardized, object-oriented programming language designed to enable programmers to efficiently develop extensible, reusable, reliable software....
  • Managed code
    Managed code

    Managed code is Source code that executes under the management of a virtual machine, unlike unmanaged code, which is executed directly by the computer's Central processing unit....
     such as Microsoft .NET
    .NET Framework

    The Microsoft .NET Framework is a software framework that is available with several Microsoft Windows operating systems. It includes a large Library of coded solutions to prevent common programming problems and a virtual machine that manages the execution of programs written specifically for the Software framework....
     Common Intermediate Language
    Common Intermediate Language

    Common Intermediate Language is the lowest-level human-readable programming language in the Common Language Infrastructure and in the .NET Framework....
    , executed by the .NET Common Language Runtime (CLR)
    Common Language Runtime

    The Common Language Runtime is a core component of Microsoft .NET Framework initiative. It is Microsoft's implementation of the Common Language Infrastructure standard, which defines an execution environment for program code....
  • Byte Code Engineering Library
    Byte Code Engineering Library

    The Byte Code Engineering Library is a project sponsored by the Apache Foundation under their Jakarta Project charter to provide a simple API for decomposing, modifying, and recomposing binary Java classes ....
  • Scheme 48
    Scheme 48

    Scheme 48 is a free software Scheme implementation using a bytecode interpreter. It has an foreign function interface for calling subroutine from C and comes with a regular expression library, and a POSIX interface....
     implementation of Scheme using bytecode interpreter
  • CLISP
    CLISP

    In computing, CLISP is a programming language originally developed by Bruno Haible and Michael Stoll for the Atari ST. Today it supports Unix and Microsoft Windows systems....
     implementation of Common Lisp
    Common Lisp

    Common Lisp, commonly abbreviated CL, is a dialect of the Lisp programming language, published in American National Standards Institute standard document Information Technology - Programming Language - Common Lisp, formerly X3.226-1994 ....
     compiles only to bytecode
  • CMUCL
    CMUCL

    CMUCL is a free software Common Lisp implementation, originally developed at Carnegie Mellon University.CMUCL runs on most Unix-like platforms, including Linux and Berkeley Software Distribution; there is an experimental Microsoft Windows port as well....
     and Scieneer Common Lisp
    Scieneer Common Lisp

    Scieneer® Common Lisp is a commercial implementation of the Common Lisp programming language featuring support for Symmetric multiprocessing on a range of Linux, Solaris and HP-UX platforms....
     implementations of Common Lisp
    Common Lisp

    Common Lisp, commonly abbreviated CL, is a dialect of the Lisp programming language, published in American National Standards Institute standard document Information Technology - Programming Language - Common Lisp, formerly X3.226-1994 ....
     can compile either to bytecode or to native code; bytecode is much more compact
  • Embeddable Common Lisp
    Embeddable Common Lisp

    Embeddable Common Lisp is a free software Common Lisp implementation aimed at producing a small-footprint Lisp system that can be embedded into existing C -based applications....
     implementation of Common Lisp
    Common Lisp

    Common Lisp, commonly abbreviated CL, is a dialect of the Lisp programming language, published in American National Standards Institute standard document Information Technology - Programming Language - Common Lisp, formerly X3.226-1994 ....
     can compile to bytecode or C code
  • Icon programming language
    Icon programming language

    Icon is a very high-level programming language featuring goal directed execution and many facilities for managing string and textual patterns. It is related to SNOBOL, a string processing language....
  • Ocaml programming language optionally compiles to a compact bytecode form
  • Parrot virtual machine
    Parrot virtual machine

    Parrot is a register machine virtual machine being developed using the C and intended to run dynamic languages efficiently. It uses just-in-time compilation for speed to reduce the interpretation overhead....
  • LLVM, a modular bytecode compiler and virtual machine
  • YARV
    YARV

    YARV is a bytecode interpreter that was developed for the Ruby programming language by Koichi Sasada. The name is an acronym for Yet another Ruby VM....
     and Rubinius
    Rubinius

    Rubinius is an alternative Ruby implementation created by Evan Phoenix. Based loosely on the Smalltalk-80 Blue Book design, Rubinius seeks to...
     for Ruby
    Ruby (programming language)

    Ruby is a dynamic programming language, reflection , general purpose object-oriented programming language that combines syntax inspired by Perl with Smalltalk-like features....
    .
  • Infocom
    Infocom

    Infocom was a software company, based in Cambridge, Massachusetts, that produced numerous works of interactive fiction. They also produced one notable business application, a relational database called Cornerstone ....
     used the Z-machine
    Z-machine

    The Z-machine is a virtual machine that was developed by Joel Berez and Marc Blank in 1979 and used by Infocom for its interactive fiction. Infocom compiled game code to files containing Z-machine instructions , and could therefore port all its text adventures to a new platform simply by writing a Z-machine implementation for that platform....
     to make its software applications more portable.
  • C to Java Virtual Machine compilers
  • SWEET16
    SWEET16

    SWEET16 is an interpreted "byte-code" language invented by Steve Wozniak and implemented as part of the Integer BASIC read-only memory in the Apple II family computer....
  • The SPIN interpreter built into the Parallax
    Parallax, Inc. (company)

    Parallax, Inc. is a privately held company in Rocklin, California. Parallax, Inc. designs, manufactures, and sells BASIC Stamp microcontrollers, Propeller microcontrollers, microcontroller accessories , educational robot kits, and educational curriculum....
     Propeller
    Parallax Propeller

    File:Propeller Chip.JPGThe Parallax, Inc. P8X32 Propeller, introduced in 2006, is a multi-core Computer architecture Parallel computing microcontroller with eight 32-bit Reduced instruction set computer Central processing unit cores....
     Microcontroller
    Microcontroller

    A microcontroller is a small computer on a single integrated circuit consisting of a relatively simple CPU combined with support functions such as a crystal oscillator, timers, watchdog, serial and analog I/O etc....
  • Adobe Flash
    Adobe Flash

    Adobe Flash is a multimedia Platform created by Macromedia and currently developed and distributed by Adobe Systems. Since its introduction in 1996, Flash has become a popular method for adding animation and interactivity to web pages; Flash is commonly used to create animation, advertisements, and various web page components, to integrate...
     objects
  • BANCStar
    BANCStar programming language

    In computing, BANCStar is a specialist programming language for financial applications. The language is an internal language for the National Financial Computer Services, Inc BANCStar application, which is software to automate the operations of a bank branch....
    , originally bytecode for an interface-building tool but used as a language in its own right.
  • Ericsson implementation of Erlang uses BEAM bytecodes