Content deleted Content added
CIL is not a virtual machine |
Citation bot (talk | contribs) Added title. Changed bare reference to CS1/2. | Use this bot. Report bugs. | Suggested by Folkezoft | Linked from User:Folkezoft/sandbox | #UCB_webform_linked 200/978 |
||
(237 intermediate revisions by more than 100 users not shown) | |||
Line 1:
{{short description|None}}
{{more citations needed|date=October 2011}}
'''Application virtualization software''' refers to both application [[virtual machine]]s and software responsible for implementing them. Application virtual machines are typically used to allow application [[bytecode]] to run portably on many different computer architectures and operating systems. The application is usually run on the computer using an [[Interpreter (computing)|interpreter]] or [[just-in-time compilation]] (JIT). There are often several implementations of a given virtual machine, each covering a different set of functions.
==Comparison of virtual machines==
{{Hatnote|[[JavaScript]] machines not included. See [[List of ECMAScript engines]] to find them.}}
The table here summarizes elements for which the virtual machine designs are intended to be efficient, not the list of abilities present in any implementation.
{| class="wikitable sortable"
|-
![[Virtual machine]]
![[Model of computation|Machine model]]
![[Memory management]]
![[Secure coding|Code security]]
![[Interpreter (computing)|Interpreter]]
![[Just-in-time compilation|JIT]]
![[Ahead-of-time compilation|AOT]]
![[Shared library|Shared libraries]]
!Common Language [[Object Model]]
![[Dynamic typing]]
|-
! [[Android Runtime]] (ART)
| [[Register machine|register]]
| automatic
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{dunno}}
| {{yes}}
| {{yes}}
|-
! [[Common Language Runtime
| [[Stack machine|stack]]
| automatic or manual
|
|
|
|
|
| {{yes}}
| {{yes}}
|-
! [[Dis
| [[
| automatic
|
|
|
|
|
| {{yes}}
| {{yes}}
|-
! [[
| [[Stack machine|stack]]
| automatic or manual
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{no}}
|-
! [[HotSpot (virtual machine)|HotSpot]] [[Java virtual machine|JVM]]
| [[Stack machine|stack]]
| automatic
|
|
|
|
|
| {{yes}}
| {{yes}}<ref>{{cite web|url=http://jcp.org/en/jsr/detail?id=292 |title=The Java Community Process(SM) Program - JSRs: Java Specification Requests - detail JSR# 292 |publisher=Jcp.org |date= |accessdate=2013-07-04}}</ref>
|-
! [[JikesRVM]]
| [[Stack machine|stack]]
| automatic
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{dunno}}
| {{yes}}
| {{yes}}
|-
! [[LLVM]]
| [[Register machine|register]]
| manual
|
|
|
|
|
| {{yes}}
| {{no}}
|-
! [[Mono (software)|Mono]]
| [[Stack machine|stack]]
| automatic or manual
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
|-
! [[Parrot virtual machine|Parrot]]
| [[Register machine|register]]
| automatic
|
|
| {{no}}<ref>{{cite web|url=http://trac.parrot.org/parrot/wiki/JITRewrite |title=JITRewrite – Parrot |publisher=Trac.parrot.org |date= |accessdate=2013-07-04}}</ref>
|
|
| {{yes}}
| {{yes}}
|-
! [[Dalvik virtual machine|Dalvik]]
| [[Register machine|register]]
| automatic
| {{yes}}
| {{yes}}
| {{yes}}
| {{no}}
| {{dunno}}
| {{no}}
| {{no}}
|-
! [[Squeak]]
| [[Stack machine|stack]]
| automatic
| {{no}}
| {{yes}}
| {{yes}}
| {{no}}
| {{yes}}
| {{no}}
| {{yes}}
|-
! [[BEAM (Erlang virtual machine)|BEAM]] ([[Erlang (programming language)|Erlang]])
| [[Register machine|register]]
| automatic
| {{dunno}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
|-
! [[MoarVM]]
| [[Register machine|register]]
| automatic
| {{dunno}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
| {{yes}}
|}
Virtual machine instructions process data in local variables using a main
An
''[[Just-in-time compilation]]''
==Comparison of application virtual machine implementations==
In addition to the portable virtual machines described above, virtual machines are often used as an execution model for individual scripting languages, usually by an interpreter. This table lists specific virtual machine implementations, both of the above portable virtual machines, and of scripting language
{| class="wikitable sortable"
|-
! [[Virtual machine]]
! [[Programming language|Languages]] executed
! Comments
! [[Interpreter (computing)|Interpreter]]
! [[Just-in-time compilation|JIT]]
! Implementation language
! [[Source lines of code|SLoC]]
|-
![[BEAM (Erlang virtual machine)|BEAM]]
|[[Erlang (programming language)|Erlang]], [[Elixir (programming language)|Elixir]], [[Gleam (programming language)|Gleam]], [[Cuneiform (programming language)|Cuneiform]], [[LFE (programming language)|LFE]], Clojerl, Luerl
|
| {{yes}}<ref>{{cite web | title=A closer look at the interpreter - Erlang/OTP | url=https://www.erlang.org/blog/a-closer-look-at-the-interpreter/ }}</ref>
| {{yes}}<ref>{{cite web | title=A first look at the JIT - Erlang/OTP | url=https://www.erlang.org/blog/a-first-look-at-the-jit/ }}</ref>
|Erlang, C, C++
|1561k including [[Open Telecom Platform|OTP]]
|-
! [[Common Language Runtime]] (CLR)
| [[C Sharp (programming language)|C#]], [[C++/CLI]], [[F Sharp (programming language)|F#]], [[Visual Basic (.NET)|VB.NET]]
| bytecode is [[Common Intermediate Language|CIL]]; [[.NET]] Core Runtime on GitHub
| {{no}}
| {{yes}}
| C#, C++
|
|-
! [[Adobe Flash Player]] (aka [[Tamarin (software)|Tamarin]])
| [[ActionScript]], [[SWF]] (file format)
| interactive web authoring tool; bytecode is named ''ActionScript Byte Code (.abc)''
| {{yes}}
| {{yes}}
| C++
| 135k (initially released)
|-
! [[Dis virtual machine|Dis]] ([[Inferno (operating system)|Inferno]])
| [[Limbo (programming language)|Limbo]]
| Dis Virtual Machine Specification
| {{yes}}
| {{yes}}
| C
| 15k + 2850 per JIT arch + 500 per host OS
|-
! [[DotGNU]]-Portable.NET
| [[
| Common Language Runtime clone
| {{no}}
| {{yes}}
| C, C#
|
|-
! [[Forth
| [[Forth (programming language)|Forth]]
| Features are simplified, usually include assembler, compiler, text-level and binary-level interpreters, sometimes editor, debugger and OS; compile speed is >20 SKLOC/S, behaves much like JIT.
| {{yes}}
| {{no}}
| Forth, Forth Assembler
| 2.8K to 5.6K; advanced, professional implementations are smaller.
|-
! [[Glulx]]
| Inform 6, Inform 7, others
|
|{{yes}}
|{{no}}
| Various implementations exist
|
|-
|-
! [[HHVM]]
| [[
| Is an open-source virtual machine designed for executing programs written in Hack and PHP.
| {{yes}}
| {{yes}}
| C++, OCaml
|
|-
! [[
| [[Java (programming language)|Java]], [[Kotlin (programming language)|Kotlin]], [[Jython]], [[Groovy (programming language)|Groovy]], [[JRuby]], [[C (programming language)|C]], [[C++]], [[Clojure]], [[Scala (programming language)|Scala]] and several others
| [[Java virtual machine|JVM]] reference implementation by Sun; [[OpenJDK]]: code under [[GPL]]; [[IcedTea]]: code and tools under [[GPL]]
| {{yes}}
| {{yes}}
| [[JDK]], [[OpenJDK]] & [[IcedTea]] with regular JIT : Java, C, C++, ASM ; [[IcedTea]] with the "Zero" JIT : Java, C, C++
| HotSpot is around 6500k lines; [[Technology Compatibility Kit|TCK]] is 80k tests and around 1000k lines
|-
! [[Icon (programming language)|Icon]]
| Icon
| Base source code provides both the interpreter as well as an unsupported compile-to-C version. The runtime code, that is shared between the compiler and the interpreter, is written in a variant of C called RTT.
|{{yes}}
|{{no}}
|C, RTT (a custom front-end to C, provided with the base source for Icon).
| ~180k total. (source to bytecode: ~11k, bytecode interpreter: ~46k, iconc: ~23k, common/headers: ~13k, rtt: ~15k)
|-
! [[LLVM]]
| [[C (programming language)|C]], [[C++]], [[Kotlin (programming language)|Kotlin]], [[Objective-C]], [[Swift (programming language)|Swift]], [[Ada (programming language)|Ada]], [[Fortran]], and [[Rust (programming language)|Rust]]
| MSIL, C and C++ output are supported. ActionScript Byte Code output is supported by Adobe Alchemy. bytecode is named "LLVM Bytecode (.bc)". assembly is named "LLVM Assembly Language (*.ll)".
| {{yes}}
| {{yes}}
| C++
| 811k <ref name="ohloh-llvm">[http://www.ohloh.net/p/llvm The LLVM Compiler Infrastructure] {{Webarchive|url=https://web.archive.org/web/20120731043158/http://www.ohloh.net/p/llvm |date=2012-07-31}}, ohloh.net, 2011 November 30</ref>
|-
! [[Lua (programming language)|Lua]]
| Lua
|
| {{yes}}
| LuaJIT
| C
| 13k + 7k LuaJIT
|-
! [[MMIX]]
| MMIXAL
|
|
|
|
|
|-
! [[Mono (software)|Mono]]
| [[List of CLI languages|CLI languages]] including: [[C Sharp (programming language)|C#]], [[Visual Basic (.NET)|VB.NET]], [[IronPython]], [[IronRuby]], and others
| Common Language Runtime clone
| {{yes}}
| {{yes}}
| C#, C
| 2332k
|-
! [[NekoVM]]
| currently [[NekoVM|Neko]] and [[Haxe]]
|
| {{yes}}
| x86 only
| C
| 46k
|-
! [[Oz (programming language)|Oz]]
| Oz, [[Alice (programming language)|Alice]]
|
|
|
|
|
|-
! [[O-code machine]]
| [[BCPL]]
|
|
|
|
|
|-
! [[p-code machine]]
| [[Pascal (programming language)|Pascal]]
| UCSD Pascal, widespread in late 70s including Apple II
|{{yes}}
|{{no}}
|assembly, Pascal
|
|-
! [[Parrot virtual machine|Parrot]]
| [[Perl#2000–present|Perl 5]], [[Raku (programming language)|Raku]], NQP-rx, [[Parrot intermediary language|PIR]], [[Parrot assembly language|PASM]], [[bytecode|PBC]], [[BASIC]], [[bc (programming language)|bc]], [[C99]], [[ECMAScript]], [[Lisp (programming language)|Lisp]], [[Lua (programming language)|Lua]], [[GNU m4|m4]], [[Tcl]], [[WMLScript]], [[Simple API for XML#XML processing with SAX|XML]], and others
|
| {{yes}}
| {{yes}}
| C, Perl
| 111k C, 240k Perl
|-
! [[
| [[Perl]]
| [[op-code]] tree walker
| {{yes}}
| {{no}}
| C, Perl
| 175k C, 9k Perl
|-
! [[CPython]]
| [[Python (programming language)|Python]]
|
| {{yes}}
| {{ubl|[[Psyco]]|[[Unladen Swallow]]}}
| C
| 387k C, 368k Python, 10k ASM, 31k Psyco
|-
! [[
| [[Python (programming language)|Python]]
| [[Self-hosting (compilers)|Self-hosting]] implementation of Python, next generation of [[Psyco]]
| {{yes}}
| {{yes}}
| Python
|
|-
! [[Rubinius]]
| [[Ruby (programming language)|Ruby]]
| Virtual machine for another Ruby implementation
| {{yes}}
| {{yes}}
| C++, Ruby
|
|-
! [[Silverlight]]
| [[C Sharp (programming language)|C#]], [[Visual Basic (.NET)|VB.NET]]
| Micro-version of Microsoft [[.NET Framework]] to let applications run sandboxed inside browser
| {{yes}}
| {{yes}}
| C++
| 7MB (first release)
|-
! [[ScummVM]]
| [[Scumm]]
|
|
|
|
|
|-
! [[SECD machine|SECD]]
| [[ISWIM]], [[Lispkit Lisp]]
|
|
|
|
|
|-
! [[Squirrel (programming language)|Squirrel]]
| Squirrel
|
| {{yes}}
| Squirrel_JIT
| C++
| 12k
|-
! [[Smalltalk
|
|
|
|
|
|
|-
! [[SQLite
|
|
|
|
|
|
|-
! [[Squeak
| Squeak [[
| [[Self-hosting (compilers)|Self hosting]] implementation of Squeak virtual machine. Rich multi-media support.
| {{yes}}
| {{yes|Cog & Exupery}}
| Smalltalk/Slang
| 110k Smalltalk, ~300K C
|-
![[SWI-Prolog]]
|Prolog: [[SWI-Prolog]], [[YAP (Prolog)|YAP]]
|
| {{yes}}
| {{no}}
| C, SWI-Prolog
|
|-
! [[TraceMonkey]]
| JavaScript
| Based on [[Tamarin (software)|Tamarin]]
| {{no}}
| {{yes}}
| C++
| 173k
|-
! [[TrueType
| [[TrueType#Hinting language|TrueType]]
|
| {{yes}}
| {{no}}
| C (typically)
|
|-
! [[Valgrind]]
| [[x86]]/[[x86
|
|
|
| C
| 467k <ref name="ohloh-valgrind">[http://www.ohloh.net/p/valgrind Valgrind], ohloh.net, 2011 Nov 30.</ref>
|-
! [[VisualWorks]]
| [[Smalltalk]]
|
| {{no}}
| {{yes}}
| C
|
|-
! [[
| [[x86]] binaries
| Application-level virtualization for native code
| {{no}}
| {{yes}}
|
|
|-
! [[
|
| Virtual machine for small devices, similar to [[Java (programming language)|Java]]
|
|
|
|
|-
!
| [[Ruby (programming language)|Ruby]]
|
|{{yes}}
|{{yes}}
|C
|
|-
! [[Z-machine]]
|
|
|
|
|
|
|-
Line 208 ⟶ 510:
| [[PHP]]
|
| {{yes}}
| {{no}}
| C
| 75k
|}
==See also==
{{div col}}
* [[Application virtualization]]
* [[Language binding]]
* [[Foreign function interface]]
* [[Calling convention]]
* [[Name mangling]]
* [[Application programming interface]] (API)
* [[Application binary interface]] (ABI)
* [[Comparison of platform virtualization software]]
* [[Comparison of Java virtual machines]]
* [[List of Java virtual machines]]
* [[List of ECMAScript engines]]
* [[List of application servers]]
* [[WebAssembly]]
{{div col end}}
==References==
{{Reflist}}
[[Category:Software comparisons|application virtualization software]]
[[Category:Virtualization software| ]]
[[pt:Comparação entre aplicações de virtualização de máquinas]]
|