Reduce compilation time of hphp/runtime/vm/native.cpp from 300+ seconds to 32 seconds.

hphp/runtime/vm/native.cpp generates a combinatorial number of template instantiations (proportional to 4 to the power of maximum arguments allowed), which makes it extremely slow to compile - over 350 seconds on my machine. This change forces all types to a binary-compatible uint64_t, thus keeping the calls well formed binarily (wee, new word) whilst drastically reducing the number of instantiations involved.

Reviewed By: @jdelong

Differential Revision: D979860
parity: add the boolval builtin

Added in PHP5.5, this builtin is going to be useful as a
 default argument for functions that expect a predicate callable.
 It's better to implement it than force the user to create yet another
 instance of `function ($var) { return (bool) $var; }`

Reviewed By: @markw65

Differential Revision: D980164
emit casting bytecodes for "<type>val()" funcs

... because the results are equivalent.

Reviewed By: @markw65

Differential Revision: D980174
change double-colon to be T_DOUBLE_COLON in the lexer

"Syntax error: unexpected T_PAAMAYIM_NEKUDOTAYIM" is a WTF
 rite-of-passage for every PHP noob. Unlike Zend, we don't have
 history to be beholden to, so HH syntax errors ought to be able to
 complain about T_DOUBLE_COLON. For compatibility with any parsers
 built on Zend, continue returning T_PAAMAYIM_NEKUDOTAYIM in
 'token_name' results

Reviewed By: @jdelong

Differential Revision: D980141
fixup newext to handle classes

still needs some love, but it pulls in classes now

Reviewed By: @paroski

Differential Revision: D976054
Auto-detect new cache format

Notice new cache format on read

Reviewed By: bmaurer

Differential Revision: D980474
add some namespace to macros

I'm using these macros outside the HPHP namespace

Reviewed By: @paroski

Differential Revision: D976050
pass 'this' to extension functions

with classes, this needs to be passed down as a variable since many extensions just hard-code `this_ptr`.

Reviewed By: @paroski

Differential Revision: D976055
get ready for ZendCompat classes

This turns off the `ZendCompat` classes at runtime just like we do for functions.

Reviewed By: @paroski

Differential Revision: D976049
collections: set-like-array return value from Set::toArray

Set::toArray returns `array(val1 => val1, val2 => val2, ...)`. This
maintains set-like semantics in array() land: O(1) membership test
with `array_key_exists($key, $a)` or `$a[$key]` and iteration with `foreach($a as
$member)`. Int-like strings end up with numerical array keys.

For nice symmetry, the results of `$s->toArray()` are the same as those of
`array_combine(array_keys($s),array_values($s))`

Reviewed By: @paroski

Differential Revision: D970064
Update array_keys(), array_values(), array_combine() to support collections

Reviewed By: drussi

Differential Revision: D974413
update materialize_methods test for Set->toArray() change

... should fix cont build

Reviewed By: @markw65

Differential Revision: D980893
Don't warn on include'd files that are empty

We currently emit a "File not found" warning on empty files that
are include'd, whereas Zend PHP is silent.

Reviewed By: @markw65

Differential Revision: D977274
Regard unimplemented functions an non-existant

This can happen when a function is declared
in systemlib, but not implemented in cpp.

Reviewed By: @ptarjan

Differential Revision: D976157
Fix Set::toKeysArray() and Set::toValuesArray()

Reviewed By: @elgenie

Differential Revision: D981442
support objects in zend compat layer

everything in here was needed to make the oauth extension work

Reviewed By: @paroski

Differential Revision: D976237
import oauth extension (take 2)

redoing this after the revert

Reviewed By: @paroski

Differential Revision: D976056
hphp: replace ENABLE_ASAN with FOLLY_SANITIZE_ADDRESS

FOLLY_SANITIZE_ADDRESS is automatically enabled via the

Reviewed By: @scannell

Differential Revision: D978198
Fix OSX build

OSX build is broken, fix it

Reviewed By: bertrand

Differential Revision: D981730
Use in memory structures for debug line info

This diff removes the last direct uses of SQL queries for mapping source line information to byte code offsets.

Reviewed By: @mikemag

Differential Revision: D980213