46 Commits

Autor SHA1 Mensagem Data
Sara Golemon fc37017a7e Allow building ext_zend_compat extensions
By default, zend source compatability remains disabled,
however you can now explicitly request compilation of the
infrastructure and the extensions it supports via:

  cmake -DENABLE_ZEND_COMPAT=ON .

Note that CMake caches -D defines between runs, so a later call
without ENABLE_ZEND_COMPAT will still retain the option enabled.
Either explicitly set it to OFF, or delete CMakeCache.txt if
switching between the two.
2013-12-07 08:43:32 -08:00
Chad Horohoe 965a70f8dd Ignore libzip.dylib from being checked in 2013-11-26 16:17:41 -08:00
Paul Tarjan 4cd76aae2a implement fileinfo
A direct port of zend's forked libmagic code embeded in the same way they do it. All the bad tests are from `var_dump` imcompatability or unrelated unimplemented functions.

Reviewed By: @paroski

Differential Revision: D1050594
2013-11-15 10:13:41 -08:00
Sara Golemon 90d08a2b8f Kill bin/ directory
Move generated systemlib.php to hphp/system/
Let other intermediates live in their CMakeFiles dirs
2013-10-25 15:31:28 -07:00
Sara Golemon ed8774975e Restore licenses incorrectly mangled on last push
Update license.php so that doesn't happen again.
Add new ext_hhvm files to .gitignore
2013-08-30 20:57:45 -07:00
Edwin Smith fd881ac637 Rename _ to - in hphp/util
One more step in the renaming arc.
Depends on D925182

Differential Revision: D927227
2013-08-27 11:58:28 -07:00
Edwin Smith 251ebf9685 Rename files in runtime/base, part 7
Differential Revision: D913883
2013-08-05 14:42:18 -07:00
Sara Golemon b10a27e178 Generate ext_hhvm/infotabs files on the fly rather than as pre-builds 2013-04-25 15:33:05 -07:00
Sara Golemon c2d720b1a6 Clean up some leftover pieces of unused stuff 2013-04-25 15:13:59 -07:00
Sara Golemon f436534766 Add install target (and remove errant install targets from 3rd party)
make install
  Installs hhvm and systemlib.php to CMAKE_INSTALL_PREFIX/bin

To override the default location define it during cmake:
  cmake -DCMAKE_INSTALL_PREFIX=/usr/hphp .
2013-03-28 23:53:20 -07:00
jdelong 90fa863d44 Put compiler_id in a .cpp file on every link line, remove generated/
Instead of stashing compiler_id in a header that causes rebuilds,
regenerate on every build and list on every link line,
without depending on them.
2013-03-21 14:07:59 -07:00
mwilliams 35e456c966 Put the compiler-id into a variable
So that we only have to recompile one file when it changes.
2013-03-08 17:52:20 -08:00
Jordan Delong 363d1bb20f Code move src/ -> hphp/
This change is mostly for FB internal organizational reasons.
Building is not effected beyond the fact that the target now
lands in hphp/hhvm/hhvm rather than src/hhvm/hhvm.
2013-02-11 02:10:41 -08:00
Sara Golemon 308ddf6806 Combine hphp and hhvm into one executable
Move hphp/main.cpp to compiler/compiler.cpp, and rename
a few things to make it possible to link with hhvm.

Modify hhvm startup to run as hphp if
the first argument is --hphp.
2013-01-29 20:31:06 -08:00
Sara Golemon 76a789b290 Add folly to third_party 2013-01-10 12:52:03 -08:00
Sara Golemon 56c9e3e6cb Add libdouble-conversion to third_party 2013-01-09 00:19:08 -08:00
jdelong 3279ac37dc Make hhvm not a hphpc-compiled script
Separates hhvm from hphpc.  (This will mean we don't have to
compile hphpc when iterating on VM changes, and will help for eventual
hphpc-deprecation.)  Details:

   - Stubs for hphpc-externals symbols that can't yet be removed.

   - src/system now includes g_system_class_map, which is essentially
     what the hhvm class map contained (only system stuff, plus things
     from constants.php).

   - VM::ProcessInit was the only part of the runtime that depended on
     libext_hhvm---breaks that dependency using a function pointer for
     now so you can link hphp_runtime without linking ext_hhvm.

   - Remove dlsym usage to access compiler symbols, using function
     pointers for now too.
