+/**
+ * Returns the first variadic parameter index of a type.
+ * If this index was NOT set, the index of the last parameter
+ * of the method type plus one is returned for variadic functions.
+ * Non-variadic function types always return -1 here.
+ */
+int get_method_first_variadic_param_index(const type *method);
+
+/**
+ * Sets the first variadic parameter index. This allows to specify
+ * a complete call type (containing the type of all parameters)
+ * but still have the knowledge, which parameter must be passed as
+ * variadic one.
+ */
+void set_method_first_variadic_param_index(type *method, int index);
+
+/**
+ * additional method type properties:
+ * Tell about special properties of a method type. Some
+ * of these may be discovered by analyses.
+ */
+typedef enum {
+ mtp_no_property = 0x00000000, /**< no additional properties, default */
+ mtp_property_const = 0x00000001, /**< This method did not access memory and calculates
+ its return values solely from its parameters.
+ GCC: __attribute__((const)). */
+ mtp_property_pure = 0x00000002, /**< This method did NOT write to memory and calculates
+ its return values solely form its parameters and
+ the memory they points to (or global vars).
+ GCC: __attribute__((pure)). */
+ mtp_property_noreturn = 0x00000004, /**< This method did not return due to an aborting system
+ call.
+ GCC: __attribute__((noreturn)). */
+ mtp_property_nothrow = 0x00000008, /**< This method cannot throw an exception.
+ GCC: __attribute__((nothrow)). */
+ mtp_property_naked = 0x00000010, /**< This method is naked.
+ GCC: __attribute__((naked)). */
+ mtp_property_malloc = 0x00000020, /**< This method returns newly allocate memory.
+ GCC: __attribute__((malloc)). */
+ mtp_property_inherited = 0x40000000 /**< used only in irg's, means property is inherited
+ from type. */
+} mtp_additional_property;
+
+/** Returns the mask of the additional graph properties. */
+unsigned get_method_additional_properties(const type *method);
+
+/** Sets the mask of the additional graph properties. */
+void set_method_additional_properties(type *method, unsigned property_mask);
+
+/** Sets one additional graph property. */
+void set_method_additional_property(type *method, mtp_additional_property flag);
+
+/**
+ * calling conventions
+ */
+typedef enum {
+ cc_reg_param = 0x00000001, /**< Transmit parameters in registers, else the stack is used.
+ This flag may be set as default on some architectures. */
+ cc_last_on_top = 0x00000002, /**< The last non-register parameter is transmitted on top of
+ the stack. This is equivalent to the stdcall or pascal
+ calling convention. If this flag is not set, the first
+ non-register parameter is used (cdecl calling convention) */
+ cc_callee_clear_stk = 0x00000004, /**< The callee clears the stack. This forbids variadic
+ function calls (stdcall). */
+ cc_this_call = 0x00000008 /**< The first parameter is a this pointer and is transmitted
+ in a special way. */
+} calling_convention;
+
+/**
+ * check for the CDECL calling convention
+ */
+#define IS_CDECL(cc_mask) (((cc_mask) & (cc_callee_clear_stk|cc_last_on_top)) == 0)
+
+/**
+ * check for the STDCALL calling convention
+ */
+#define IS_STDCALL(cc_mask) (((cc_mask) & (cc_callee_clear_stk|cc_last_on_top)) == cc_callee_clear_stk)
+
+/**
+ * add the CDECL convention bits
+ */
+#define SET_CDECL(cc_mask) ((cc_mask) & ~(cc_callee_clear_stk|cc_last_on_top))