language stringlengths 0 24 | filename stringlengths 9 214 | code stringlengths 99 9.93M |
|---|---|---|
Text | hhvm/hphp/CMakeLists.txt | #
# +----------------------------------------------------------------------+
# | HipHop for PHP |
# +----------------------------------------------------------------------+
# | Copyright (c) 2010 Facebook, Inc. (http://www.facebook.com) |
# | Copy... |
hhvm/hphp/dune | ;; Only hack (with actual ocaml code) and hsl (with some php files Hack needs)
;; are relevant to the OSS ocaml build of Hack. Ban all other directories
(data_only_dirs
bin
compiler
doc
facebook
hhbbc
hhvm
neo
public_autocargo
public_tld
runtime
system
test
tools
util
vixl
zend
) | |
hhvm/hphp/hack.typechecker.code-workspace | {
/*
* TS 2019-12-16 - This file is for UX testing for vs code workspace functionality.
* For questions please contact Ted Spence or Omar Tawfik
*/
"folders": [
{
"name": "hack",
"uri": "./hack"
}
],
"tasks": {
"version": "2.0.0",
"tasks": [
{
"label": "Build hack",
... | |
Text | hhvm/hphp/compiler/CMakeLists.txt | set(SOURCE_SUBDIRS expression statement analysis system util parser)
set(CXX_SOURCES)
auto_sources(files "*.cpp" "${SOURCE_SUBDIRS}")
list(APPEND CXX_SOURCES ${files})
set(C_SOURCES)
auto_sources(files "*.c" "${SOURCE_SUBDIRS}")
list(APPEND C_SOURCES ${files})
set(HEADER_SOURCES)
auto_sources(files "*.h" "{$SOURCE_S... |
C++ | hhvm/hphp/compiler/compiler.cpp | /*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) |
+---------... |
C/C++ | hhvm/hphp/compiler/compiler.h | /*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) |
+---------... |
C++ | hhvm/hphp/compiler/decl-provider.cpp | /*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) |
+---------... |
C/C++ | hhvm/hphp/compiler/decl-provider.h | /*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) |
+---------... |
C++ | hhvm/hphp/compiler/option.cpp | /*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) |
+---------... |
C/C++ | hhvm/hphp/compiler/option.h | /*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) |
+---------... |
C++ | hhvm/hphp/compiler/package.cpp | /*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) |
+---------... |
C/C++ | hhvm/hphp/compiler/package.h | /*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) |
+---------... |
hhvm/hphp/doc/bytecode.specification | **********************************
* HipHop Bytecode v1 revision 18 *
**********************************
Introduction
------------
HipHop bytecode (HHBC) v1 is intended to serve as the conceptual basis for
encoding the semantic meaning of HipHop source code into a format that is
appropriate for consumption by interp... | |
Markdown | hhvm/hphp/doc/coding-conventions.md | HHVM Coding Conventions
=======================
This document is meant to serve as a guide to writing C++ in the HHVM codebase,
covering when and how to use various language features as well as how code
should be formatted. Our goal is to ensure a consistently high-quality codebase
that is easy to read and contribute ... |
hhvm/hphp/doc/command.admin_server | <h2>Admin Server URL Commands</h2>
When running a compiled program as an HTTP server, by default it runs an
admin server on a specified port. One can send an HTTP request to this port
to perform certain actions. To list all possible commands:
GET http://localhost:8088
A particular command is like:
GET http://lo... | |
hhvm/hphp/doc/command.compiled | <h2>Compiled Program's Command Line Options</h2>
= --help
Displays the list of command line options with short descriptions.
= -m, --mode
Specifies one of these execution modes,
run: (default) directly executes the program from command line.
debug: starts debugger.
server: starts an HTTP server from command line.
... | |
hhvm/hphp/doc/command.compiler | <h2>Compiler Command Line Options</h2>
= --help
Displays the list of command line options with short descriptions.
= -t, --target=TARGET
This sets the mode of operation for hphp. TARGET is one of <b>hhbc</b>,
<b>filecache</b>, and <b>run</b> (default).
hhbc: runs analysis on the input files and generates a repo as... | |
hhvm/hphp/doc/debug.gdb | <h2>Useful gdb Commands</h2>
info threads
thread apply [threadno] [all] args
set follow-fork-mode parent
set detach-on-fork on
set print pretty
handle SIGPIPE nostop noprint pass
dump binary memory [filename] [start_addr] [end_addr]
symbol-file [un-stripped binary OR symbol file from strip]
= b main.... | |
hhvm/hphp/doc/debug.linux | <h2>Useful Linux Commands</h2>
1. Who's listening on port 80?
sudo lsof -t -i :80
2. Who's talking to a remote port 11300?
netstat -pal | grep 11300
3. Incoming web requests
ngrep -q "POST|GET"
ngrep -q "POST|GET" | egrep "(POST|GET) /"
4. Incoming and outgoing web traffic
tcpdump "port 80" -X -s 1024... | |
hhvm/hphp/doc/debug.mutex | <h2>Debugging Excessive Mutex</h2>
1. Turn on mutex stats
Hit admin port with /stats-mutex to turn on mutex stats:
GET http://localhost:8088/stats-mutex
2. Query mutex stats
Get mutex stats like this,
GET "http://localhost:8088/stats.kvp?keys=:mutex.*:"
3. Pre-written script
Or, run bin/ report stats,
... | |
hhvm/hphp/doc/debug.profile | <h2>Using Google CPU Profiler</h2>
Building with GOOGLE_CPU_PROFILER set lets you collect profiles from
the server or from the command line. However, our testing has found
that the server can get stalled while profiling for reasons
unknown. Still, it's possible to get enough requests in that the
profile can be signifi... | |
hhvm/hphp/doc/debug.server | <h2>How to Debug Server Problems</h2>
1. Crashing and other memory problems
Normally a crash generates /tmp/stacktrace.<pid>.log file that has stacktrace
where crash happens. Sometimes, a crash can happen badly without giving crash
log a chance to generate a readable stack. Then use ResourceLimit.CoreFileSize
to turn... | |
hhvm/hphp/doc/debugger.cmds | -------------------------- Session Commands --------------------------
[m]achine connects to an HPHPi server
[t]hread switches between different threads
[q]uit quits debugger
------------------------ Program Flow Control ------------------------
[b]reak ... | |
hhvm/hphp/doc/debugger.devdocs | This document is intended to help developers understand how HHVM
debugging is implemented. For user documentation, see
docs/debugger.start.
1. Overview
-----------
HHVM provides a rich set of debugging services as well as a
command-line debugger client. The client and server (VM) can be on the
same or different machi... | |
hhvm/hphp/doc/debugger.refs | --------------------------- Abort Command ---------------------------
[a]bort aborts current PHP code input
You will have to type this command on a new line, while you're typing
ad-hoc PHP code to evaluate. In other words, it only works when you see
continuation prompt like ">>>>".
-----------... | |
hhvm/hphp/doc/debugger.start | ------------------- Getting Started with Debugger -------------------
1. Quick Overview
(1) from A to Z
All built-in debugger commands are un-ambiguous with their first
letters. Therefore, a single letter is sufficient to issue the command.
(2) tab, tab, tab
Use TAB to auto-complete.
(3) input PHP code
For sing... | |
hhvm/hphp/doc/extension.new_functions | <h2>New Extension Functions</h2>
Warning, these functions are not ported to PHP yet. Do NOT use them if the code
is intended to run with PHP as well, unless guarded with function_exists()
testing and some alternative PHP implementation.
- hphp_crash_log
- hphp_stats
- hphp_get_stats
- hphp_output_global_state
- hphp_... | |
hhvm/hphp/doc/extension.type_hints | <h2>Richer type hints</h2>
HipHop extends the support of type hints to primitive types, like bool, int, and
double. It also supports string for type hints.
For example, the following code would only allow passing an integer to the
function foo():
function foo(int $a) {
return $a + 1;
}
The main purposes for... | |
hhvm/hphp/doc/extension.yield | <h2>yield and generator</h2>
HipHop extends PHP to include Python and C#-style generators. If you're
unfamiliar with the concept, see
[[http://docs.python.org/tutorial/classes.html#generators | the Python docs]].
As in Python, the <i>yield</i> keyword marks the enclosing function as a
generator:
function foo() {
... | |
hhvm/hphp/doc/fuzzer | The fuzzer is an automating testing tool for exposing holes in the HHVM verifier
by generating random .hhas files from existing well-formed inputs. Specifics of
how the fuzzer works can be found at https://fburl.com/gc516ctu.
Currently the fuzzer supports eight kinds of mutations to HHAS programs:
* Changing instructi... | |
Perl | hhvm/hphp/doc/generate-ir-opcodes.pl | #!/usr/bin/perl -w
use strict;
my $buffer = '';
my $output_buffer = '';
sub process_buffer {
$buffer =~ s/^\s*//g;
$buffer =~ s/\s+/ /g;
$buffer =~ s/^\s*([a-zA-Z0-9]+)<[^>]+>/$1/g;
$output_buffer .= 'O(';
$output_buffer .= $buffer.") \\\n";
$buffer = '';
}
while (<>) {
if ($buffer && !/^... |
Shell Script | hhvm/hphp/doc/generate-ir-opcodes.sh | #!/bin/bash
function die {
echo $1 1>&2
exit 1
}
# This fallback is for the cmake build, which won't have an INSTALL_DIR
# environment variable, and runs this from the runtime subdir.
if [ x"$INSTALL_DIR" = x"" ] ; then
cd "$(dirname "$(which "$0")")" || die "Can't find script dir for $0" 1>&2
INSTALL_DIR... |
hhvm/hphp/doc/hdf | <h2>Hierarchical Data Format (HDF)</h2>
Please use bin/hdf.el for syntax coloring that can help identify syntax errors.
1. Basic format
[node] = [value]
Where, [node] can be an alphanumeric name, and [value] can be
- booleans: true, false, on, off, yes, no, 1, 0
- numbers
- strings: without any quoting
2. Hier... | |
hhvm/hphp/doc/hhprof | HHVM's HHProf feature provides memory heap profiling based on optional jemalloc
functionality. For HHProf to function, jemalloc must be built with
--enable-prof, and HHVM must be built with USE_JEMALLOC and ENABLE_HHPROF.
HHProf configuration is controlled in part by the following boolean runtime
configuration option... | |
Markdown | hhvm/hphp/doc/ini.md | # Using ini
ini usage in HHVM is fairly similar to that of php-src, albeit currently with
some limitations and enhancements. For example, HHVM currently doesn't support
per-dir ini settings (support coming soon), but it does support vector-based
settings and wildcards for copying and symlinking values from other setti... |
hhvm/hphp/doc/ir.specification | *******************************************
* HipHop Intermediate Representation (HHIR)
*******************************************
Introduction
------------
The HipHop Intermediate Representation (IR) is a typed, in-memory,
static-single-assignment, intermediate-level representation of HHBC programs
used for just ... | |
hhvm/hphp/doc/limitations | <h2>Known Limitations</h2>
1. If using the PHP setlocale function, because it is implemented in terms of
setlocale(3), it is process-wide and will affect all requests as well as, for
example, internal logging. One way to mitigate the effect is to call
setlocale(LC_ALL, "C"); at the end of a request to restore the defa... | |
hhvm/hphp/doc/Makefile | help:
@echo "'make daemon' to start up doc server daemon"
@echo "'make server' to start up doc server"
@echo "'make clobber' to clean up directory"
daemon:
sudo ../hhvm/hhvm -m daemon -v "Server.DefaultDocument=index.php" -v "Server.SourceRoot=`pwd`"
server:
sudo ../hhvm/hhvm -m server -v "Server.DefaultDocument... | |
Hierarchical Data Format | hhvm/hphp/doc/mime.hdf | StaticFile {
Extensions {
ai = application/postscript
aif = audio/x-aiff
aifc = audio/x-aiff
aiff = audio/x-aiff
asc = text/plain
atom = application/atom+xml
au = audio/basic
avi = video/x-msvideo
bcpio = application/x-bcpio
bin = application/octet-stream
bmp = image/bmp
... |
hhvm/hphp/doc/options.compiled | <h2>Configurable Options for Compiled Program</h2>
Note that, in this documentation, we used "*" for names that the system doesn't
care. In reality, one may always use a string or a name to better describe a
node's purpose. Listed values are defaults, unless examples.
= Logging
Log {
Level = None (default) | E... | |
hhvm/hphp/doc/options.compiler | <h2>Configurable Options for Compiler</h2>
Compiler has a --config option to take a configuration file in HDF format, and
it has a --config-value to take ad-hoc configurable options in HDF format.
This documentation describes what's available for both of them.
When in doubt, look for how these options are parsed in c... | |
hhvm/hphp/doc/printir_json_schema.ts | type BlockId = number; // unsigned int
type CounterName = string; // uncertain of format
type DisasmString = string; // uncertain of format
type ExtraString = string; // uncertain of format
type FileName = string; //uncertain of format
type FuncName = string; // uncertain of format
type FuncString = string; // uncertai... | |
hhvm/hphp/doc/server.documents | <h2>Server Documents</h2>
This flow is implemented in hphp/runtime/server/http-server.cpp:
+-------------+
| APC Priming |
+------+------+
|
V
... | |
hhvm/hphp/doc/server.rewrite_rules | <h2>Server Rewrite Rules</h2>
Here's how server processes a URL.
1. Virtual Host
Determine which virtual host the URL is on. This is done by matching virtual
host's "Prefix" or "Pattern" with this URL's domain name.
2. Path Translation
Prepend with virtual host's PathTranslation.
3. Physical Location
If the URL/... | |
hhvm/hphp/doc/server.rpc_server | <h2> How to execute a PHP function over network</h2>
1. Parameters
When RPC server is turned on, HipHop server will listen on a port that takes
RPC requests in a format like this,
http://[server]:[port]/function_name?params=...
"params" needs to be a JSON encoded array. The server will execute the function
and re... | |
hhvm/hphp/doc/server.ssl | <h2>SSL Server Setup</h2>
1. Prepare Certificates
Prepare two files: one certificate file and one key file. Make sure they are
readable by the user account that runs web server.
2. Configuration Change
Prepare configurations like this,
Server {
EnableSSL = true
SSLPort = 443
SSLCertificateFile = /ful... | |
hhvm/hphp/doc/server.stats | <h2>Server Stats</h2>
HHVM collects stats by time slots. Each time slot is configured as
StatsSlotDuration seconds and server internally keeps StatsMaxSlot number
of slots. Inside each slot, we keep a set of stats. These stats include
one built-in ("hit") and many key-value pairs defined by different parts
of the syst... | |
hhvm/hphp/doc/server.status | <h2>Server Status</h2>
Server status displays current running status of server process and each worker
thread. To query status, hit admin port with a URL like this,
http://[server]:8088/status.[xml|json|html]
The format is,
[process]
[id]
[build]
...
[threads]
[thread]
[id]
... | |
hhvm/hphp/doc/style.css | a:link { color: navy; }
a:visited { color: navy; }
a:active { color: #FF6600; }
a:hover { color: #FF6600; }
body, th, td {
border: 0px solid #bdc7d8;
font-size: 13px;
font-family: "lucida grande", tahoma, verdana, arial, sans-serif
}
b {
color: maroon
}
p {
line-height: 1.6em;
mar... | |
hhvm/hphp/doc/tcdump_json_schema.ts | // Thin types
type ArchNameStr = string; // uncertain of format
type BCInstrStr = string; // uncertain of format
type BinaryStr = string; // uncertain of format, may be arch-dependent
type BlockId = number; // unsigned int
type CallDestStr = string; // uncertain of format
type CodeStr = string; /... | |
hhvm/hphp/doc/threading | <h2> Multi-Tasking and Multi-Threading Support</h2>
To perform parallel execution in PHP without forking a new process, you may
take advantage of one of these new facilities:
1. Pagelet Server
The pagelet server is similar to a CURL call to localhost. Look for "Pagelet
Server" in compiled program's options for how t... | |
hhvm/hphp/doc/tracepoints | User-space defined tracepoints (USDTs) in HHVM.
Tracepoints are implemented with FOLLY_SDT follow the naming
convention hhvm_{event}_{cause}. {event} describes what happened,
and {cause} describes what caused the event. Some tracepoints
may occur more than once in the source (due to implementation details)
or in the b... | |
hhvm/hphp/doc/tracing-graph.dot | digraph Tracing {
// top level
"http-request" -> {"autoload-ensure-updated", "invoke", "onShutdownPostSend"}
"cli-request" // need to look into why this isn't getting logged
// second level
"invoke" -> {"warmup", "dispatch", "enter-tc",
"shutdown-pre-send", "autoload", "autoload-native"}
"... | |
Markdown | hhvm/hphp/doc/hackers-guide/bytecode-interpreter.md | # The HHVM Bytecode Interpreter
A typical interpreter is implemented using a dispatch loop that looks something
like this:
```cpp
while (true) {
switch(*pc) {
case ADD:
/* add implementation */
pc++;
break;
case SUB:
/* sub implementation */
pc++;
break;
/*
* h... |
Markdown | hhvm/hphp/doc/hackers-guide/data-structures.md | # HHVM Runtime Data Structures
This page contains a brief overview of the most important runtime data
structures in HHVM. It is not meant to be an exhaustive reference for all
details about these data structures, since those details change too often to
reliably document so far away from the code. Rather, reading the d... |
Markdown | hhvm/hphp/doc/hackers-guide/directory-structure.md | ## Directory Structure
There are over 1000 C++ files in HHVM's codebase, split into a number of
different directories. This is a rough overview of what lives where (all paths are under `hphp/`):
`compiler/`: The old parser and bytecode emitter. This is deprecated and is currently being removed; the new replacement is... |
Markdown | hhvm/hphp/doc/hackers-guide/faq.md | # FAQ
This document contains answers to some of the most common questions we get from
people as they learn HHVM's codebase. Some of the answers may be pointers to
other pieces of documentation, if that information has a natural home somewhere
else.
## How is HHVM configured?
HHVM has a large number of configuration ... |
Markdown | hhvm/hphp/doc/hackers-guide/glossary.md | # Glossary
This document contains a list of terms, abbreviations, and acronyms that you may
come across either in this guide or in the HHVM source code. Don't worry if none
of the definitions mean anything to you yet; it may make more sense to revisit
this page as needed once you've read some more of the guide.
## HH... |
Markdown | hhvm/hphp/doc/hackers-guide/jit-core.md | # HHVM JIT
HHVM's just-in-time compiler module is responsible for translating sequences of
HipHop Bytecode ([HHBC](../bytecode.specification)) into equivalent sequences
of machine code. The code implementing the JIT lives in the namespace
`HPHP::jit`, in [hphp/runtime/vm/jit](../../runtime/vm/jit). Most file and
class... |
Markdown | hhvm/hphp/doc/hackers-guide/jit-optimizations.md | # HHVM JIT Optimization Passes
## Guard Relaxation
By default, every live program location read in a translation creates a type
guard. There are currently 10 different primitive types that can be guarded on,
so a translation with just 4 guards can have up to 10<sup>4</sup> unique
combinations of input types, leading ... |
Markdown | hhvm/hphp/doc/hackers-guide/memory-management.md | ## Memory management
### Reference counting
HHVM's user heap is managed primarily with reference counting. All types that
represent a user-visible value inherit from
[`HeapObject`](../../runtime/base/header-kind.h), which contains the value's
reference count, a `HeaderKind` that describes its type, some mark bits for... |
Markdown | hhvm/hphp/doc/hackers-guide/README.md | # Hacker's Guide to HHVM
This directory contains documentation on the internal architecture of HHVM,
targeted at C++ developers looking to hack on HHVM itself. If you're a
Hack developer looking for documentation on using HHVM, that can be found
[here](https://docs.hhvm.com/).
HHVM is a [virtual
machine](https://en.w... |
Markdown | hhvm/hphp/doc/hands-on/index.md | Welcome to HHVM! This section of our documentation is a hands-on guide for
people who want to learn about compiler and runtime internals. The goal is to
work through making, testing, and measuring a sample optimization to our
compiler. You'll make the most out of this guide if you work through the
exercises as you read... |
Markdown | hhvm/hphp/doc/hands-on/lesson0.md | # Lesson 0: Building and running HHVM
## Lesson goals
* Understand what HHVM is and what it can be used for
* Set up a devserver and build HHVM
* Run HHVM on a small standalone Hack file, and examine its output
---
## Step 0: Starting a build
Kick off the following steps before proceeding through the guide. They t... |
Markdown | hhvm/hphp/doc/hands-on/lesson1.md | # Lesson 1: Understanding Hack runtime types
## Lesson goals
* Learn about the most common user-visible types in Hack.
* See how HHVM uses a "TypedValue" to represent any Hack value.
* Modify the interpreter to treat "+" as the operator for string concatenation!
---
## Step 0: Pull, update, and re-compile HHVM
If ... |
Markdown | hhvm/hphp/doc/hands-on/lesson2.md | # Lesson 2: Understanding Hack bytecode
## Lesson goals:
* Learn how we evaluate Hack expressions using a stack machine.
* See how we implement operators, function calls, and array and object constructors in bytecode.
* Consider how alternative bytecode sequences could result in performance improvements.
* Write Hack... |
Markdown | hhvm/hphp/doc/hands-on/lesson3.md | ## Lesson goals:
* Explore a unique feature of the PHP and Hack languages: value-type strings and array-likes.
* Learn about how HHVM uses reference counting to efficiently implement value types and to reclaim memory.
* See how certain Hack bytecodes result in refcounting operations.
* See how HHVM uses an ahead-of-ti... |
Markdown | hhvm/hphp/doc/hands-on/lesson4.md | # Lesson 4: Making an IR optimization
## Lesson goals:
* Use profiling tools to find an optimization opportunity.
* Learn how to read printir tracing, the IR documentation, and JIT types.
* Improve IR generation to speed up casting collections (e.g. Vector) to arrays (e.g. vec).
* Move this code to "simplify", one of... |
hhvm/hphp/doc/historical/hack.lambda | Lambda expression syntax for Hack
=================================
The proposed "lambda syntax" feature is alternate syntax for creating closure
objects. The two main selling points of "lambda syntax" are:
(1) Lambda syntax is significantly more concise that traditional closure
syntax.
(2) When lambda sy... | |
hhvm/hphp/doc/historical/hack.shapes | Notes on the `shapes' feature in Hack:
Shapes in <?hh files are a way for us to add typechecking
incrementally to existing php code that uses php arrays somewhat like
structs.
For example, code like this:
<?php
function dot_product($a, $b) {
return $a['x'] * $b['x'] + $a['y'] * $b['y'];
}
Can be annotate... | |
hhvm/hphp/doc/historical/hack.typedefs | Notes on the typedef feature in Hack:
In HipHop, <?hh files allow a language extension to define new types
for use in typehinting. The syntax looks like this:
type MyInt = int;
type Point = (int, int);
Or
newtype AbstractInt = int;
This document is not a complete design rationale, but may address a
few ques... | |
hhvm/hphp/doc/historical/hack.types | ********************
* Type annotations *
********************
Introduction
------------
With the introduction of Hack, our runtime types have gradually become richer.
Some type annotation are currently enforced, others trigger warnings and some
are just ignored. Over time we will probably implement more consistent ... | |
Man Page | hhvm/hphp/doc/man/hhvm.1 | .TH HHVM 1
.SH NAME
hhvm \- Execute PHP and Hack files
.SH SYNOPSIS
.B hhvm
.RI [ OPTIONS ]
.RI [ \-f ]
.RI file
.RI [ [ \-\- ] args \.\.\. ]
.br
.B hhvm
.RI \-\-php
.RI [ PHP-OPTIONS ]
.RI [ \-f ]
.RI file
.RI [ [ \-\- ] args \.\.\. ]
.SH DESCRIPTION
.BR hhvm (1)
(aka the HipHop Virtual Machine) is an open-source v... |
Man Page | hhvm/hphp/doc/man/hphpize.1 | .TH HPHPIZE 1
.SH NAME
hphpize \- prepare an HHVM extension for compiling DSOs.
.SH SYNPOSIS
.B hphpize
.SH DESCRIPTION
.BR hphpize (1)
is a shell script to prepare an HHVM extension for compiling a dynamically
shared object (DSO).
.BR hphpize (1)
requires, at a minimum, a PHP|Hack|C++ extension and a
.B config\.cm... |
hhvm/hphp/hack/.gitignore | /.vscode/tasks.json
/facebook/cargo/.package-cache
/facebook/cargo/git
/facebook/cargo/registry/
bin/
src/inotify-1.0/
src/_build/
src/parsing/parser.output
src/parsing/lexer.ml
src/parsing/lexer_hack.ml
src/parsing/parser.ml
src/parsing/parser.mli
_obuild/
.ocp/
hhi/**/INDEX
facebook/redirect
facebook/opam2-mini-repos... | |
hhvm/hphp/hack/.ocamlformat | # -*- conf -*-
break-cases = all
break-fun-decl = smart
break-infix = fit-or-vertical
break-separators = after
break-sequences = true
break-string-literals = never
cases-exp-indent = 2
disambiguate-non-breaking-match = true
doc-comments = before
dock-collection-brackets = true
exp-grouping = preserve
field-space = tig... | |
Text | hhvm/hphp/hack/CMakeLists.txt | option(BUILD_HACK "True if we should build the Hack typechecker." ON)
include(CMakeParseArguments)
if (NOT BUILD_HACK)
message(STATUS "Skipping hack")
return()
endif()
message(STATUS "Building hack")
find_package(LZ4)
find_package(LibElf)
# native_libraries: values for `-l` flags
# lib_paths: values for `-L` f... |
hhvm/hphp/hack/configure | #!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/../../"
if [ "$1" = '--help' ] || [ "$1" = '-h' ]; then
echo "usage: $0 -Dvariable=argument ..."
echo ''
echo 'Variables: '
options=`cat $DIR/CMake/Options.cmake | grep option | sed -e 's/^[ \t]*//' |
sed 's/\s*option(/ -D/... | |
Inno Setup Script | hhvm/hphp/hack/dev_env.sh.in | # Copyright (c) 2019, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the "hack" directory of this source tree.
# This file is processed by cmake; the produced file is intended for both
# internal usage by the build system, and for direct usag... |
Inno Setup Script | hhvm/hphp/hack/dev_env_common.sh.in | #!/bin/sh
# Copyright (c) 2019, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the "hack" directory of this source tree.
# Do not use this file directly - either use dev_env.sh or dev_env_rust_only.sh
export CMAKE_SOURCE_DIR="@CMAKE_SOURCE_D... |
Inno Setup Script | hhvm/hphp/hack/dev_env_rust_only.sh.in | # Copyright (c) 2019, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the "hack" directory of this source tree.
# This file is processed by cmake; the produced file is intended for both
# internal usage by the build system, and for direct usag... |
hhvm/hphp/hack/dune | (data_only_dirs bin doc facebook man tools)
(alias
(name all-hack)
(deps
(alias_rec exe)
(alias_rec debug))) | |
hhvm/hphp/hack/LICENSE | MIT License
Copyright (c) 2013-present, Facebook, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, pu... | |
hhvm/hphp/hack/Makefile.dune | BYTECODE=
ROOT=$(shell pwd)
# Dune creates read-only files as of https://github.com/ocaml/dune/pull/3092
#
# We later copy these executables into the `bin/` dir; if we just use `cp`,
# this will only succeed once: a second build will fail as `cp` will refuse
# to overwrite files that do not have write permissions.
CO... | |
Shell Script | hhvm/hphp/hack/ocaml_deps_data.sh | #!/bin/bash
export OCAML_VERSION="4.14.0+options"
export HACK_OPAM_DEPS=(
base.v0.15.1
base64.3.5.0
camlp4.4.14+1
camlp-streams.5.0.1
cmdliner.1.1.1
core_kernel.v0.15.0
core_unix.v0.15.2
dtoa.0.3.2
dune.3.5.0
fileutils.0.6.4
fmt.0.9.0
landmarks-ppx.1.4
lru.0.3.1
lwt.5.6.1
lwt_log.1.1.2
... |
Shell Script | hhvm/hphp/hack/opam_cleanup.sh | #!/bin/sh
# Copyright (c) 2019, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the "hack" directory of this source tree.
HACK_DIR="$(realpath "$(dirname "$0")")"
# cleanup OSS locations
if [ -d "${HACK_DIR}/_build" ]; then
rm -rf "${HACK_... |
Shell Script | hhvm/hphp/hack/opam_helpers.sh | #!/bin/bash
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
# To be sourced by main script
# Shamelessly copied from
# https://github.com/facebook/infer/blob/master/scripts/opam_utils.sh
# Many thanks to the infer team :D
opam_require_version_2 () {
local status=0
local version=0
... |
Shell Script | hhvm/hphp/hack/opam_setup.sh | #!/bin/bash
# Copyright (c) 2017, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the "hack" directory of this source tree.
set -euf
unset DUNE_BUILD_DIR
if [ -z "$1" ]; then
echo "Usage: $0 /path/to/bin/opam [/path/to/build/dir]"
exit ... |
Markdown | hhvm/hphp/hack/README.md | # What is Hack?
Hack is a programming language for [HHVM](https://hhvm.com) that interoperates
seamlessly with PHP. Hack reconciles the fast development cycle of PHP with the
discipline provided by static typing, while adding many features commonly found
in other modern programming languages.
Hack provides instantan... |
hhvm/hphp/hack/README.ocpbuild | This document describes an alternative build-system for Hack. This is
currently the only build system available on Windows. Meanwhile, this
document focuses on using this alternative build system on Linux and
OS X; for Windows, see `README.win32`.
### ocp-build, a build system for OCaml applications
ocp-build is a bu... | |
hhvm/hphp/hack/README.win32 | We are currently porting Hack and Flow to Windows 64 bits. This
document describes the build system, if you want to test
the prototype. Be aware that this work will take some time
and most tests are currently known to fail.
### Dependency: OCPWin
OCPWin is a binary OCaml distribution for Windows. It is
self-contained... | |
hhvm/hphp/hack/THIRD-PARTY | The repository contains 3rd-party code in the following locations and
under the following licenses:
- src/third-party/avl: Files from the OCaml standard library, under the GNU
Library General Public License 2 with a linking exception. License can be
found in src/third-party/avl/LICENSE.
- src/third-party/core: Fi... | |
Markdown | hhvm/hphp/hack/doc/async/await-as-an-expression-spec.md | For a summary, see the [await-as-an-expression](https://docs.hhvm.com/hack/asynchronous-operations/await-as-an-expression) docs.
The guiding principle of “unconditionally consumed with the statement” is to prevent computation from being thrown away. Since we could run the awaits before the statement, if they turn out ... |
hhvm/hphp/hack/doc/coeffects/context_to_capabilities.dot | digraph G {
subgraph cluster_legend {
label="Legend: semantic model"
Cap2 -> Cap1 [label="extends"];
context [shape="rect", color=lightsteelblue1, style=filled];
context -> Cap1 [label="alias", style=dashed, color=blue];
context -> Cap2 [label="unsafe alias", color=red];
intersect_context [... | |
hhvm/hphp/hack/doc/coeffects/graph_v0.dot | digraph G {
subgraph cluster_legend {
label="Legend: semantic model"
Cap2 -> Cap1 [label="extends"];
context [shape="rect", color=lightsteelblue1, style=filled];
context -> Cap1 [label="alias", style=dashed, color=blue];
context -> Cap2 [label="unsafe alias", style=dotted, color=red];
inter... | |
Markdown | hhvm/hphp/hack/doc/HIPs/contexts_and_coeffects.md | ### Feature Name: Contexts and CoEffects
### Start Date: July 14, 2020
### Status: Candidate
# Summary:
A generalized system for the description and enforcement of permissions and restrictions of a context.
This HIP presents feature that overlays a coeffect system into the Hack type system through lightweight cont... |
Markdown | hhvm/hphp/hack/doc/HIPs/converging_constants.md | Status: This is not a full HIP following the usual template/process, but shared as a HIP for external visibility.
# Converging constants in Hack and HHVM
I’d like to ease a few HHVM restrictions on type constant overriding, and along the way to consolidate the rules around constant inheritance in general.
## Motivat... |
Markdown | hhvm/hphp/hack/doc/HIPs/data_classes.md | Title: Data Classes
Status: Draft
## The Problem
The Hack runtime does not know which fields are defined in an arbitrary
shape, and does not enforce them. It also cannot reorder shape fields, and
cannot store them contiguously.
This forces the runtime to use data representations that are slower
and use more memory.
... |
Markdown | hhvm/hphp/hack/doc/HIPs/enum-class-labels.md | # HIP: Enum Class Labels
### Status: Candidate
**Depends on:** Enum Classes project.
**Implementation status:** Done. Depends on a couple of lags
* ~~Enum classes flag, now enabled by default. (HHVM: `-v Hack.Lang.EnableEnumClasses=1`)~~ This is now removed
* ~~Unstable Features `enum_class_label` (HHVM: `-v Hack.... |
Markdown | hhvm/hphp/hack/doc/HIPs/equality_and_identity.md | Title: Equality, Identity, and Comparisons
Start Date: June 24 2020
Status: Draft
## Summary
Unify `==` and `===`, introduce sane alternatives for classes that need to use
behaviour similar to the old versions.
## Feature motivation
Hack has two main comparison operators `==` and `===`. They're individually
compr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.