bytecode portable code redirects here for other uses see software portability bytecode also termed portable code or pcode is a form of instruction set designed for efficient execution by a software interpreter unlike humanreadable source code bytecodes are compact numeric codes constants and references normally numeric addresses that encode the result of compiler parsing and performing semantic analysis of things like type scope and nesting depths of program objects program execution general concepts code translation compiler compiletime optimizing compiler intermediate representation ir execution runtime system runtime executable interpreter virtual machine types of code source code object code bytecode machine code microcode compilation strategies justintime jit tracing justintime aheadoftime aot transcompilation recompilation notable runtimes android runtime art common language runtime clr mono crt0 hhvm java virtual machine jvm objectivec v8 nodejs pypy zend engine notable compilers toolchains gnu compiler collection gcc llvm clang vte look up bytecode in wiktionary the free dictionary the name bytecode stems from instruction sets that have onebyte opcodes followed by optional parameters intermediate representations such as bytecode may be output by programming language implementations to ease interpretation or it may be used to reduce hardware and operating system dependence by allowing the same code to run crossplatform on different devices bytecode may often be either directly executed on a virtual machine a pcode machine ie interpreter or it may be further compiled into machine code for better performance since bytecode instructions are processed by software they may be arbitrarily complex but are nonetheless often akin to traditional hardware instructions virtual stack machines are the most common but virtual register machines have been built also different parts may often be stored in separate files similar to object modules but dynamically loaded during execution execution a bytecode program may be executed by parsing and directly executing the instructions one at a time this kind of bytecode interpreter is very portable some systems called dynamic translators or justintime jit compilers translate bytecode into machine code as necessary at runtime this makes the virtual machine hardwarespecific but doesnt lose the portability of the bytecode for example 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 interpreting source code directly normally by around an order of magnitude 10x 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 the bytecode to the virtual machine there are bytecode based virtual machines of this sort for java python php tcl mawk and forth however forth is seldom compiled via bytecodes in this way and its virtual machine is more generic instead the implementation of perl and ruby 18 instead work by walking an abstract syntax tree representation derived from the source code more recently the authors of v8 examples import dis dis disassembler of python byte code into mnemonics disdisprinthello world 1 0 loadname 0 print 2 loadconst 0 hello world 4 callfunction 1 6 returnvalue actionscript executes in the actionscript virtual machine avm which is part of flash player and air actionscript code is typically transformed into bytecode format by a compiler examples of compilers include one built into adobe flash professional and one built into adobe flash builder and available in the adobe flex sdk adobe flash objects bancstar originally bytecode for an interfacebuilding tool but used also as a language berkeley packet filter byte code engineering library c to java virtual machine compilers clisp implementation of common lisp used to compile only to bytecode for many years however now it also supports compiling to native code with the help of gnu lightning cmucl and scieneer common lisp implementations of common lisp can compile either to native code or to bytecode which is far more compact common intermediate language executed by common language runtime used by net framework languages such as c dalvik bytecode designed for the android platform is executed by the dalvik virtual machine dis bytecode designed for the inferno operating system is executed by the dis virtual machine eiffelstudio for the eiffel programming language em the amsterdam compiler kit virtual machine used as an intermediate compiling language and as a modern bytecode language emacs is a text editor with most of its functions implemented by emacs lisp its builtin dialect of lisp these features are compiled into bytecode this architecture allows users to customize the editor with a high level language which after compiling into bytecode yields reasonable performance embeddable common lisp implementation of common lisp can compile to bytecode or c code ericsson implementation of erlang uses beam bytecodes icon programming languages infocom used the zmachine to make its software applications more portable java bytecode which is executed by the java virtual machine asm bcel javassist jmangler keyb the dos keyboard driver with its resource file keyboardsys containing layout information and short pcode sequences executed by an interpreter inside the resident driver llvm a modular bytecode compiler and virtual machine lsl a scripting language used in virtual worlds compiles in bytecode running on a virtual machine second life has the original mono version inworldz developed the phlox version lua language uses a registerbased bytecode virtual machine mcode of the matlab language ocode of the bcpl programming language ocaml language optionally compiles to a compact bytecode form pcode of ucsd pascal implementation of the pascal language parrot virtual machine pick basic also referred to as data basic or multivalue basic the r environment for statistical computing offers a bytecode compiler through the compiler package now standard with r version 2130 it is possible to compile this version of r so that the base and recommended packages exploit this scheme 48 implementation of scheme using bytecode interpreter bytecodes of many implementations of the smalltalk language the spin interpreter built into the parallax propeller microcontroller the sqlite database engine translates sql statements into a bespoke bytecode format sweet16 tcl visual foxpro compiles to bytecode webassembly yarv and rubinius for ruby 