2012-12-17 21:28:29 -08:00
jdelong d0a388b804 Remove unused facebook-specific code_error.inc or dependency.inc 2012-12-17 14:20:13 -08:00
Sara Golemon ab798ead17 Add lz4compress to hphp
LZ4 seems to have better compression & decompression speed than qlz/etc
- http://code.google.com/p/lz4/.
2012-10-30 22:31:24 -07:00
Sara Golemon 8cc00a93fa Auto-generate repo_schema and compiler_id on build 2012-10-02 18:39:55 -07:00
mpal 1c635d3d1d Initial IR work
Initial merge of IR (Intermediate Representation) tree.
2012-09-20 13:29:01 -07:00
Sara Golemon 0a9d3c5875 Generated files 2012-09-05 20:51:09 -07:00
Sara Golemon e2a825dd8e Ignore another Makefile that never should have been checked in. 2012-07-23 21:47:58 -07:00
Sara Golemon 07a9121d1d Ignore (and do not store) Makefiles which are generated by cmake 2012-07-19 13:15:54 -07:00
Joel Pobar 39415630e8 Latest bits from trunk:
Fix casting resources to strings in the translator
Add request_alloc(); use it for non-ObjectData instead of ALLOCOBJSZ
Take two at reverting short array notation
Make more requires "mergeable"
Fix TestCodeRun-Exit
Change VectorArray to allocate values contiguously
Force file removal in merge-me-to-rc and merge-rc-to-release.
Run all C++ tests on each hphp diff sent out
Fix uncompilable code gen
Move HPHP::VM::Verifier::Arena to HPHP::Arena
Add a TinyVector<> class that can replace some uses of vector; use it some
ServiceRouter: bump version in hphp after single host fix
HPHP: get building with gcc-4.7.1
HPHP extension for textGetHyperlinks
Export translation counters through the hardware counters interface
Fix Makefile
HphpArray methods don't need to be virtual, clean up inline decls.
Remove a few things we don't follow from coding_guideline
Fix bugs with attributes for closures and methods imported from traits
Remove some new using directives that crept in after earlier removal
Add a check for lowercase extension function names in gen_ext_hhvm.php
[tc-print] More detailed summary of events
[tc-print] Changes to tc-prod-collect
Allow COMPILER_ID to be overridden on the command line
Remove boolean args from HphpArray::addVal[WithRef]
Fix NameValueTable load factor check.
Reduce StringBuffer memory usage
Fix compilation errors
Update login for megabench test user
make zend array bucket smaller
Clean up HphpArray code
Fix parser to allow xhp classes as attribute type hints
Enable the use of static analysis types in RepoAuthoritative mode
Fix compilation errors in HphpArray without USE_JEMALLOC
Remove extra element alignment and casting in HphpArray
Revert "HPHP extension for textGetHyperlinks"
bump fbcode revision to include D507348
HPHP extension for textGetHyperlinks
Remove KindOfIndirect support from HphpArray, add new VarEnv implementation
Teach the hhas assembler about string and int vector immediates
Allow ':' to be followed by T_XHP_LABEL
[tc-print] Add top translations summary
Fix string buffer overflows and other issues
Make type-profiling name-driven, and fix bugs.
2012-07-13 14:44:23 -07:00
Joel Pobar 7623d660a8 Latest from HipHop trunk 2012-06-22 15:28:50 -07:00
Joel Pobar a4fbb08028 Adds another required generated file for hhvm 2012-06-07 18:07:26 -07:00
Joel Pobar 4009d7b408 Required generated files for HHVM
Summary: these files should be generated as part of the build process.
Committing for now to unblock build.
2012-06-07 17:23:00 -07:00
Joel Pobar dcd7a28fd4 Updated to the latest bits, fixed the cmake scripts so that hhvm compiles
Summary: Added plumbing to the cmake scripts to enable hhvm builds.
To build the VM, export USE_HHVM=1, and follow the wiki instructions
to do a clean build.
2012-06-07 15:55:49 -07:00
Scott MacVicar e20a731e11 Further vm push 2011-12-12 22:21:00 -08:00
mwilliams cf7b4d021d [Cleanup] Better support for OUTPUT_ROOT
Summary: The test binary was hard coded to expect hphpi at src/hphpi/hphpi. Fix
it to take the path via a define at compile time, rather than copying the binary
there from OUTPUT_ROOT. A couple of other small fixes.

Test Plan: fast_tests slow_tests with/without OUTDIR_BY_TYPE set

Reviewers: qigao, myang

Reviewed By: myang

CC: ps, mwilliams, myang

Differential Revision: 344296
2011-10-17 18:21:44 -07:00
agallagher 1427e386f1 Remove use of dlopen in test runner
Summary:
Previously, to run tests, the 'run' binary would dlopen the
libtest.so shared library for the current test and run its
'main' function.  This caused problems with glibc, as it has
an issue where using pthread_join in static initializers
when run via dlopen causes a deadlock:
  - http://sourceware.org/bugzilla/show_bug.cgi?id=12307
  - https://bugzilla.redhat.com/show_bug.cgi?id=661676
