Convert a few tvFoo functions to take parameters by reference
commit8220a180602869b513fddb0896fee55101a53059
authorJordan DeLong <jdelong@fb.com>
Fri, 28 Jun 2013 20:41:13 +0000 (28 13:41 -0700)
committerSara Golemon <sgolemon@fb.com>
Mon, 1 Jul 2013 20:41:00 +0000 (1 13:41 -0700)
tree5aa02d9eccaba2c661cac6a32d1a2339a4176905
parent97a23e5ea7e87483c1b33253647085a640c7d903
Convert a few tvFoo functions to take parameters by reference

Since TypedValue::operator= is dangerous, something like
tvTeleport is usually what you want to use, but it doesn't work with
temporary TypedValues (e.g. return values of things like make_tv or
cellAdd), because it took the arguments by pointer.  This also means
we can change it to take parameters by value later without updating
callsites.  This diff does the tvDup family and changes tvTeleport to
tvCopy.  I'll gradually get the other ones done, but I just need these
for now to work with temporaries for changing SetOp to not use Variant
arithmetic.
18 files changed:
hphp/runtime/base/array/array_iterator.cpp
hphp/runtime/base/array/hphp_array.cpp
hphp/runtime/base/array/sort_helpers.h
hphp/runtime/base/object_data.cpp
hphp/runtime/base/tv_helpers.cpp
hphp/runtime/base/tv_helpers.h
hphp/runtime/ext/asio/waitable_wait_handle.cpp
hphp/runtime/ext/ext_array.cpp
hphp/runtime/ext/ext_collections.cpp
hphp/runtime/ext/ext_collections.h
hphp/runtime/vm/bytecode.cpp
hphp/runtime/vm/bytecode.h
hphp/runtime/vm/class.cpp
hphp/runtime/vm/event_hook.cpp
hphp/runtime/vm/instance.cpp
hphp/runtime/vm/jit/vectortranslator.cpp
hphp/runtime/vm/member_operations.h
hphp/runtime/vm/runtime.cpp