Gráfico de Commits

76 Commits

Autor SHA1 Mensagem Data
Mike Magruder 3231abf20a Add option to extend the time we'll wait before dropping into the dummy sandbox on debugger signals
When the proxy's signal polling thread gets a signal from the debugger client, it would normally wait one second for another thread to recognize and consume the signal. This is pretty reasonable, but with a debug build on a heavily loaded system it's very rarely possible for one second to not be long enough. Added a runtime option to extend this, and set it to 3s for the existing debugger server tests.
2013-07-22 11:34:04 -07:00
Mirek Klimos 90b7170582 Remove Continuation from local 0
No emitted bytecode relies on Continuation being stored in local 0
anymore. Stop using local 0 for this purpose and compute offset
to the Continuation at JIT time. 16 bytes of memory freed.

At this point all locals of Continuation construction wrapper share the
same indices with their respective locals of Continuation body, which
should allow further optimizations.
2013-07-18 17:28:42 -07:00
Edwin Smith 721f89b890 Flatten directories under runtime/base
This moves runtime/base/*/* to runtime/base, and fixes paths.
2013-07-18 17:28:35 -07:00
Edwin Smith c4e406b62f Move runtime/base/server to runtime/server
This is an incremental step towards moving it all the way
to hphp/server.  This flattens base but doesn't untangle
the server files from lib_hphp_runtime
2013-07-15 18:13:25 -07:00
Herman Venter 10f93d4828 Do not report start, end and psp breakpoints as unbound when connected to a sandbox.
break start/end/psp currently always report themselves as unbound. If the client is connected to a sanbox, these should instead be treated as bound. Also, break clear all currently removes breakpoints without running their destructors in the right order, which causes the break point counter to not reset to 1.
2013-07-15 17:35:31 -07:00
Jordan DeLong dec333dd14 Implement most bitwise arithmetic outside of Variant
Everything except unary bitwise not.
2013-07-11 15:11:09 -07:00
Sara Golemon ccb3060ae9 Test's cpp files are moved to hphp/test/ext
Also create missing test_ext.inc
2013-07-10 20:25:32 -07:00
Drew Paroski 84b9d9a3a2 Separate resources from objects, part 1
In HHVM (and HPHPc before it) we've been piggybacking resources on the
KindOfObject machinery. At the language level, resource is considered to
be a different type than object, and there are a number of differences
in behavior between objects and resources (ex. resources don't allow for
dynamic properties, resources don't work with the clone operator, the
"(object)" cast behaves differently for resources vs. objects, etc).

Piggybacking resources on the KindOfObject machinery has some downsides.
Code that deals with KindOfObject values often needs to check if the value
is a resource and go down a different code path. This makes things harder
to maintain and harder to keep parity with Zend. Also, these extra branches
hurt performance a little, and they make it harder for the JIT to do a good
job in some cases when its generating machine code that operates on objects.

This diff prepares the code base for a new KindOfResource type by adding a
new "Resource" smart pointer type (currently a typedef for the Object smart
pointer type) and it updates the C++ code and the idl files appropriately.
This diff is essentially a cosmetic change and should not impact run time
behavior. In the next diff (part 2) we'll actually add a new KindOfResource
type, detach ResourceData from the ObjectData inheritence hierarchy, and
provide a real implementation for the Resource smart pointer type (instead
of just aliasing the Object smart pointer type).
2013-07-10 11:16:33 -07:00
Jordan DeLong 6e4e52197e Implement +=, -=, *=, /= and %= outside of Variant 2013-07-10 11:16:32 -07:00
Daniel Sloof d71433a966 get HHVM to compile on OSX
This is a squash of https://github.com/danslo/hiphop-php/compare/osx-review
2013-07-09 13:45:35 -07:00
Mike Magruder cb8d51fd2a Enable Ctrl-C while looping only in translated code
The debugger relies on hooks into the interpreter to gain control of threads. If a thread is looping in translated code, though, it will never enter the interpreter. Take advantage of the existing surprise checks emitted on back-branches to pop out of translated code back to the interpreter when trying to interrupt threads due to a Ctrl-C from the client.

Also modified TestDebuggerJit to ensure that the thread executing the infinite loop has time to settle into looping in TC's. The signal to interrupt the server is historically fast enough to get there before one of the translations is made. Added a reasonable delay which caused the test to fail deterministically on my machine before the fix.
2013-07-06 11:12:14 -07:00
Jordan DeLong f3d2185982 Delete Variant's implicit conversion operators 2013-06-25 13:19:07 -07:00
Sean Cannella 3d0c614b9a convert enums to enum classes, part 3
C++11 cleanup (clean up easy enums)

This is for runtime/base/... and ended up touching a lot of files
because it turns out we have a lot of reasonably behaved enums.
2013-06-25 13:19:06 -07:00
Jordan DeLong 4d5f36126d Remove equalAsStr (perflab can't detect the optimization)
There is only a single call-site for all of this thing.  I
figured perflab could be the judge on whether to reimplement the usage
in a more reasonable way, or just delete it---looks like option 2 is
good.
2013-06-25 13:19:06 -07:00
mwilliams 8ea5b023a8 Fix EnableRenameFunction for tests
The slow tests were supposed to run without it, except when they
explicitly requested it, but test/run always set it on the command line.

This moves it into the default config.hdf, and removes a few cases where
it was explicitly turned off in the slow tests.
2013-06-25 13:19:05 -07:00
Jordan DeLong c65b3bda41 Port TestExtProcess to php 2013-06-21 11:44:42 -07:00
Jordan DeLong efb4b89252 Port TestExtPdo to php
Leaves out the mysql test, which was disabled.
2013-06-21 11:44:41 -07:00
Jordan DeLong edf410ad86 Port TestExtPosix to php
Dropped tests that just called functions and did no testing
of the the result (the probability they'll catch a bug is around
zero).
2013-06-21 11:44:41 -07:00
Jordan DeLong 7eb65ff688 TestExtMcrypt -> php 2013-06-21 11:44:21 -07:00
Sara Golemon 3cb57c36f0 Remove errantly added includes 2013-06-21 11:39:03 -07:00
Jordan DeLong f0afa537d6 Port TestExtOpenssl to php 2013-06-21 11:38:45 -07:00
Jordan DeLong f435bf5ba7 Move TestExtSession to php 2013-06-21 11:33:24 -07:00
Jordan DeLong 3d3865c34e Port TestExtZlib to php
Also fixed the memory leak.
2013-06-21 11:33:24 -07:00
Jordan DeLong f42ce41179 TestExtOutput -> php 2013-06-21 11:28:47 -07:00
Jordan DeLong 104f003257 TestExtMailparse -> php 2013-06-21 11:25:34 -07:00
Jordan DeLong 6fe6e59c0e TestExtSoap -> php
Except one part that didn't work.  (Tasked.)  Also discovered
a SEGV (tasked).
2013-06-21 11:21:42 -07:00
Jordan DeLong 2147b11334 TestExtSqlite3 -> php
Except part of it that SEGVs in the JIT.  (See task.)
2013-06-21 11:21:42 -07:00
Jordan DeLong e1b03d674a TestExtVariable -> php 2013-06-21 11:21:42 -07:00
Jordan DeLong 877f06c1e1 TestExtString -> php 2013-06-21 11:21:41 -07:00
Jordan DeLong 72c4d16df2 TestExtStream -> php 2013-06-21 11:21:41 -07:00
Jordan DeLong 5a17a10cb6 TestExtOptions, TestExtNetwork, TestExtSocket -> php 2013-06-19 09:54:36 -07:00
Jordan DeLong fa3e93fdca Move TestExtMath to php 2013-06-19 09:54:36 -07:00
Jordan DeLong 4cebdbe47d Remove the ImageSprite extension
Believed to be unused now.
2013-06-19 09:54:36 -07:00
Jordan DeLong 23ddfd8769 Port TestExtMb to php 2013-06-18 16:23:24 -07:00
Jordan DeLong 12b68dcd4b Port TestExtIpc to php
I don't like these ones very much.
2013-06-18 16:23:24 -07:00
Jordan DeLong 58f3a89039 Port TestExtJson 2013-06-18 16:23:24 -07:00
Jordan DeLong 32d985bb4d Port TestExtIntl 2013-06-18 16:23:24 -07:00
Jordan DeLong 75be029d31 Get the rest of the ExtIcu-ish things to php 2013-06-18 16:23:23 -07:00
Jordan DeLong 4795dcdc09 Migrate TestExtFile to php
I dropped a couple tests that did nothing
(e.g. clearstatcache) or almost nothing, or that 'tested' things that
almost all the tests do (e.g. unlink or fclose).  Dropped a few unixy
apis that really didn't test that they do anything.  Combined a few
tests also.
2013-06-18 16:23:23 -07:00
Jordan DeLong 877603b393 Convert most of TestExtMisc to php; delete rest
Removed all the tests that tested functions that just throw
NotImplemented, or actually did sleeps (without any testing that the
sleep actually did anything).  Otherwise about the same, but I had to
add some assumptions in unpack because you can't do sizeof() from php.
2013-06-18 16:23:23 -07:00
Jordan DeLong 79ce492c0d Port TestExtUrl to php 2013-06-18 16:23:23 -07:00
Jordan DeLong 99ce60eda7 Port TestExtIcu to php 2013-06-18 16:23:22 -07:00
Jordan DeLong 740998c959 Port TestExtIconv to php 2013-06-18 16:23:22 -07:00
Jordan DeLong c26c540024 Port TestExtPreg to php 2013-06-18 16:23:22 -07:00
Jordan DeLong 6d9262d63f Move TestExtHash to php 2013-06-18 16:23:22 -07:00
Jordan DeLong 74f217adcb Move TestExtBzip2 to a php implementation 2013-06-18 16:23:21 -07:00
Jordan DeLong e6052a08c1 Move TestExtXml{,Reader,Writer} to php 2013-06-18 16:23:21 -07:00
Jordan DeLong b95200c2d9 Remove several TestExt tests that did nothing or added no coverage
All did nothing except ExtFunction and ExtSimpleXml.
ExtFunction does things that are sufficiently tested in other suites.
SimpleXml has a test suite, and this only had a few calls to some last
error functions that seemed weak enough to delete.
2013-06-18 16:23:21 -07:00
Jordan DeLong e54398e418 Translate TestExtBcmath to php 2013-06-18 16:23:20 -07:00
Jordan DeLong 9d2faa74cc Move tests from test_ext_datetime to php 2013-06-18 16:23:20 -07:00