+
+ return psi_plist_eles(*eles);
+}
+
+void psi_context_compile(struct psi_context *C)
+{
+ psi_context_consts_init(C);
+ psi_context_extvars_init(C);
+ psi_context_impls_init(C);
+ psi_context_decls_init(C);
+
+ /* zend_register_functions depends on EG(current_module) pointing into module */
+ EG(current_module) = zend_hash_str_find_ptr(&module_registry, "psi", sizeof("psi") - 1);
+ if (SUCCESS != zend_register_functions(NULL, C->closures, NULL, MODULE_PERSISTENT)) {
+ C->error(PSI_DATA(C), NULL, PSI_WARNING, "Failed to register functions!");
+ }
+ EG(current_module) = NULL;
+}
+
+bool psi_context_call(struct psi_context *C, zend_execute_data *execute_data, zval *return_value, struct psi_impl *impl)
+{
+ struct psi_call_frame *frame;
+
+ frame = psi_call_frame_init(C, impl->decl, impl);
+
+ if (!psi_call_frame_parse_args(frame, execute_data)) {
+ psi_call_frame_free(frame);
+
+ return false;
+ }
+
+ psi_call_frame_enter(frame);
+
+ if (!psi_call_frame_do_let(frame)) {
+ psi_call_frame_do_return(frame, return_value);
+ psi_call_frame_free(frame);
+
+ return false;
+ }
+
+ if (!psi_call_frame_do_assert(frame, PSI_ASSERT_PRE)) {
+ psi_call_frame_do_return(frame, return_value);
+ psi_call_frame_free(frame);
+
+ return false;
+ }
+
+ if (psi_call_frame_num_var_args(frame)) {
+ C->ops->call_va(frame);
+ } else {
+ C->ops->call(frame);
+ }
+
+ if (!psi_call_frame_do_assert(frame, PSI_ASSERT_POST)) {
+ psi_call_frame_do_return(frame, return_value);
+ psi_call_frame_free(frame);
+
+ return false;
+ }
+
+ psi_call_frame_do_return(frame, return_value);
+ psi_call_frame_do_set(frame);
+ psi_call_frame_do_free(frame);
+ psi_call_frame_free(frame);
+
+ return true;
+}
+
+
+void psi_context_dtor(struct psi_context *C)
+{
+ size_t i;
+ zend_function_entry *zfe;
+