From 9c5f9f70e0d207accc37c815deba011741127ccc Mon Sep 17 00:00:00 2001 From: Bill Fumerola Date: Thu, 13 Dec 2018 22:11:38 -0800 Subject: [PATCH] remove make_packed_array: SPL autoload Summary: This array never escapes into userland, trivial to convert to hack arrays. Reviewed By: ricklavoie Differential Revision: D13052687 fbshipit-source-id: 1c8d2e11761180eba7e29b5d5171dbf860ecbbda --- hphp/runtime/ext/spl/ext_spl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hphp/runtime/ext/spl/ext_spl.cpp b/hphp/runtime/ext/spl/ext_spl.cpp index 7f25680b136..a4961da3398 100644 --- a/hphp/runtime/ext/spl/ext_spl.cpp +++ b/hphp/runtime/ext/spl/ext_spl.cpp @@ -305,7 +305,7 @@ void HHVM_FUNCTION(spl_autoload_call, const String& class_name) { struct ExtensionList final : RequestEventHandler { void requestInit() override { - extensions = make_packed_array(String(".inc"), String(".php")); + extensions = make_vec_array(String(".inc"), String(".php")); } void requestShutdown() override { extensions.reset(); @@ -320,7 +320,7 @@ String HHVM_FUNCTION(spl_autoload_extensions, const String& file_extensions /* = null_string */) { if (!file_extensions.empty()) { s_extension_list->extensions = StringUtil::Explode(file_extensions, ",") - .toArray(); + .toVecArray(); return file_extensions; } return StringUtil::Implode(s_extension_list->extensions, ","); -- 2.11.4.GIT