The problem occurs when initializing newer versions of the
mysql library (newer versions than what is in the HPHP externals
repo, which is why the problem hasn't been seen yet), which is
used from the fbcode third-party repository.

This diff replaces the use of dlopen in the test runner to
use the dynamic linker instead.  This required building against
a dummy libtest.so, then using LD_LIBRARY_PATH to point the
test runner to the correct libtest.so when running the actual
tests.

Test Plan:
Ran slow tests for builds of HPHP
1) Against its own externals tree
2) Against the fbcode gcc-4.4.5-glibc-2.11.2 externals tree
3) With TAINTED=1

Reviewers: mwilliams, ldbrandy, gpatangay

Reviewed By: mwilliams

CC: mwang, ps, mwilliams, ldbrandy

Differential Revision: 311686
2011-08-31 13:10:40 -07:00
mwang a26426d1da [HPHP Tainting] Pass -DTAINTED to targets built w/ tainted hphp
Summary:
Failing to define TAINTED for build targets of a tainted hphp binary
will result in segfaults due to conflicting definitions. To ensure this
never happens, when we compile the hphp binary, if the build is tainted,
we place a sentinel file in HPHP_LIB; then for any build under the
tainted binary, we check for the existence of this file and pass
-DTAINTED if we find it.

In order to switch from tainted to untainted or vice versa, a clean is
needed so that we rebuild hphp with the code guarded by TAINTED flags.
This removes the sentinel file. However, since code generation is taint-
blind, we can still compile code generated under a tainted build with an
untainted build and vice versa by pointing HPHP_HOME and HPHP_LIB to the
desired repo.

Test Plan:
Ran 'make TAINTED=1 -C src -j' and made www without passing TAINTED;
ran hphpi and www as server with no crash and saw taint logs. Then did
the same for untainted builds, seeing no taint logs.

Reviewed By: mwilliams
Reviewers: mwilliams, gpatangay
CC: srenfro, hphp-diffs@lists, ps, mwilliams, mwang
Revert Plan:
Tags:

- begin *PUBLIC* platform impact section -
Bugzilla: #
- end platform impact -

Differential Revision: 309659
Task ID: 656564
2011-08-26 15:51:19 -07:00
mwilliams acff2393cd [Perf/Codesize] Remove more per-class functions
Summary: dynConstruct was generated per class, but should obviously be
implemented using getConstructor()/getMeth(), to avoid the per-class overhead.
However, inspection revealed that it was only called from one place in the
entire code base, and that was limited to the spl classes. So I removed the
function entirely, and rewrote the one callsite to use getConstructor directly.
Test Plan: fast_tests slow_tests, build www/www-dev.
Reviewed By: myang
Reviewers: qigao, myang
CC: mpal, cbueno, ps, mwilliams, myang
Revert Plan:
Tags:

- begin *PUBLIC* platform impact section -
Bugzilla: #
- end platform impact -

Differential Revision: 308366
2011-08-23 11:38:50 -07:00
mwilliams f7d4e652b7 Allow separable extensions to use OUTPUT_ROOT and OUTDIR_BY_TYPE
Summary:
Separable extensions were always built into the source directory, which wasnt
really compatible with the use of OUTPUT_ROOT and OUTDIR_BY_TYPE for the
compiler.

Add a hook.mk in src/hphpi to add the facebook specific separable extensions to
the hphpi build.

Reviewed By: myang
Reviewers: qigao, myang
CC: ps, mwilliams, perflab-dev@lists, myang
Revert Plan:
Tags:

- begin *PUBLIC* platform impact section -
Bugzilla: #
- end platform impact -

Differential Revision: 276669
2011-07-05 13:27:34 -07:00
mwilliams 3b77c96d3a [hphpi] Dont allow builtin functions to be redefined
Summary:
hphpi allowed builtin functions to be overridden by user code, rather than
fatalling.

Test Plan:
fast_tests

Reviewed By: qigao
Reviewers: qigao, myang
CC: hphp-diffs@lists, ps, mwilliams, qigao
Revert Plan:
Tags:

- begin *PUBLIC* platform impact section -
Bugzilla: #
- end platform impact -

Differential Revision: 275376
2011-07-05 13:21:46 -07:00
mwilliams 903ef141c4 [Perf] Better code gen for generators
Summary:
The parser transformation that creates the generator marks the hints the
continuation parameter as Continuation. But that doesnt take effect, because the
body of the function contains an LVariableTable, and so "anything" could happen
to the continuation parameter.
I marked the parameter "hidden", which says to keep it out of the variable
table. This allows the compiler to deduce that its not altered, and hence that
its type is Continuation throughout the function. So now we get direct calls to
the continuation methods, rather than indirect calls.

