Skip to content

Commit d50dd15

Browse files
jwatzmansgolemon
authored andcommitted
Change directory structure
H4sICNwgJ1MAA0hhY2tMb2dvLnR4dACtW8uS2zgM vO8v5KKLrqzxONnRSBf+gy6qyjfMzf9fa1sWCTQa gCZZ71Y8tiQSBBqNB+kfv9+W68fy82O5vH18Df/z 68fvt69/fsAU5fF/cd63x92X5fq2fL7dH/lqX3ws n48xvjYYLhwN3qk4jyvPF3kHYUb1+e1rm56DPf6+ D/b2tX/8+bg0P/+8HlduetbZndG+c6FfC7PvTT/7 xCgySjzhkiqsQSyfqv6l3vCdrsFfNJtWiFjZEnaJ R30Jn1z7nQuxnFSDFnYVmI6N5mOMGUsLsWa2qlut yT3Pj5e2wsx62oT0s+vEdlXovGCpilqevmnpOpn1 1wlt2oQcYfTyvPzrGG330H+PjwCIupK7cWmClqoB TJHgaPAQGGdeDaBi3MdM+pK5qYK7/po5/4T22l9d w7sK3087kIZ212bpQ940UQ76xgGsK2dYI+9JLdRw W7qlDhy7iG/3InJXInbkyUb1K44I2N/uxhBYF84u 3QOnxYCkrlWQ+cVelD7aWK7BJz3aqKE5aW1W4NPm FrFfFHSImaElEbHD+6HTO6NklDrVWO3TRDRPAtGu 19mMTn0DNCesZGfP1klZ9V+ttKbtrSVNzT7FjWvN c064g+IVKhIN4dOuXwb92MGqZ5U+jUkNklDlh4ON WqmJu+ZGo1kNCmigb1JC9JCpoGTG3qHjvdxTYxJl SRIXYd1bcwSSoF1fenIu23y7ThQXyrseHm6RYAB3 0aZiIe4AYdPlwhxJaLrkIE1xTOX+QAW1BGHDpGfY NmQQQ+wiLUaRV+rxcUoIEtwKCJmtGQwg4NHynStA 45JCTgbSw5AXcpkFURP6qG9mcYex2ysjaxC6Acss Jckk8pTgm8HBpNNdSSa7o3e5i9mXftUfvZsXfTOL 8ybcmNTOobQG4Shb3Ey+5AIMCERgK80seJgy2hX2 rDUnDZFt4POTn4gj24Uh/Emsu/wnGErpf17mWdZG LpcUZFCTw096LpvfnWCasPw5o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gabelevi Differential Revision: D1229961 Differential Revision: D1230222
1 parent 2ce5e74 commit d50dd15

2,643 files changed

Lines changed: 76339 additions & 5 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CMake/FindOCaml.cmake

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
set(OCAMLC_FOUND FALSE)
2+
set(OCAMLC_OPT_SUFFIX "")
3+
4+
if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
5+
message(STATUS "Not on Linux, cannot build Hack typechecker")
6+
return()
7+
endif()
8+
9+
find_program(OCAMLC_EXECUTABLE ocamlc DOC "path to ocamlc")
10+
mark_as_advanced(OCAMLC_EXECUTABLE)
11+
12+
if(OCAMLC_EXECUTABLE)
13+
message(STATUS "Found ocamlc: ${OCAMLC_EXECUTABLE}")
14+
execute_process(COMMAND ${OCAMLC_EXECUTABLE} -version
15+
OUTPUT_VARIABLE OCAMLC_VERSION
16+
OUTPUT_STRIP_TRAILING_WHITESPACE)
17+
if ("${OCAMLC_VERSION}" VERSION_LESS "3.12")
18+
message(STATUS "OCaml version ${OCAMLC_VERSION} is too old "
19+
"to build the Hack typechecker, need at least 3.12")
20+
else()
21+
set(OCAMLC_FOUND TRUE)
22+
23+
find_program(OCAMLC_OPT_EXECUTABLE ocamlc.opt DOC "path to ocamlc.opt")
24+
mark_as_advanced(OCAMLC_OPT_EXECUTABLE)
25+
26+
if (OCAMLC_OPT_EXECUTABLE)
27+
message(STATUS "Found ocamlc.opt: ${OCAMLC_OPT_EXECUTABLE}")
28+
set(OCAMLC_OPT_SUFFIX ".opt")
29+
else()
30+
message(STATUS "Could not find ocamlc.opt, "
31+
"Hack typechecker build will be slow")
32+
endif()
33+
endif()
34+
else()
35+
message(STATUS "OCaml not found, will not build Hack typechecker")
36+
endif()

