Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

HHVM

From Wikipedia, the free encyclopedia
Process virtual machine developed by Meta

HHVM
HHVM logo, featuring white uppercase "HHVM" letters on a black background, with stylized triangular geometric shapes on the left
DeveloperMeta Platforms
Initial releaseDecember 9, 2011; 14 years ago (2011-12-09)[1]
Stable release
3.15.0[2] Edit this on Wikidata / 28 September 2016; 9 years ago (28 September 2016)
Written inPHP,C++,[3]OCaml[4][a] andRust[5]
LicensePHP License andZend License[6]
Websitehhvm.comEdit this at Wikidata
Repository

HipHop Virtual Machine (HHVM) is anopen-source virtual machine based onjust-in-time (JIT) compilation that serves as an execution engine for theHack programming language. By using the principle of JIT compilation, Hack code is first transformed into intermediateHipHop bytecode (HHBC), which is then dynamically translated intox86-64machine code, optimized, and natively executed.[7][8] This contrasts with PHP's usualinterpreted execution, in which theZend Engine transforms PHPsource code intoopcodes that serve as a form ofbytecode, and executes the opcodes directly on the Zend Engine's virtualCPU.[9]

HHVM is developed byMeta, with the project's source code hosted onGitHub;[10] it is licensed under the terms of thePHP License andZend License.[1][6]

Overview

[edit]

HHVM was created as the successor to theHipHop for PHP (HPHPc) PHP execution engine, which is a PHP-to-C++transpiler also created by Facebook.[11][12] Based on the gained experience and aiming to solve issues introduced by HPHPc, Meta decided in early 2010 to create a JIT-based PHPvirtual machine. Issues associated with HPHPc included reaching aplateau for further performance improvements, a fundamental inability to support all features of the PHP language, and difficulties arising from specific time- and resource-consuming development and deployment processes.[11] In Q1 2013, the production version of the facebook.com website stopped using HPHPc and switched to HHVM.

