pe*alloc
[m6w6/ext-psi] / src / types.h
index 5497880fb60b7c1f99ffc936dde6dd592477ab87..e0c4b07106901079abd372701e4dfa634b8899b5 100644 (file)
 #include "types/decl_arg.h"
 #include "types/decl_abi.h"
 #include "types/decl.h"
+#include "types/decl_extvar.h"
 #include "types/decl_struct.h"
 #include "types/decl_union.h"
 #include "types/impl_type.h"
 #include "types/impl_var.h"
 #include "types/impl_def_val.h"
-#include "types/const_type.h"
 #include "types/const.h"
 #include "types/impl_arg.h"
 #include "types/impl_func.h"
@@ -55,6 +55,7 @@
 #include "types/set_exp.h"
 #include "types/set_stmt.h"
 #include "types/return_stmt.h"
+#include "types/return_exp.h"
 #include "types/free_stmt.h"
 #include "types/impl.h"
 #include "types/decl_file.h"
@@ -62,6 +63,9 @@
 #include "types/free_stmt.h"
 #include "types/assert_stmt.h"
 #include "types/layout.h"
+#include "types/cpp_exp.h"
+#include "types/cpp_macro_call.h"
+#include "types/cpp_macro_decl.h"
 
 static inline impl_val *deref_impl_val(impl_val *ret_val, struct psi_decl_var *var) {
        unsigned i;
@@ -69,7 +73,7 @@ static inline impl_val *deref_impl_val(impl_val *ret_val, struct psi_decl_var *v
        ZEND_ASSERT(!var->arg || var->arg->var != var);
 #if 0
        fprintf(stderr, "deref: %s pl=%u:%u as=%u:%u %p\n",
-                       var->name, var->pointer_level, var->arg->var->pointer_level,
+                       var->name->val, var->pointer_level, var->arg->var->pointer_level,
                        var->array_size, var->arg->var->array_size, ret_val);
 #endif
        for (i = 0; i < var->pointer_level; ++i) {
@@ -81,39 +85,4 @@ static inline impl_val *deref_impl_val(impl_val *ret_val, struct psi_decl_var *v
        return ret_val;
 }
 
-static inline impl_val *enref_impl_val(void *ptr, struct psi_decl_var *var) {
-       impl_val *val, *val_ptr;
-       unsigned i;
-
-       ZEND_ASSERT(var->arg->var == var);
-#if 0
-       fprintf(stderr, "enref: %s pl=%u:%u as=%u:%u\n",
-                       var->name, var->pointer_level, var->arg->var->pointer_level,
-                       var->array_size, var->arg->var->array_size);
-#endif
-       if (!var->pointer_level ){//&& real_decl_type(var->arg->type)->type != PSI_T_STRUCT) {
-               return ptr;
-       }
-
-       val = calloc(var->pointer_level + 1, sizeof(void *));
-       val_ptr = val;
-       for (i = !var->arg->var->array_size; i < var->pointer_level; ++i) {
-#if 0
-               fprintf(stderr, "++\n");
-#endif
-               val_ptr->ptr = (void **) val_ptr + 1;
-               val_ptr = val_ptr->ptr;
-       }
-       val_ptr->ptr = ptr;
-       return val;
-}
-
-static inline impl_val *struct_member_ref(struct psi_decl_arg *set_arg, impl_val *struct_ptr, impl_val **to_free) {
-       void *ptr = (char *) struct_ptr + set_arg->layout->pos;
-#if 0
-       fprintf(stderr, "struct member %s: %p\n", set_arg->var->name, ptr);
-#endif
-       return ptr;
-}
-
 #endif