+
+zend_function_entry *PSI_CompilerCompile(PSI_Compiler *C)
+{
+ size_t i, j = 0;
+ jit_type_t signature, params[] = {
+ jit_type_void_ptr,
+ jit_type_void_ptr
+ };
+ zend_function_entry *zfe = calloc(C->impls->count + 1, sizeof(*zfe));
+
+ for (i = 0; i < C->impls->count; ++i) {
+ zend_function_entry *zf;
+ PSI_ClosureData *data;
+
+ if (!C->impls->list[i]->decl) {
+ continue;
+ }
+ signature = jit_type_create_signature(jit_abi_cdecl, jit_type_void, params, 2, 1);
+
+ zf = &zfe[++j];
+ data = PSI_ClosureDataAlloc(C->context, C->impls->list[i]);
+ zf->fname = C->impls->list[i]->func->name;
+ zf->handler = jit_closure_create(C->context, signature, jit_closure_handler, data);
+ }
+
+ return zfe;
+}