PHP_VERSION_ID is now 504999 which is > all Zend versions which
makes using it for comparisons of less than 5.5/5.6/etc. impossible.
Closes#1603
Reviewed By: @sgolemon
Differential Revision: D1135461
* parse all the fastcgi headers at once
* uppercase the key instead of using case insensitive. This won't return the original casing, but HTTP is case insensitive anyways, so it shouldn't matter *cross fingers*
* stop generating a vector in the header map and do it at readtime
* use `unordered_map`
Reviewed By: @jdelong
Differential Revision: D1128430
Making APC strings and APC array with proper shape uncouted and truly shared in APC, saving on copy and ref count
Reviewed By: @jdelong
Differential Revision: D1114228
I have wanted to break up run.php into its own files and refactor things a bit. So I am now doing that.
Note that the frameworks directory now contains the PHP for individual frameworks and that framework_downloads will contain the actual github code for the frameworks
During refactoring, I found some interesting new issues:
1. The recent changes to reflection (ext_reflection-classes.php, etc.) have caused my test finder to hiccup for cases where I find the tests with reflection. This may be bad code on my part; but I am not sure. Right now it seems the issues are coming with IsSubclassOf, but this is just a guess. I am trying to come up with a repo case.
2. The percentage of Magento2 has dropped into the upper 80% range. And this is due to some namespace fatals that are occurring. We need to dig into that. Note, that we are using a more recent git hash for Magento2 (instead of the August one as before) and they added more namespace support during that time. We are also seeing a drop in Drupal as well, but not to the same degree.
@ptarjan, this diff does not make the abstract Framework class public yet. That can be done in a subsequent diff :-)
Reviewed By: @ptarjan
Differential Revision: D1133446
If we pop the stack after ContEnter, it creates a
LdStack/TakeStack that keeps an SSATmp live across a call, which
(rightfully) causes an assertion to fail later.
This isn't a problem if we have refcount opts or dce on, since those
passes will remove the TakeStack, but it would still be good to have
our IR correct in the absence of optimization.
Reviewed By: @swtaarrs
Differential Revision: D1134125
Some optimizations rely on being able to insert code on all exit
edges, so anything that can throw much have a catch block. This diff adds a
runtime check for that and fixes all cases I hit in local and prod testing.
Reviewed By: @edwinsmith
Differential Revision: D1132380
This diff eliminates all exit traces from the jit, turning them into
regular old Unlikely blocks in the main trace. IRTrace is still around and we
have one per IRUnit; I'm planning on eliminating it in a separate
diff. IRTrace's BlockList is gone, so now we just store a pointer to the entry
Block and walk the cfg from there.
Reviewed By: @edwinsmith
Differential Revision: D1128179
... perhaps it will work better in repo mode if the test-installed error
handler always throws an exception, instead of relying on the return
value.
Reviewed By: @jdelong
Differential Revision: D1133463
Already made the corresponding change in flib. This
is more consistent with mb_substr() and more consistent with
a typed world -- fb_utf8_substr()'s return value will pass
typehints for strings, for example.
Reviewed By: @alokmenghrajani
Differential Revision: D493517
It's quite advantageous to be able to support int|float as a
typehint without introducing support for full-blown unions. To make
that equivalence happen, a bit of runtime support is necessary
Reviewed By: @jdelong
Differential Revision: D1128502
DecRefStack is the #2 punt. This involved a surprising amount of code.
Decreffing is hard, apparently.
Reviewed By: @edwinsmith
Differential Revision: D1131799
For now. As is it can infer incorrect property types since
it isn't set up to look at the closure bodies.
Reviewed By: @dariorussi
Differential Revision: D1132987
Type assertions were allocating new DynLocations every time
we encountered them, which breaks getOutputUsage (it uses DynLocation
pointer equality to track the flow of values). When encountering
assertions, it also wasn't doing the optimization that we have in
applyInputMetaData to eliminate earlier predictions on the same
location. Finally, this diff finishes the support for optional object
types (fixes inlining and object property accesses in these
situations).
Reviewed By: @swtaarrs
Differential Revision: D1128602
Fix a long-standing issue that could segfault the VM in
RepoAuthoritative mode (not in practice in www, since our error
handler always throws in this case). To do this, adds a Repo global
metadata blob that we can use to communicate whatever global
compilation information we want to the runtime (I've wished we had
this for a few things in the past).
Reviewed By: @edwinsmith
Differential Revision: D1125218
Looking at the JIT's output with HHBBC on, I noticed guards
in tracelets that only do RetC weren't going away. This is because I
forgot to tell the interpreter that return opcodes read locals, so the
assert opcodes weren't being added.
Reviewed By: @swtaarrs
Differential Revision: D1125188
I think for us to get anything from private property
inference, we have to be able to assert these types and rely on
tracelet guards to remove the nulls.
Reviewed By: @dariorussi
Differential Revision: D1125172
A really small thing we needed to have the recently added
is_opt() and unopt() things to do. Before it would just push TObj.
Now we can push the type with the possible null removed (since we'd
fatal if it was null).
Reviewed By: @dariorussi
Differential Revision: D1125107
We could do better for object types, but probably not worth
the effort yet until there's more conversion.
Reviewed By: @edwinsmith
Differential Revision: D1125101
- Added -i option to include only certain tests to be executed.
- Print the norepo reason next to skipped message for tests with .norepo
file
Closes#1582
Reviewed By: @ptarjan
Differential Revision: D1131390
Pulled By: @scannell
in expression String::FromChar(i + em.basechar)
we casted "i + em.basechar" to char and therefore we got some
collisions of keys in translation table.
This diff uses more appropriate String::FromCStr as keys
Reviewed By: @ptarjan
Differential Revision: D1125958
- gets decrefed in frame_free_locals_helper_inl
- matches the behavior in the other non-error paths
- bsimmers is going to look at LookupCns - Uncounted is probably incorrect
Reviewed By: @swtaarrs
Differential Revision: D1130546
These instructions never actually have an exit edge. Their flags in ir.h
indicate as much, as well as all of the places where they're gen()'ed.
All that code in code-gen was just cluttering up the place.
Reviewed By: @jdelong
Differential Revision: D1129774
This is the #3 punting opcode. The top two are Call and DecRefStack;
Call is in the works but proving to be rather nontrivial, and
DecRefStack is also going to be slightly tricky. This one, on the other
hand, is super simple.
Reviewed By: @edwinsmith
Differential Revision: D1129534
Implemented support for extension version check in phpversion()
following Zend compatibility. Updated all extensions on HHVM to match
versions on PECL and php-src master branch.
Closes#1506
Reviewed By: @JoelMarcey
Differential Revision: D1117334
Pulled By: @scannell
We should let the region selector decide whether or not to merge
profiling translations connected by an unconditional jump into a
longer trace. So don't eagerly trace through unconditional jumps in
profiling mode.
Reviewed By: @edwinsmith
Differential Revision: D1128517