Fix cgJcc for bool comparisons with constants

The bool value is in the bottom byte of the register,
with the rest of the register undefined, but we were doing
a 32 bit compare.
More smart containers

And use them for VariableSerializer/VariableUnserializer
Remove some codegen traces
become consistent with zend for too few param error

I've been fighting with these in the importer. What do you think about being consistent? It gives an extra param of info too.
allow recursive test running

I found a bajillion more tests in the Zend repo, and I'm going to have to namespace things. I think this solution will also be nice for the porting our C++ strings. One directory per package and then when you want to run them all you run the top-level.
stop segfaulting in propery_exists
change func_num_args() from parser error to warning

I also introduced some code that I'll use to map their error messages to ours.
Add the K flag to ConvObjToArr and ConvGenToArr.

Brett commented on another differential: CRc means the opcode takes ownership of a (probably recently created) reference to its source, either by decreffing it or by storing it into an object property, array, etc... It's true that these are generally used right after an incref, but the design of the opcode shouldn't assume anything about its use, especially for opcodes like this that can be generically useful.

Any opcode that decrefs one of its sources without guaranteeing that the refcount won't go to zero should kill that source. If you can guarantee that these instructions will never destruct their source then they don't have to kill the source.
Fix issues with dead locals in backtraces

The specialized RetC sequence in tx64 destroyed each local,
and then set it to null in case onFunctionExit captured a
backtrace. But if the destructor of a sub-object captures
a backtrace, its already too late.

The same code in hhir didn't null out the local at all.
I found more tests...

So, I was being dumb and thought that that only tests zend had were in the folder called Zend/tests. On happenstance I typed a bad find command and found tons more tests all over the directory structure. I sort of figured out their directory structure and changed the importer to do all of it. Now we have an order of magnitude more tests. I didn't want a very deep directory structure so I replaced their ##/## with ##-##, but I'm open to other ideas.

The import script simulation of sscanf got crazyier since it now sees all sorts of nutty things like ##'%\0'##. I left the exception handing for errors incase zend adds more things that we need to parse.

Some of these tests are really really bad. They spew files all over your directory tree. Some with names that have nulls in them and other wonderful things. I'll start monkey-patching them. Only 1 test in the good directory does that, so I'll do that first.

Our coverage is MUCH worse now, but there are lot of unimplemented extensions and non .phpt file dependancies (@sgolemon not everything is encapsulated as tightly in one file). I'm sure I'll have some fun going through these.

We are at 2836 good and 9176 bad.

I've debated to use the actual php ##run_tests.php## but it seems very specialized. @sgolemon do you think it can't be wrangled into our tests? Or maybe output a compatible format?

I'm splitting the diffs up so we have a hope of hudson running them. I added the ##-o## option to help in that. This first diff basically moves all the tests into another dir but shouldn't change any. I'll send many other diffs for all the others tests.
import all tests from 'tests' and subdirs

I changed the import script to use a temporary directory instead of the bad directory. This makes is much faster to import only some files.

Done with:

  python tools/import_zend_test.py -z /tmp/php-5.4.11/ -o php-5.4.11/tests/
don't import sapi tests

For things that we are intentionally not implementing, I don't think they should live in our repo at all. Do you agree? Or would you rather them all in the bad directory?
switch to the same system as run-tests

My %s implementation needed backtracking, and instead of working on fixing that up, I switched to the same system as run-tests. This will serve way better as it is exactly their implementation.

Basically, instead of using the .diff I do the comparisson manually of .out and .exp using regexes. I'll go back through and re-import the other test diffs and see if things change. It worked well for the bcmatch tests (which is what I needed the backtracking %s for).

I used code from: https://github.com/php/php-src/blob/master/run-tests.php#L1895
add bcmath tests

All the bad tests seem to be error mis-matches. I already changed one error message about arguments so I think I should just make all these too many too few errors match.
kill dead code
Fix UnsetM with global base

If the global was not defined, it would try to return
a pointer into the MInstrCtx, which was not passed in.

We dont actually need it though, because in that case we can
just return a pointer to init_null_variant.
All inc and dec, all the time.

On older processors, inc and dec have some specific hazards associated with their preservation of the CF flag. Sandy Bridge doesn't suffer from this, so let's take the code size wins here. Thanks to Guilherme for updating my dated priors on this.

Also fix a pair of assembler bugs: no such thing as decl r32 on x64, and some decs were really incs.
Get rid of contEnterHelper*

It was identical to fcallHelper, except that if it couldn't get
a translation, it skipped over the prolog (and didnt call
the FunctionEntry hook, for example). That seems like a bug.

This removes it, cleans up funcBodyHelper to remove the special
cases for isGenerator, and modifies ContEnter to use
Func::prologTable()[1], rather than Func::funcBody() to dispatch.
Use Func::m_funcBody to avoid SrcDB lookups
Add original filepath for continuations in backtrace