Make ResourceData ref-count start at 1
commita264088bf94b962ae8a622919638183e857a7d82
authorRick Lavoie <rlavoie@fb.com>
Tue, 7 Jul 2015 14:26:26 +0000 (7 07:26 -0700)
committerhhvm-bot <hhvm-bot@fb.com>
Tue, 7 Jul 2015 14:32:31 +0000 (7 07:32 -0700)
tree90cb9cd40bd7456c1645c7b1187e8b2bef4f44c7
parent428be9348ef502e76cb344a9ff2b0b6c2c081f3a
Make ResourceData ref-count start at 1

Summary: Similar to how StringData/ObjectData/ArrayData now works, initialize
the ResourceData ref-count to 1 instead of 0, and save pointless
inc-refs. Unlike other patches of this nature, this change is quite trivial, as
there's very few bare manipulations of ResourceData reference counts.

Also mark that the AllocObj and NewInstance IR opcodes produce a ref-count
(since the ObjectData ref-count diff).

Reviewed By: @​bnell

Differential Revision: D2218061
hphp/doc/ir.specification
hphp/runtime/base/resource-data.cpp
hphp/runtime/base/resource-data.h
hphp/runtime/base/tv-helpers.cpp
hphp/runtime/ext_zend_compat/php-src/Zend/zend_list.cpp
hphp/runtime/ext_zend_compat/php-src/main/streams/plain_wrapper.cpp