Kill unnecessary t___construct() methods
commitece8bfb3f1f18571fdc52abb31abca5ff6a4540b
authorJan Oravec <jan@fb.com>
Thu, 15 May 2014 19:13:35 +0000 (15 12:13 -0700)
committerJoelMarcey <joelm@fb.com>
Fri, 23 May 2014 23:09:16 +0000 (23 16:09 -0700)
tree8da2bfc19a68e657f3f1eb0c9636d0bdf00c2b0a
parent35f01da8d5a8ad854ed9199fde42c332a544815e
Kill unnecessary t___construct() methods

Summary: The t___construct() methods were required by hphpc (it would not compile
without them). Since these methods were declared as private, they were
unreachable. The root class of all WaitHandles still defines constructor
as private, which should in theory stop invalid attempts to construct
objects. In practice, it doesn't (and didn't) help, as HHVM tries to build
object first, then decide whether constructor can be called and when
not, destroy the object. That doesn't work well with extension classes,
as they often cannot handle weird state in their destructor. This this
does not have any effect on this behavior and is completely orthogonal.

Also, __construct() was kept in StaticWaitHandle and
ExternalThreadEventWaitHandle due to a buggy design of gen-ext-hhvm,
which emits constructors and destructors only if there is at least one
method. Fix of that bug is out of scope of this diff.

Reviewed By: @billf

Differential Revision: D1346810
20 files changed:
hphp/runtime/ext/asio/async_function_wait_handle.cpp
hphp/runtime/ext/asio/async_function_wait_handle.h
hphp/runtime/ext/asio/blockable_wait_handle.cpp
hphp/runtime/ext/asio/blockable_wait_handle.h
hphp/runtime/ext/asio/external_thread_event_wait_handle.cpp
hphp/runtime/ext/asio/gen_array_wait_handle.cpp
hphp/runtime/ext/asio/gen_array_wait_handle.h
hphp/runtime/ext/asio/gen_map_wait_handle.cpp
hphp/runtime/ext/asio/gen_map_wait_handle.h
hphp/runtime/ext/asio/gen_vector_wait_handle.cpp
hphp/runtime/ext/asio/gen_vector_wait_handle.h
hphp/runtime/ext/asio/reschedule_wait_handle.cpp
hphp/runtime/ext/asio/reschedule_wait_handle.h
hphp/runtime/ext/asio/sleep_wait_handle.cpp
hphp/runtime/ext/asio/sleep_wait_handle.h
hphp/runtime/ext/asio/static_wait_handle.cpp
hphp/runtime/ext/asio/wait_handle.cpp
hphp/runtime/ext/asio/waitable_wait_handle.cpp
hphp/runtime/ext/asio/waitable_wait_handle.h
hphp/system/idl/asio.idl.json