Replace slice_array(func_get_args, C)) with hphp_func_slice_args(C)
commit44c3020a7cb5e28997dd70396e27d16c4826333a
authorSean Cannella <seanc@fb.com>
Tue, 19 Nov 2013 18:07:42 +0000 (19 10:07 -0800)
committerSara Golemon <sgolemon@fb.com>
Wed, 20 Nov 2013 22:38:45 +0000 (20 14:38 -0800)
treef5e39ca2a2a7ffa0cebb4f96f43732435e9c949a
parent47384d74268940fdc65474d61431c6c3ada745db
Replace slice_array(func_get_args, C)) with hphp_func_slice_args(C)

array_slice(func_get_args(), N) ends up making array copies that are unnecessary. Provide a new library function to deal with this pattern.

Reviewed By: @markw65

Differential Revision: D1057678
hphp/compiler/analysis/emitter.cpp
hphp/compiler/analysis/emitter.h
hphp/runtime/ext/ext_function.cpp
hphp/runtime/ext/ext_function.h
hphp/runtime/vm/event-hook.cpp
hphp/runtime/vm/jit/fixup.cpp
hphp/system/idl/function.idl.json
hphp/test/quick/func_slice_args.php [new file with mode: 0644]
hphp/test/quick/func_slice_args.php.expect [new file with mode: 0644]
hphp/test/quick/func_slice_args.php.opts [new file with mode: 0644]