Update call_user_func_array() to support collections
commit59ef8ddd154d3e7f60dd22e924af2ca1f4586d12
authorDrew Paroski <andrewparoski@fb.com>
Sun, 24 Nov 2013 11:59:13 +0000 (24 03:59 -0800)
committerSara Golemon <sgolemon@fb.com>
Wed, 27 Nov 2013 05:14:19 +0000 (26 21:14 -0800)
tree9e415bd0eda7841e1d638bc5e4bc819acb8ddc67
parent7a0b149536f34e427bf447999a3e1878a8aed108
Update call_user_func_array() to support collections

Updates call_user_func_array() to support collections for the second
parameter. Also update call_user_method_array(), hphp_create_object(),
hphp_invoke(), and hphp_invoke_method() to support collections.

In the course of implementing this, I fixed a bug with invokeFunc where it
would pass along the arg array to __call() and __callStatic() methods
without checking to make sure the arg array had integers keys 0 thru n-1.

Reviewed By: @dariorussi

Differential Revision: D1071732
33 files changed:
hphp/runtime/base/builtin-functions.cpp
hphp/runtime/base/builtin-functions.h
hphp/runtime/base/execution-context.h
hphp/runtime/base/externals.h
hphp/runtime/base/object-data.cpp
hphp/runtime/base/object-data.h
hphp/runtime/base/preg.cpp
hphp/runtime/base/string-util.cpp
hphp/runtime/base/tv-helpers.h
hphp/runtime/ext/base_vector.cpp
hphp/runtime/ext/ext_class.cpp
hphp/runtime/ext/ext_class.h
hphp/runtime/ext/ext_collections.cpp
hphp/runtime/ext/ext_function.cpp
hphp/runtime/ext/ext_function.h
hphp/runtime/ext/ext_options.cpp
hphp/runtime/ext/ext_reflection.cpp
hphp/runtime/ext/ext_reflection.h
hphp/runtime/server/transport.cpp
hphp/runtime/vm/bytecode.cpp
hphp/runtime/vm/event-hook.cpp
hphp/runtime/vm/jit/minstr-translator.cpp
hphp/runtime/vm/member-operations.h
hphp/runtime/vm/unit.cpp
hphp/system/idl/class.idl.json
hphp/system/idl/function.idl.json
hphp/system/idl/reflection.idl.json
hphp/test/quick/debug_backtrace.php
hphp/test/quick/debug_backtrace.php.expectf
hphp/test/slow/collection_classes/call-user-func-array.php [new file with mode: 0644]
hphp/test/slow/collection_classes/call-user-func-array.php.expect [new file with mode: 0644]
hphp/test/slow/reflection/1331.php
hphp/test/slow/reflection/1331.php.expect