I then made some minor tweaks to the Closure/Continuation methods to fix return
types, so that eg getLabel() returns an int, making the initial switch more
efficient.

Test Plan:
fast_tests slow_tests

Reviewed By: myang
Reviewers: qigao, myang
CC: ps, mwilliams, myang
Revert Plan:
Tags:

- begin *PUBLIC* platform impact section -
Bugzilla: #
- end platform impact -

Differential Revision: 259841
2011-06-06 17:13:43 -07:00
mwilliams 5aadee00ac [Fix] Dont output ffi wrappers for create_function, or closures
Summary:
We autogenerate ffi wrappers for most functions. But functions created by
create_function, or closures dont need wrappers because they're never called
directly. In addition, some of the wrappers dont add a prefix, so these
functions would end up with invalid names.

Test Plan:
fast_tests, slow_tests, build libffi/python

DiffCamp Revision: 218069
Reviewed By: qixin
Reviewers: qixin
CC: qixin, mwilliams, hphp-diffs@lists
Tasks:
#504523: create_function() creates syntax error for FFI wrappers

Revert Plan:
OK
2011-03-01 16:51:10 -08:00
mwilliams c5652eade2 [Fix] Fix --format=lib build
Summary:
The recent header file reorganization caused problems with --format=lib,
because we then generate inline wrapper functions for each method. Because of
the way SmartPtr was implemented, this could require class definitions, rather
than just forward declarations.

In order to fix the dependencies, we would have to move the wrappers out of the
class, so that the class headers could all be included, and then the methods
could be declared.

For now, Im going for the simpler solution of changing the implementation of
SmartPtr so that it doesnt depend on the inheritance hierarchy (in particular,
SmartPtr<T> doesnt need to know that T derives from ObjectData).

Test Plan:
fast_tests, slow_tests, build libcore and www-dev

DiffCamp Revision: 207411
Reviewed By: qixin
Reviewers: qixin, qigao
CC: qixin, hphp-diffs@lists
Revert Plan:
OK
2011-02-02 12:58:36 -08:00
mwilliams 46d32571cf Add back compile time to build log
Summary:
Compilation now takes place outside of hphp, so record and display the time
separately.

Also update .gitignore to include some files generated by

Test Plan:
build www, www-dev from facebook, and www from facebook/push. Observe compile
time messages.

DiffCamp Revision: 182262
Reviewed By: hzhao
CC: hzhao, hphp-diffs@lists
Tasks:

Revert Plan:
OK
2010-11-15 16:08:21 -08:00
hzhao 6ff037ede9 new benchmark programs
Summary:
not all working, but some are :-)

Test Plan:
make

DiffCamp Revision: 178427
Reviewed By: qixin
CC: achao, qixin, hphp-diffs@lists
Revert Plan:
OK
2010-11-04 11:57:37 -07:00
mwilliams 443e02261f Fix hook makefiles to compile files in place
Summary:
The various hook.mk were copying files into the src directory, and then
compiling them. Also, there seemed to be some issues with the copy rules
This made it awkward to work with those files.

Test Plan:
make -Csrc. make fast_tests, slow_tests.

DiffCamp Revision: 123656
Reviewed By: myang
CC: hphp-diffs@lists, myang
Revert Plan:
OK
2010-06-15 17:45:20 -07:00
ahomescu 879b0a13e2 Add facebook/hotcold.hdf to .gitignore
Summary:

Task ID: #

Blame Rev:

Reviewers: xqi

CC: hphp-diffs@lists

Test Plan:
  make www

Revert Plan:

Tags:

- begin *PUBLIC* platform impact section -
Bugzilla: #
- end platform impact -

DiffCamp Revision: 120241
2010-06-05 12:27:55 -07:00
Scott MacVicar f77f3806bf Rename folders before update, this probably won't work :) 2010-05-22 12:02:24 -07:00
Scott MacVicar c24dcd2a08 ignore git files 2010-02-21 01:41:56 -08:00
mwilliams 74d672f62d Makefile tweaks, and add .gitignore files
Summary:
Replaced the "@" prefixes on all commands with $(V), which defaults to @. If you want to see the make commands echoed, use "make V=".
Added USE_CCACHE option. If set, and ccache is available, it will use ccache for compiles.
Added .gitignore files for git users

Reviewed By: hzhao

Test Plan:
Build still works, git status doesnt show me any cruft files, and ccache builds are really fast (once the cache is populated).

Revert: OK

DiffCamp Revision: 87920

git-svn-id: http://svn.facebook.net/hiphop/fbomb/branches/hphp-dev/fbcode/hphp@21557 2248de34-8caa-4a3c-bc55-5e52d9d7b73a
2010-02-09 16:08:04 +00:00