hphp/CMakeLists.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,18 @@ if(ENABLE_FASTCGI)
3636
add_subdirectory(third_party/thrift)
3737
endif()
3838

39-
add_subdirectory(vixl)
39+
add_subdirectory(compiler)
40+
add_subdirectory(hack)
41+
add_subdirectory(hhbbc)
4042
add_subdirectory(neo)
4143
add_subdirectory(parser)
42-
add_subdirectory(zend)
43-
add_subdirectory(util)
4444

45-
add_subdirectory(hhbbc)
46-
add_subdirectory(compiler)
4745
add_subdirectory(runtime)
4846
add_subdirectory(runtime/ext_hhvm)
4947
add_subdirectory(system)
48+
add_subdirectory(util)
49+
add_subdirectory(vixl)
50+
add_subdirectory(zend)
5051

5152
add_subdirectory(hhvm)
5253

hphp/hack/.gitignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
test/more_tests/*.diff
2+
test/more_tests/*.out
3+
test/suggest/*.diff
4+
test/suggest/*.out
5+
bin/
6+
src/inotify-1.0/
7+
src/_build/
8+
src/parsing/parser.output
9+
src/parsing/lexer.ml
10+
src/parsing/lexer_hack.ml
11+
src/parsing/parser.ml
12+
src/parsing/parser.mli
13+
*.cm*
14+
*.o
15+
.depend
16+
*.so
17+
*.annot
18+
*.opt

hphp/hack/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
find_package(OCaml)
2+
3+
if (OCAMLC_FOUND)
4+
add_custom_target(
5+
hack
6+
ALL
7+
COMMAND make depend && env OPTBIN="${OCAMLC_OPT_SUFFIX}" make
8+
WORKING_DIRECTORY src
9+
)
10+
endif()

hphp/hack/LICENSE

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
BSD License
2+
3+
For Hack software
4+
5+
Copyright (c) 2013, Facebook, Inc. All rights reserved.
6+
7+
Redistribution and use in source and binary forms, with or without modification,
8+
are permitted provided that the following conditions are met:
9+
10+
* Redistributions of source code must retain the above copyright notice, this
11+
list of conditions and the following disclaimer.
12+
13+
* Redistributions in binary form must reproduce the above copyright notice,
14+
this list of conditions and the following disclaimer in the documentation
15+
and/or other materials provided with the distribution.
16+
17+
* Neither the name Facebook nor the names of its contributors may be used to
18+
endorse or promote products derived from this software without specific
19+
prior written permission.
20+
21+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
22+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
25+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
28+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

hphp/hack/Makefile

Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
# CMAKE generated file: DO NOT EDIT!
2+
# Generated by "Unix Makefiles" Generator, CMake Version 2.8
3+
4+
# Default target executed when no arguments are given to make.
5+
default_target: all
6+
.PHONY : default_target
7+
8+
#=============================================================================
9+
# Special targets provided by cmake.
10+
11+
# Disable implicit rules so canonical targets will work.
12+
.SUFFIXES:
13+
14+
# Remove some rules from gmake that .SUFFIXES does not remove.
15+
SUFFIXES =
16+
17+
.SUFFIXES: .hpux_make_needs_suffix_list
18+
19+
# Suppress display of executed commands.
20+
$(VERBOSE).SILENT:
21+
22+
# A target that is always out of date.
23+
cmake_force:
24+
.PHONY : cmake_force
25+
26+
#=============================================================================
27+
# Set environment variables for the build.
28+
29+
# The shell in which to execute make rules.
30+
SHELL = /bin/sh
31+
32+
# The CMake executable.
33+
CMAKE_COMMAND = /usr/bin/cmake
34+
35+
# The command to remove a file.
36+
RM = /usr/bin/cmake -E remove -f
37+
38+
# The top-level source directory on which CMake was run.
39+
CMAKE_SOURCE_DIR = /home/sgolemon/dev/hiphop-php
40+
41+
# The top-level build directory on which CMake was run.
42+
CMAKE_BINARY_DIR = /home/sgolemon/dev/hiphop-php
43+
44+
#=============================================================================
45+
# Targets provided globally by CMake.
46+
47+
# Special rule for the target edit_cache
48+
edit_cache:
49+
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..."
50+
/usr/bin/cmake -i .
51+
.PHONY : edit_cache
52+
53+
# Special rule for the target edit_cache
54+
edit_cache/fast: edit_cache
55+
.PHONY : edit_cache/fast
56+
57+
# Special rule for the target install
58+
install: preinstall
59+
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
60+
/usr/bin/cmake -P cmake_install.cmake
61+
.PHONY : install
62+
63+
# Special rule for the target install
64+
install/fast: preinstall/fast
65+
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
66+
/usr/bin/cmake -P cmake_install.cmake
67+
.PHONY : install/fast
68+
69+
# Special rule for the target install/local
70+
install/local: preinstall
71+
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
72+
/usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
73+
.PHONY : install/local
74+
75+
# Special rule for the target install/local
76+
install/local/fast: install/local
77+
.PHONY : install/local/fast
78+
79+
# Special rule for the target install/strip
80+
install/strip: preinstall
81+
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
82+
/usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
83+
.PHONY : install/strip
84+
85+
# Special rule for the target install/strip
86+
install/strip/fast: install/strip
87+
.PHONY : install/strip/fast
88+
89+
# Special rule for the target list_install_components
90+
list_install_components:
91+
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\""
92+
.PHONY : list_install_components
93+
94+
# Special rule for the target list_install_components
95+
list_install_components/fast: list_install_components
96+
.PHONY : list_install_components/fast
97+
98+
# Special rule for the target rebuild_cache
99+
rebuild_cache:
100+
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
101+
/usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
102+
.PHONY : rebuild_cache
103+
104+
# Special rule for the target rebuild_cache
105+
rebuild_cache/fast: rebuild_cache
106+
.PHONY : rebuild_cache/fast
107+
108+
# The main all target
109+
all: cmake_check_build_system
110+
cd /home/sgolemon/dev/hiphop-php && $(CMAKE_COMMAND) -E cmake_progress_start /home/sgolemon/dev/hiphop-php/CMakeFiles /home/sgolemon/dev/hiphop-php/hphp/hack/CMakeFiles/progress.marks
111+
cd /home/sgolemon/dev/hiphop-php && $(MAKE) -f CMakeFiles/Makefile2 hphp/hack/all
112+
$(CMAKE_COMMAND) -E cmake_progress_start /home/sgolemon/dev/hiphop-php/CMakeFiles 0
113+
.PHONY : all
114+
115+
# The main clean target
116+
clean:
117+
cd /home/sgolemon/dev/hiphop-php && $(MAKE) -f CMakeFiles/Makefile2 hphp/hack/clean
118+
.PHONY : clean
119+
120+
# The main clean target
121+
clean/fast: clean
122+
.PHONY : clean/fast
123+
124+
# Prepare targets for installation.
125+
preinstall: all
126+
cd /home/sgolemon/dev/hiphop-php && $(MAKE) -f CMakeFiles/Makefile2 hphp/hack/preinstall
127+
.PHONY : preinstall
128+
129+
# Prepare targets for installation.
130+
preinstall/fast:
131+
cd /home/sgolemon/dev/hiphop-php && $(MAKE) -f CMakeFiles/Makefile2 hphp/hack/preinstall
132+
.PHONY : preinstall/fast
133+
134+
# clear depends
135+
depend:
136+
cd /home/sgolemon/dev/hiphop-php && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
137+
.PHONY : depend
138+
139+
# Convenience name for target.
140+
hphp/hack/CMakeFiles/hack.dir/rule:
141+
cd /home/sgolemon/dev/hiphop-php && $(MAKE) -f CMakeFiles/Makefile2 hphp/hack/CMakeFiles/hack.dir/rule
142+
.PHONY : hphp/hack/CMakeFiles/hack.dir/rule
143+
144+
# Convenience name for target.
145+
hack: hphp/hack/CMakeFiles/hack.dir/rule
146+
.PHONY : hack
147+
148+
# fast build rule for target.
149+
hack/fast:
150+
cd /home/sgolemon/dev/hiphop-php && $(MAKE) -f hphp/hack/CMakeFiles/hack.dir/build.make hphp/hack/CMakeFiles/hack.dir/build
151+
.PHONY : hack/fast
152+
153+
# Help Target
154+
help:
155+
@echo "The following are some of the valid targets for this Makefile:"
156+
@echo "... all (the default if no target is provided)"
157+
@echo "... clean"
158+
@echo "... depend"
159+
@echo "... edit_cache"
160+
@echo "... hack"
161+
@echo "... install"
162+
@echo "... install/local"
163+
@echo "... install/strip"
164+
@echo "... list_install_components"
165+
@echo "... rebuild_cache"
166+
.PHONY : help
167+
168+
169+
170+
#=============================================================================
171+
# Special targets to cleanup operation of make.
172+
173+
# Special rule to run CMake to check the build system integrity.
174+
# No rule that depends on this can have commands that come from listfiles
175+
# because they might be regenerated.
176+
cmake_check_build_system:
177+
cd /home/sgolemon/dev/hiphop-php && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
178+
.PHONY : cmake_check_build_system
179+

hphp/hack/PATENTS

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Additional Grant of Patent Rights
2+
3+
"Software" means the Hack software distributed by Facebook, Inc.
4+
5+
Facebook hereby grants you a perpetual, worldwide, royalty-free, non-exclusive,
6+
irrevocable (subject to the termination provision below) license under any
7+
rights in any patent claims owned by Facebook, to make, have made, use, sell,
8+
offer to sell, import, and otherwise transfer the Software. For avoidance of
9+
doubt, no license is granted under Facebook's rights in any patent claims that
10+
are infringed by (i) modifications to the Software made by you or a third party,
11+
or (ii) the Software in combination with any software or other technology
12+
provided by you or a third party.
13+
14+
The license granted hereunder will terminate, automatically and without notice,
15+
for anyone that makes any claim (including by filing any lawsuit, assertion or
16+
other action) alleging (a) direct, indirect, or contributory infringement or
17+
inducement to infringe any patent: (i) by Facebook or any of its subsidiaries or
18+
affiliates, whether or not such claim is related to the Software, (ii) by any
19+
party if such claim arises in whole or in part from any software, product or
20+
service of Facebook or any of its subsidiaries or affiliates, whether or not
21+
such claim is related to the Software, or (iii) by any party relating to the
22+
Software; or (b) that any right in any patent claim of Facebook is invalid or
23+
unenforceable.

hphp/hack/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# What is Hack?
2+
3+
Hack is a programming language for [HHVM](http://hhvm.com) that interoperates
4+
seamlessly with PHP. Hack reconciles the fast development cycle of PHP with the
5+
discipline provided by static typing, while adding many features commonly found
6+
in other modern programming languages.
7+
8+
Hack provides instantaneous type checking via a local server that watches the
9+
filesystem. It typically runs in less than 200 milliseconds, making it easy to
10+
integrate into your development workflow without introducing a noticeable delay.
11+
12+
For more information, see the [website](http://hacklang.org/).

hphp/hack/bin/README

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
THE PLACE WHERE WE PUT THE BINARIES
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
; Copyright (c) 2014, Facebook, Inc.
2+
; All rights reserved.
3+
;
4+
; This source code is licensed under the BSD-style license found in the
5+
; LICENSE file in the "hack" directory of this source tree. An additional grant
6+
; of patent rights can be found in the PATENTS file in the same directory.
7+
8+
;; Setup the compile command
9+
(setq compile-command "hh_client")
10+
(global-set-key (kbd "M-RET") 'compile)
11+
12+
(if (boundp 'hack-for-hiphop-root)
13+
(setq compile-command (concat "hh_client --from emacs " hack-for-hiphop-root))
14+
15+
;; Compute the path to www whenever a php file is opened
16+
(add-hook 'php-mode-hook
17+
(lambda()
18+
(set (make-local-variable 'compile-command) (concat "hh_client "
19+
(locate-dominating-file (file-truename (buffer-name)) ".hhconfig")))))
20+
)
21+
22+
;; Shortcut keys
23+
(define-key input-decode-map "\e\eOA" [(meta up)])
24+
(define-key input-decode-map "\e\eOB" [(meta down)])
25+
(global-set-key [(meta up)] 'next-error)
26+
(global-set-key [(meta down)] 'previous-error)

0 commit comments

Comments
 (0)