Following the JIT compilation principle, HHVM first converts the executed code into anintermediate language, the high-levelbytecode HHBC. HHBC is a bytecode format created specifically for HHVM, appropriate for consumption by bothinterpreters and just-in-time compilers. Next, HHVM dynamically ("just-in-time") translates the HHBC into x86-64 machine code,optimized through dynamic analysis of the translated bytecode. Finally, it executes the x86-64 machine code.[1][11][13] As a result, HHVM has certain similarities to the virtual machines used by other programming languages, including theCommon Language Runtime (CLR, for theC# language) andJava virtual machine (JVM, for theJava language).

HHVM brings many benefits in comparison with HPHPc. HHVM uses the same execution engine when deployed in both production and development environments, while supporting integration between the execution engine and theHPHPddebugger in both environment types; as a result, maintainingHPHPi (HipHop interpreter) separately as a development utility is no longer needed as it was the case with HPHPc. HHVM also eliminates the lengthybuilds required by HPHPc to run programs, resulting in much simpler development and deployment processes than it was the case with HPHPc.[1] Finally, versions of HHVM before 4.0 have almost complete support for the entire PHP language (as defined by the official implementation of PHP version 5.4), including the support for thecreate_function() andeval() constructs, which was impossible with HPHPc.[14][15]

Together with HHVM 3.0,[16] Meta also releasedHack, a derivative of PHP[17][18] that allows programmers to use bothdynamic typing andstatic typing (a concept also known asgradual typing), and allowstypes to be specified forfunctionarguments, functionreturn values, andclass properties. However, Hack does not provide completebackward compatibility since it removes several PHP features, such as thegoto statement and dynamicvariable names.[19][20][21][22]

In September 2017, it was announced that version 3.30 would be the last version of HHVM to officially support PHP, and that HHVM will only support Hack going forward.[23] This was due to differences and incompatibilities in PHP 7.[24] HHVM 4.0, released in February 2019, was the first version without support for PHP.[25]

Performance

[edit]

As a process virtual machine that provides the execution environment, HHVM has the ability to use live type information to produce more efficientnative code, leading to a higher web serverthroughput and lowerlatency. In Q4 2012, the execution of facebook.com'ssource code on HHVM achieved performance parity with HPHPc,[11] and in December 2013 HPHPc was even surpassed by around 15%.[26]

See also

[edit]

Notes

[edit]
  1. ^Only theHack'stype-checking (hh_server andhh_client) and code-formatting (hh_format)command-line utilities anddaemons bundled together with the HipHop Virtual Machine are written inOCaml.

References

[edit]
  1. ^abcdJason Evans (December 9, 2011)."The HipHop Virtual Machine".Meta Platforms. RetrievedAugust 2, 2014.
  2. ^"Release 3.15.0". September 28, 2016. RetrievedMarch 13, 2018.
  3. ^"Building and installing HHVM on CentOS 7.x".github.com.Meta Platforms. May 26, 2015. RetrievedJune 12, 2015.
  4. ^"Building the Hack typechecker".github.com. Meta. September 10, 2014. RetrievedJune 12, 2015.
  5. ^"Facebook's HHVM Begins Seeing Rust Rewrite - Phoronix". RetrievedAugust 29, 2019.
  6. ^ab"facebook/hhvm: License".github.com.Facebook, Inc. RetrievedAugust 2, 2014.
  7. ^Ottoni, Guilherme (June 20, 2018)."HHVM JIT: A Profile-Guided, Region-Based Compiler for PHP and Hack".Proceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI).ACM. pp. 151–165.
  8. ^"facebook/hhvm".github.com. Meta Platforms. RetrievedAugust 2, 2014.
  9. ^Kaushik Pal (April 28, 2014)."PHP and Zend Engine Internals".phpbuilder.com. Archived fromthe original on September 15, 2014. RetrievedSeptember 23, 2014.
  10. ^HHVM source code on GitHub
  11. ^abcdDrew Paroski (November 29, 2012)."Speeding up PHP-based development with HHVM".Meta Platforms. RetrievedAugust 2, 2014.
  12. ^"Announcement on GitHub removing HPHPc support".github.com.Meta Platforms. February 19, 2013. RetrievedMay 24, 2013.
  13. ^"HipHop Bytecode v1 revision 18".github.com.Meta Platforms. July 31, 2014. RetrievedMay 24, 2013.
  14. ^"facebook/hhvm: About upgrade to PHP 5.4 engine".github.com. May 2013. RetrievedAugust 2, 2014.
  15. ^"facebook/hhvm: Home".github.com.Meta Platforms. May 8, 2014. RetrievedAugust 2, 2014.
  16. ^Paul Tarjan (March 28, 2014)."HHVM 3.0.0".Facebook. RetrievedDecember 26, 2022.
  17. ^Cade Metz (March 20, 2014)."Facebook Introduces 'Hack,' the Programming Language of the Future".Wired. RetrievedApril 15, 2014.
  18. ^Julien Verlaguet; Alok Menghrajani (April 2014)."Hack: a new programming language for HHVM".code.facebook.com.Facebook. RetrievedMarch 23, 2014.
  19. ^Josh Lockhart (April 3, 2014)."Facebook's Hack, HHVM, and the future of PHP".O'Reilly Media. RetrievedAugust 2, 2014.
  20. ^"Hack and HHVM: Type Annotations (Hack Manual)".docs.hhvm.com. RetrievedMarch 25, 2014.
  21. ^"Hack and HHVM: Type Inference (Hack Manual)".docs.hhvm.com. Archived fromthe original on March 26, 2014. RetrievedMarch 25, 2014.
  22. ^"Hack and HHVM: Unsupported PHP Features in Hack (Hack Manual)".docs.hhvm.com. Archived fromthe original on November 4, 2015. RetrievedApril 2, 2014.
  23. ^Fred Emmott (September 12, 2018)."Ending PHP Support, and The Future Of Hack". RetrievedDecember 26, 2022.
  24. ^Krill, Paul (September 20, 2017)."Forget PHP! Facebook's HHVM engine switches to Hack instead".InfoWorld. RetrievedFebruary 6, 2019.
  25. ^Fred Emmott (February 11, 2019)."HHVM 4.0.0". RetrievedDecember 26, 2022.
  26. ^"We are the 98.5% (and the 16%)".hhvm.com. December 19, 2013. RetrievedAugust 2, 2014.

External links

[edit]


People
Resources
Implementations
Web frameworks
Testing
ORMs
IDEs
Widget toolkit
Retrieved from "https://en.wikipedia.org/w/index.php?title=HHVM&oldid=1328911360"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp