/* valaccodearraymodule.c generated by valac, the Vala compiler * generated from valaccodearraymodule.vala, do not modify */ /* valaccodearraymodule.vala * * Copyright (C) 2006-2010 Jürg Billeter * Copyright (C) 2006-2008 Raffaele Sandrini * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Author: * Jürg Billeter * Raffaele Sandrini */ #include #include #include #include #include #include #include #include #include #define VALA_TYPE_CCODE_BASE_MODULE (vala_ccode_base_module_get_type ()) #define VALA_CCODE_BASE_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CCODE_BASE_MODULE, ValaCCodeBaseModule)) #define VALA_CCODE_BASE_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CCODE_BASE_MODULE, ValaCCodeBaseModuleClass)) #define VALA_IS_CCODE_BASE_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CCODE_BASE_MODULE)) #define VALA_IS_CCODE_BASE_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CCODE_BASE_MODULE)) #define VALA_CCODE_BASE_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CCODE_BASE_MODULE, ValaCCodeBaseModuleClass)) typedef struct _ValaCCodeBaseModule ValaCCodeBaseModule; typedef struct _ValaCCodeBaseModuleClass ValaCCodeBaseModuleClass; typedef struct _ValaCCodeBaseModulePrivate ValaCCodeBaseModulePrivate; #define VALA_CCODE_BASE_MODULE_TYPE_EMIT_CONTEXT (vala_ccode_base_module_emit_context_get_type ()) #define VALA_CCODE_BASE_MODULE_EMIT_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_CCODE_BASE_MODULE_TYPE_EMIT_CONTEXT, ValaCCodeBaseModuleEmitContext)) #define VALA_CCODE_BASE_MODULE_EMIT_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_CCODE_BASE_MODULE_TYPE_EMIT_CONTEXT, ValaCCodeBaseModuleEmitContextClass)) #define VALA_CCODE_BASE_MODULE_IS_EMIT_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_CCODE_BASE_MODULE_TYPE_EMIT_CONTEXT)) #define VALA_CCODE_BASE_MODULE_IS_EMIT_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_CCODE_BASE_MODULE_TYPE_EMIT_CONTEXT)) #define VALA_CCODE_BASE_MODULE_EMIT_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_CCODE_BASE_MODULE_TYPE_EMIT_CONTEXT, ValaCCodeBaseModuleEmitContextClass)) typedef struct _ValaCCodeBaseModuleEmitContext ValaCCodeBaseModuleEmitContext; typedef struct _ValaCCodeBaseModuleEmitContextClass ValaCCodeBaseModuleEmitContextClass; #define VALA_TYPE_CCODE_STRUCT_MODULE (vala_ccode_struct_module_get_type ()) #define VALA_CCODE_STRUCT_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CCODE_STRUCT_MODULE, ValaCCodeStructModule)) #define VALA_CCODE_STRUCT_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CCODE_STRUCT_MODULE, ValaCCodeStructModuleClass)) #define VALA_IS_CCODE_STRUCT_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CCODE_STRUCT_MODULE)) #define VALA_IS_CCODE_STRUCT_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CCODE_STRUCT_MODULE)) #define VALA_CCODE_STRUCT_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CCODE_STRUCT_MODULE, ValaCCodeStructModuleClass)) typedef struct _ValaCCodeStructModule ValaCCodeStructModule; typedef struct _ValaCCodeStructModuleClass ValaCCodeStructModuleClass; typedef struct _ValaCCodeStructModulePrivate ValaCCodeStructModulePrivate; #define VALA_TYPE_CCODE_METHOD_MODULE (vala_ccode_method_module_get_type ()) #define VALA_CCODE_METHOD_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CCODE_METHOD_MODULE, ValaCCodeMethodModule)) #define VALA_CCODE_METHOD_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CCODE_METHOD_MODULE, ValaCCodeMethodModuleClass)) #define VALA_IS_CCODE_METHOD_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CCODE_METHOD_MODULE)) #define VALA_IS_CCODE_METHOD_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CCODE_METHOD_MODULE)) #define VALA_CCODE_METHOD_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CCODE_METHOD_MODULE, ValaCCodeMethodModuleClass)) typedef struct _ValaCCodeMethodModule ValaCCodeMethodModule; typedef struct _ValaCCodeMethodModuleClass ValaCCodeMethodModuleClass; typedef struct _ValaCCodeMethodModulePrivate ValaCCodeMethodModulePrivate; #define VALA_TYPE_CCODE_CONTROL_FLOW_MODULE (vala_ccode_control_flow_module_get_type ()) #define VALA_CCODE_CONTROL_FLOW_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CCODE_CONTROL_FLOW_MODULE, ValaCCodeControlFlowModule)) #define VALA_CCODE_CONTROL_FLOW_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CCODE_CONTROL_FLOW_MODULE, ValaCCodeControlFlowModuleClass)) #define VALA_IS_CCODE_CONTROL_FLOW_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CCODE_CONTROL_FLOW_MODULE)) #define VALA_IS_CCODE_CONTROL_FLOW_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CCODE_CONTROL_FLOW_MODULE)) #define VALA_CCODE_CONTROL_FLOW_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CCODE_CONTROL_FLOW_MODULE, ValaCCodeControlFlowModuleClass)) typedef struct _ValaCCodeControlFlowModule ValaCCodeControlFlowModule; typedef struct _ValaCCodeControlFlowModuleClass ValaCCodeControlFlowModuleClass; typedef struct _ValaCCodeControlFlowModulePrivate ValaCCodeControlFlowModulePrivate; #define VALA_TYPE_CCODE_MEMBER_ACCESS_MODULE (vala_ccode_member_access_module_get_type ()) #define VALA_CCODE_MEMBER_ACCESS_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CCODE_MEMBER_ACCESS_MODULE, ValaCCodeMemberAccessModule)) #define VALA_CCODE_MEMBER_ACCESS_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CCODE_MEMBER_ACCESS_MODULE, ValaCCodeMemberAccessModuleClass)) #define VALA_IS_CCODE_MEMBER_ACCESS_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CCODE_MEMBER_ACCESS_MODULE)) #define VALA_IS_CCODE_MEMBER_ACCESS_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CCODE_MEMBER_ACCESS_MODULE)) #define VALA_CCODE_MEMBER_ACCESS_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CCODE_MEMBER_ACCESS_MODULE, ValaCCodeMemberAccessModuleClass)) typedef struct _ValaCCodeMemberAccessModule ValaCCodeMemberAccessModule; typedef struct _ValaCCodeMemberAccessModuleClass ValaCCodeMemberAccessModuleClass; typedef struct _ValaCCodeMemberAccessModulePrivate ValaCCodeMemberAccessModulePrivate; #define VALA_TYPE_CCODE_ASSIGNMENT_MODULE (vala_ccode_assignment_module_get_type ()) #define VALA_CCODE_ASSIGNMENT_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CCODE_ASSIGNMENT_MODULE, ValaCCodeAssignmentModule)) #define VALA_CCODE_ASSIGNMENT_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CCODE_ASSIGNMENT_MODULE, ValaCCodeAssignmentModuleClass)) #define VALA_IS_CCODE_ASSIGNMENT_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CCODE_ASSIGNMENT_MODULE)) #define VALA_IS_CCODE_ASSIGNMENT_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CCODE_ASSIGNMENT_MODULE)) #define VALA_CCODE_ASSIGNMENT_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CCODE_ASSIGNMENT_MODULE, ValaCCodeAssignmentModuleClass)) typedef struct _ValaCCodeAssignmentModule ValaCCodeAssignmentModule; typedef struct _ValaCCodeAssignmentModuleClass ValaCCodeAssignmentModuleClass; typedef struct _ValaCCodeAssignmentModulePrivate ValaCCodeAssignmentModulePrivate; #define VALA_TYPE_CCODE_METHOD_CALL_MODULE (vala_ccode_method_call_module_get_type ()) #define VALA_CCODE_METHOD_CALL_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CCODE_METHOD_CALL_MODULE, ValaCCodeMethodCallModule)) #define VALA_CCODE_METHOD_CALL_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CCODE_METHOD_CALL_MODULE, ValaCCodeMethodCallModuleClass)) #define VALA_IS_CCODE_METHOD_CALL_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CCODE_METHOD_CALL_MODULE)) #define VALA_IS_CCODE_METHOD_CALL_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CCODE_METHOD_CALL_MODULE)) #define VALA_CCODE_METHOD_CALL_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CCODE_METHOD_CALL_MODULE, ValaCCodeMethodCallModuleClass)) typedef struct _ValaCCodeMethodCallModule ValaCCodeMethodCallModule; typedef struct _ValaCCodeMethodCallModuleClass ValaCCodeMethodCallModuleClass; typedef struct _ValaCCodeMethodCallModulePrivate ValaCCodeMethodCallModulePrivate; #define VALA_TYPE_CCODE_ARRAY_MODULE (vala_ccode_array_module_get_type ()) #define VALA_CCODE_ARRAY_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CCODE_ARRAY_MODULE, ValaCCodeArrayModule)) #define VALA_CCODE_ARRAY_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CCODE_ARRAY_MODULE, ValaCCodeArrayModuleClass)) #define VALA_IS_CCODE_ARRAY_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CCODE_ARRAY_MODULE)) #define VALA_IS_CCODE_ARRAY_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CCODE_ARRAY_MODULE)) #define VALA_CCODE_ARRAY_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CCODE_ARRAY_MODULE, ValaCCodeArrayModuleClass)) typedef struct _ValaCCodeArrayModule ValaCCodeArrayModule; typedef struct _ValaCCodeArrayModuleClass ValaCCodeArrayModuleClass; typedef struct _ValaCCodeArrayModulePrivate ValaCCodeArrayModulePrivate; #define _vala_ccode_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_ccode_node_unref (var), NULL))) #define _g_free0(var) (var = (g_free (var), NULL)) #define _vala_code_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_node_unref (var), NULL))) #define _vala_iterable_unref0(var) ((var == NULL) ? NULL : (var = (vala_iterable_unref (var), NULL))) #define VALA_TYPE_GLIB_VALUE (vala_glib_value_get_type ()) #define VALA_GLIB_VALUE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_GLIB_VALUE, ValaGLibValue)) #define VALA_GLIB_VALUE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_GLIB_VALUE, ValaGLibValueClass)) #define VALA_IS_GLIB_VALUE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_GLIB_VALUE)) #define VALA_IS_GLIB_VALUE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_GLIB_VALUE)) #define VALA_GLIB_VALUE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_GLIB_VALUE, ValaGLibValueClass)) typedef struct _ValaGLibValue ValaGLibValue; typedef struct _ValaGLibValueClass ValaGLibValueClass; typedef struct _ValaGLibValuePrivate ValaGLibValuePrivate; #define _vala_target_value_unref0(var) ((var == NULL) ? NULL : (var = (vala_target_value_unref (var), NULL))) #define _vala_ccode_base_module_emit_context_unref0(var) ((var == NULL) ? NULL : (var = (vala_ccode_base_module_emit_context_unref (var), NULL))) struct _ValaCCodeBaseModule { ValaCodeGenerator parent_instance; ValaCCodeBaseModulePrivate * priv; ValaSymbol* root_symbol; ValaCCodeBaseModuleEmitContext* emit_context; ValaCCodeLineDirective* current_line; ValaCCodeFile* header_file; ValaCCodeFile* internal_header_file; ValaCCodeFile* cfile; ValaCCodeBaseModuleEmitContext* class_init_context; ValaCCodeBaseModuleEmitContext* base_init_context; ValaCCodeBaseModuleEmitContext* class_finalize_context; ValaCCodeBaseModuleEmitContext* base_finalize_context; ValaCCodeBaseModuleEmitContext* instance_init_context; ValaCCodeBaseModuleEmitContext* instance_finalize_context; ValaCCodeStruct* param_spec_struct; ValaCCodeStruct* closure_struct; ValaCCodeEnum* prop_enum; ValaSet* user_marshal_set; ValaSet* predefined_marshal_set; gint next_regex_id; gint next_coroutine_state; ValaDataType* void_type; ValaDataType* bool_type; ValaDataType* char_type; ValaDataType* uchar_type; ValaDataType* unichar_type; ValaDataType* short_type; ValaDataType* ushort_type; ValaDataType* int_type; ValaDataType* uint_type; ValaDataType* long_type; ValaDataType* ulong_type; ValaDataType* int8_type; ValaDataType* uint8_type; ValaDataType* int16_type; ValaDataType* uint16_type; ValaDataType* int32_type; ValaDataType* uint32_type; ValaDataType* int64_type; ValaDataType* uint64_type; ValaDataType* string_type; ValaDataType* regex_type; ValaDataType* float_type; ValaDataType* double_type; ValaTypeSymbol* gtype_type; ValaTypeSymbol* gobject_type; ValaErrorType* gerror_type; ValaClass* glist_type; ValaClass* gslist_type; ValaClass* gnode_type; ValaClass* gqueue_type; ValaClass* gvaluearray_type; ValaTypeSymbol* gstringbuilder_type; ValaTypeSymbol* garray_type; ValaTypeSymbol* gbytearray_type; ValaTypeSymbol* gptrarray_type; ValaTypeSymbol* gthreadpool_type; ValaDataType* gdestroynotify_type; ValaDataType* gquark_type; ValaStruct* gvalue_type; ValaClass* gvariant_type; ValaStruct* mutex_type; ValaTypeSymbol* type_module_type; ValaTypeSymbol* dbus_proxy_type; gboolean in_plugin; gchar* module_init_param_name; gboolean gvaluecollector_h_needed; gboolean requires_array_free; gboolean requires_array_move; gboolean requires_array_length; ValaSet* wrappers; }; struct _ValaCCodeBaseModuleClass { ValaCodeGeneratorClass parent_class; void (*append_vala_array_free) (ValaCCodeBaseModule* self); void (*append_vala_array_move) (ValaCCodeBaseModule* self); void (*append_vala_array_length) (ValaCCodeBaseModule* self); gboolean (*generate_enum_declaration) (ValaCCodeBaseModule* self, ValaEnum* en, ValaCCodeFile* decl_space); void (*generate_class_struct_declaration) (ValaCCodeBaseModule* self, ValaClass* cl, ValaCCodeFile* decl_space); void (*generate_struct_declaration) (ValaCCodeBaseModule* self, ValaStruct* st, ValaCCodeFile* decl_space); void (*generate_delegate_declaration) (ValaCCodeBaseModule* self, ValaDelegate* d, ValaCCodeFile* decl_space); void (*generate_cparameters) (ValaCCodeBaseModule* self, ValaMethod* m, ValaCCodeFile* decl_space, ValaMap* cparam_map, ValaCCodeFunction* func, ValaCCodeFunctionDeclarator* vdeclarator, ValaMap* carg_map, ValaCCodeFunctionCall* vcall, gint direction); ValaCCodeExpression* (*get_dup_func_expression) (ValaCCodeBaseModule* self, ValaDataType* type, ValaSourceReference* source_reference, gboolean is_chainup); gchar* (*append_struct_array_free) (ValaCCodeBaseModule* self, ValaStruct* st); ValaCCodeExpression* (*destroy_value) (ValaCCodeBaseModule* self, ValaTargetValue* value, gboolean is_macro_definition); void (*append_scope_free) (ValaCCodeBaseModule* self, ValaSymbol* sym, ValaCodeNode* stop_at); ValaTargetValue* (*get_local_cvalue) (ValaCCodeBaseModule* self, ValaLocalVariable* local); ValaTargetValue* (*get_parameter_cvalue) (ValaCCodeBaseModule* self, ValaParameter* param); ValaTargetValue* (*get_field_cvalue) (ValaCCodeBaseModule* self, ValaField* field, ValaTargetValue* instance); ValaTargetValue* (*load_variable) (ValaCCodeBaseModule* self, ValaVariable* variable, ValaTargetValue* value); ValaTargetValue* (*load_this_parameter) (ValaCCodeBaseModule* self, ValaTypeSymbol* sym); void (*store_value) (ValaCCodeBaseModule* self, ValaTargetValue* lvalue, ValaTargetValue* value); gchar* (*get_delegate_target_cname) (ValaCCodeBaseModule* self, const gchar* delegate_cname); ValaCCodeExpression* (*get_delegate_target_cexpression) (ValaCCodeBaseModule* self, ValaExpression* delegate_expr, ValaCCodeExpression** delegate_target_destroy_notify); ValaCCodeExpression* (*get_delegate_target_cvalue) (ValaCCodeBaseModule* self, ValaTargetValue* value); ValaCCodeExpression* (*get_delegate_target_destroy_notify_cvalue) (ValaCCodeBaseModule* self, ValaTargetValue* value); gchar* (*get_delegate_target_destroy_notify_cname) (ValaCCodeBaseModule* self, const gchar* delegate_cname); ValaTargetValue* (*copy_value) (ValaCCodeBaseModule* self, ValaTargetValue* value, ValaCodeNode* node); void (*generate_class_declaration) (ValaCCodeBaseModule* self, ValaClass* cl, ValaCCodeFile* decl_space); void (*generate_interface_declaration) (ValaCCodeBaseModule* self, ValaInterface* iface, ValaCCodeFile* decl_space); void (*generate_method_declaration) (ValaCCodeBaseModule* self, ValaMethod* m, ValaCCodeFile* decl_space); void (*generate_error_domain_declaration) (ValaCCodeBaseModule* self, ValaErrorDomain* edomain, ValaCCodeFile* decl_space); ValaCCodeExpression* (*deserialize_expression) (ValaCCodeBaseModule* self, ValaDataType* type, ValaCCodeExpression* variant_expr, ValaCCodeExpression* expr, ValaCCodeExpression* error_expr, gboolean* may_fail); ValaCCodeExpression* (*serialize_expression) (ValaCCodeBaseModule* self, ValaDataType* type, ValaCCodeExpression* expr); ValaCCodeExpression* (*get_implicit_cast_expression) (ValaCCodeBaseModule* self, ValaCCodeExpression* source_cexpr, ValaDataType* expression_type, ValaDataType* target_type, ValaCodeNode* node); void (*create_type_check_statement) (ValaCCodeBaseModule* self, ValaCodeNode* method_node, ValaDataType* ret_type, ValaTypeSymbol* t, gboolean non_null, const gchar* var_name); gboolean (*is_gobject_property) (ValaCCodeBaseModule* self, ValaProperty* prop); void (*generate_dynamic_method_wrapper) (ValaCCodeBaseModule* self, ValaDynamicMethod* method); gboolean (*method_has_wrapper) (ValaCCodeBaseModule* self, ValaMethod* method); ValaCCodeFunctionCall* (*get_param_spec) (ValaCCodeBaseModule* self, ValaProperty* prop); ValaCCodeFunctionCall* (*get_signal_creation) (ValaCCodeBaseModule* self, ValaSignal* sig, ValaTypeSymbol* type); void (*register_dbus_info) (ValaCCodeBaseModule* self, ValaCCodeBlock* block, ValaObjectTypeSymbol* bindable); gchar* (*get_dynamic_property_getter_cname) (ValaCCodeBaseModule* self, ValaDynamicProperty* node); gchar* (*get_dynamic_property_setter_cname) (ValaCCodeBaseModule* self, ValaDynamicProperty* node); gchar* (*get_dynamic_signal_cname) (ValaCCodeBaseModule* self, ValaDynamicSignal* node); gchar* (*get_dynamic_signal_connect_wrapper_name) (ValaCCodeBaseModule* self, ValaDynamicSignal* node); gchar* (*get_dynamic_signal_connect_after_wrapper_name) (ValaCCodeBaseModule* self, ValaDynamicSignal* node); gchar* (*get_dynamic_signal_disconnect_wrapper_name) (ValaCCodeBaseModule* self, ValaDynamicSignal* node); gchar* (*get_array_length_cname) (ValaCCodeBaseModule* self, const gchar* array_cname, gint dim); gchar* (*get_parameter_array_length_cname) (ValaCCodeBaseModule* self, ValaParameter* param, gint dim); ValaCCodeExpression* (*get_array_length_cexpression) (ValaCCodeBaseModule* self, ValaExpression* array_expr, gint dim); ValaCCodeExpression* (*get_array_length_cvalue) (ValaCCodeBaseModule* self, ValaTargetValue* value, gint dim); gchar* (*get_array_size_cname) (ValaCCodeBaseModule* self, const gchar* array_cname); void (*add_simple_check) (ValaCCodeBaseModule* self, ValaCodeNode* node, gboolean always_fails); gchar* (*generate_ready_function) (ValaCCodeBaseModule* self, ValaMethod* m); }; struct _ValaCCodeStructModule { ValaCCodeBaseModule parent_instance; ValaCCodeStructModulePrivate * priv; }; struct _ValaCCodeStructModuleClass { ValaCCodeBaseModuleClass parent_class; }; struct _ValaCCodeMethodModule { ValaCCodeStructModule parent_instance; ValaCCodeMethodModulePrivate * priv; }; struct _ValaCCodeMethodModuleClass { ValaCCodeStructModuleClass parent_class; void (*generate_method_result_declaration) (ValaCCodeMethodModule* self, ValaMethod* m, ValaCCodeFile* decl_space, ValaCCodeFunction* cfunc, ValaMap* cparam_map, ValaMap* carg_map); ValaCCodeParameter* (*generate_parameter) (ValaCCodeMethodModule* self, ValaParameter* param, ValaCCodeFile* decl_space, ValaMap* cparam_map, ValaMap* carg_map); }; struct _ValaCCodeControlFlowModule { ValaCCodeMethodModule parent_instance; ValaCCodeControlFlowModulePrivate * priv; }; struct _ValaCCodeControlFlowModuleClass { ValaCCodeMethodModuleClass parent_class; }; struct _ValaCCodeMemberAccessModule { ValaCCodeControlFlowModule parent_instance; ValaCCodeMemberAccessModulePrivate * priv; }; struct _ValaCCodeMemberAccessModuleClass { ValaCCodeControlFlowModuleClass parent_class; }; struct _ValaCCodeAssignmentModule { ValaCCodeMemberAccessModule parent_instance; ValaCCodeAssignmentModulePrivate * priv; }; struct _ValaCCodeAssignmentModuleClass { ValaCCodeMemberAccessModuleClass parent_class; }; struct _ValaCCodeMethodCallModule { ValaCCodeAssignmentModule parent_instance; ValaCCodeMethodCallModulePrivate * priv; }; struct _ValaCCodeMethodCallModuleClass { ValaCCodeAssignmentModuleClass parent_class; }; struct _ValaCCodeArrayModule { ValaCCodeMethodCallModule parent_instance; ValaCCodeArrayModulePrivate * priv; }; struct _ValaCCodeArrayModuleClass { ValaCCodeMethodCallModuleClass parent_class; }; struct _ValaCCodeArrayModulePrivate { gint next_array_dup_id; gint next_array_add_id; }; struct _ValaGLibValue { ValaTargetValue parent_instance; ValaGLibValuePrivate * priv; ValaCCodeExpression* cvalue; gboolean lvalue; gboolean non_null; gchar* ctype; ValaList* array_length_cvalues; ValaCCodeExpression* array_size_cvalue; gboolean array_null_terminated; ValaCCodeExpression* array_length_cexpr; ValaCCodeExpression* delegate_target_cvalue; ValaCCodeExpression* delegate_target_destroy_notify_cvalue; }; struct _ValaGLibValueClass { ValaTargetValueClass parent_class; }; static gpointer vala_ccode_array_module_parent_class = NULL; GType vala_ccode_base_module_get_type (void) G_GNUC_CONST; gpointer vala_ccode_base_module_emit_context_ref (gpointer instance); void vala_ccode_base_module_emit_context_unref (gpointer instance); GParamSpec* vala_ccode_base_module_param_spec_emit_context (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); void vala_ccode_base_module_value_set_emit_context (GValue* value, gpointer v_object); void vala_ccode_base_module_value_take_emit_context (GValue* value, gpointer v_object); gpointer vala_ccode_base_module_value_get_emit_context (const GValue* value); GType vala_ccode_base_module_emit_context_get_type (void) G_GNUC_CONST; GType vala_ccode_struct_module_get_type (void) G_GNUC_CONST; GType vala_ccode_method_module_get_type (void) G_GNUC_CONST; GType vala_ccode_control_flow_module_get_type (void) G_GNUC_CONST; GType vala_ccode_member_access_module_get_type (void) G_GNUC_CONST; GType vala_ccode_assignment_module_get_type (void) G_GNUC_CONST; GType vala_ccode_method_call_module_get_type (void) G_GNUC_CONST; GType vala_ccode_array_module_get_type (void) G_GNUC_CONST; #define VALA_CCODE_ARRAY_MODULE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), VALA_TYPE_CCODE_ARRAY_MODULE, ValaCCodeArrayModulePrivate)) enum { VALA_CCODE_ARRAY_MODULE_DUMMY_PROPERTY }; static void vala_ccode_array_module_append_initializer_list (ValaCCodeArrayModule* self, ValaCCodeExpression* name_cnode, ValaInitializerList* initializer_list, gint rank, gint* i); ValaCCodeFunction* vala_ccode_base_module_get_ccode (ValaCCodeBaseModule* self); ValaCCodeExpression* vala_ccode_base_module_get_cvalue (ValaCCodeBaseModule* self, ValaExpression* expr); static void vala_ccode_array_module_real_visit_array_creation_expression (ValaCodeVisitor* base, ValaArrayCreationExpression* expr); ValaLocalVariable* vala_ccode_base_module_get_temp_variable (ValaCCodeBaseModule* self, ValaDataType* type, gboolean value_owned, ValaCodeNode* node_reference, gboolean init); ValaCCodeExpression* vala_ccode_base_module_get_variable_cexpression (ValaCCodeBaseModule* self, const gchar* name); void vala_ccode_base_module_emit_temp_var (ValaCCodeBaseModule* self, ValaLocalVariable* local); void vala_ccode_base_module_set_cvalue (ValaCCodeBaseModule* self, ValaExpression* expr, ValaCCodeExpression* cvalue); ValaCodeContext* vala_ccode_base_module_get_context (ValaCCodeBaseModule* self); gchar* vala_ccode_base_module_get_ccode_name (ValaCodeNode* node); void vala_ccode_base_module_append_array_length (ValaCCodeBaseModule* self, ValaExpression* expr, ValaCCodeExpression* size); static gchar* vala_ccode_array_module_real_get_array_length_cname (ValaCCodeBaseModule* base, const gchar* array_cname, gint dim); static gchar* vala_ccode_array_module_real_get_parameter_array_length_cname (ValaCCodeBaseModule* base, ValaParameter* param, gint dim); gchar* vala_ccode_base_module_get_ccode_array_length_name (ValaCodeNode* node); gchar* vala_ccode_base_module_get_array_length_cname (ValaCCodeBaseModule* self, const gchar* array_cname, gint dim); gchar* vala_ccode_base_module_get_variable_cname (ValaCCodeBaseModule* self, const gchar* name); static ValaCCodeExpression* vala_ccode_array_module_real_get_array_length_cexpression (ValaCCodeBaseModule* base, ValaExpression* array_expr, gint dim); ValaCCodeExpression* vala_ccode_base_module_get_array_length_cvalue (ValaCCodeBaseModule* self, ValaTargetValue* value, gint dim); static ValaCCodeExpression* vala_ccode_array_module_real_get_array_length_cvalue (ValaCCodeBaseModule* base, ValaTargetValue* value, gint dim); GType vala_glib_value_get_type (void) G_GNUC_CONST; static gchar* vala_ccode_array_module_real_get_array_size_cname (ValaCCodeBaseModule* base, const gchar* array_cname); static void vala_ccode_array_module_real_visit_element_access (ValaCodeVisitor* base, ValaElementAccess* expr); ValaCCodeExpression* vala_ccode_base_module_get_array_length_cexpression (ValaCCodeBaseModule* self, ValaExpression* array_expr, gint dim); ValaTargetValue* vala_ccode_base_module_store_temp_value (ValaCCodeBaseModule* self, ValaTargetValue* initializer, ValaCodeNode* node_reference, gboolean* value_owned); static void vala_ccode_array_module_real_visit_slice_expression (ValaCodeVisitor* base, ValaSliceExpression* expr); static void vala_ccode_array_module_append_struct_array_free_loop (ValaCCodeArrayModule* self, ValaStruct* st); ValaCCodeExpression* vala_ccode_base_module_get_destroy_func_expression (ValaCCodeBaseModule* self, ValaDataType* type, gboolean is_chainup); static gchar* vala_ccode_array_module_real_append_struct_array_free (ValaCCodeBaseModule* base, ValaStruct* st); void vala_ccode_base_module_push_function (ValaCCodeBaseModule* self, ValaCCodeFunction* func); void vala_ccode_base_module_pop_function (ValaCCodeBaseModule* self); static void vala_ccode_array_module_append_vala_array_free_loop (ValaCCodeArrayModule* self); static void vala_ccode_array_module_real_append_vala_array_free (ValaCCodeBaseModule* base); static void vala_ccode_array_module_real_append_vala_array_move (ValaCCodeBaseModule* base); static void vala_ccode_array_module_real_append_vala_array_length (ValaCCodeBaseModule* base); static ValaTargetValue* vala_ccode_array_module_real_copy_value (ValaCCodeBaseModule* base, ValaTargetValue* value, ValaCodeNode* node); ValaCCodeExpression* vala_ccode_base_module_get_cvalue_ (ValaCCodeBaseModule* self, ValaTargetValue* value); ValaTargetValue* vala_ccode_base_module_copy_value (ValaCCodeBaseModule* self, ValaTargetValue* value, ValaCodeNode* node); ValaTargetValue* vala_ccode_base_module_create_temp_value (ValaCCodeBaseModule* self, ValaDataType* type, gboolean init, ValaCodeNode* node_reference, gboolean* value_owned); static gchar* vala_ccode_array_module_generate_array_copy_wrapper (ValaCCodeArrayModule* self, ValaArrayType* array_type); static ValaCCodeExpression* vala_ccode_array_module_real_get_dup_func_expression (ValaCCodeBaseModule* base, ValaDataType* type, ValaSourceReference* source_reference, gboolean is_chainup); static gchar* vala_ccode_array_module_generate_array_dup_wrapper (ValaCCodeArrayModule* self, ValaArrayType* array_type); ValaCCodeExpression* vala_ccode_base_module_get_dup_func_expression (ValaCCodeBaseModule* self, ValaDataType* type, ValaSourceReference* source_reference, gboolean is_chainup); static ValaCCodeExpression* vala_ccode_array_module_real_destroy_value (ValaCCodeBaseModule* base, ValaTargetValue* value, gboolean is_macro_definition); ValaCCodeExpression* vala_ccode_base_module_destroy_value (ValaCCodeBaseModule* self, ValaTargetValue* value, gboolean is_macro_definition); gboolean vala_ccode_base_module_add_wrapper (ValaCCodeBaseModule* self, const gchar* wrapper_name); void vala_ccode_base_module_push_context (ValaCCodeBaseModule* self, ValaCCodeBaseModuleEmitContext* emit_context); ValaCCodeBaseModuleEmitContext* vala_ccode_base_module_emit_context_new (ValaSymbol* symbol); ValaCCodeBaseModuleEmitContext* vala_ccode_base_module_emit_context_construct (GType object_type, ValaSymbol* symbol); gboolean vala_ccode_base_module_requires_copy (ValaCCodeBaseModule* self, ValaDataType* type); ValaGLibValue* vala_glib_value_new (ValaDataType* value_type, ValaCCodeExpression* cvalue, gboolean lvalue); ValaGLibValue* vala_glib_value_construct (GType object_type, ValaDataType* value_type, ValaCCodeExpression* cvalue, gboolean lvalue); void vala_ccode_base_module_pop_context (ValaCCodeBaseModule* self); static gchar* vala_ccode_array_module_generate_array_add_wrapper (ValaCCodeArrayModule* self, ValaArrayType* array_type); static gboolean vala_ccode_array_module_is_array_add (ValaCCodeArrayModule* self, ValaAssignment* assignment); static void vala_ccode_array_module_real_visit_assignment (ValaCodeVisitor* base, ValaAssignment* assignment); ValaCCodeExpression* vala_ccode_base_module_get_array_size_cvalue (ValaCCodeBaseModule* self, ValaTargetValue* value); ValaCCodeExpression* vala_ccode_base_module_handle_struct_argument (ValaCCodeBaseModule* self, ValaParameter* param, ValaExpression* arg, ValaCCodeExpression* cexpr); static ValaCCodeParameter* vala_ccode_array_module_real_generate_parameter (ValaCCodeMethodModule* base, ValaParameter* param, ValaCCodeFile* decl_space, ValaMap* cparam_map, ValaMap* carg_map); ValaCCodeParameter* vala_ccode_method_module_generate_parameter (ValaCCodeMethodModule* self, ValaParameter* param, ValaCCodeFile* decl_space, ValaMap* cparam_map, ValaMap* carg_map); void vala_ccode_base_module_generate_type_declaration (ValaCCodeBaseModule* self, ValaDataType* type, ValaCCodeFile* decl_space); gint vala_ccode_base_module_get_param_pos (ValaCCodeBaseModule* self, gdouble param_pos, gboolean ellipsis); gdouble vala_ccode_base_module_get_ccode_pos (ValaParameter* param); gboolean vala_ccode_base_module_get_ccode_array_length (ValaCodeNode* node); gchar* vala_ccode_base_module_get_ccode_array_length_type (ValaCodeNode* node); gchar* vala_ccode_base_module_get_parameter_array_length_cname (ValaCCodeBaseModule* self, ValaParameter* param, gint dim); gdouble vala_ccode_base_module_get_ccode_array_length_pos (ValaCodeNode* node); ValaCCodeArrayModule* vala_ccode_array_module_new (void); ValaCCodeArrayModule* vala_ccode_array_module_construct (GType object_type); ValaCCodeMethodCallModule* vala_ccode_method_call_module_new (void); ValaCCodeMethodCallModule* vala_ccode_method_call_module_construct (GType object_type); static void vala_ccode_array_module_finalize (ValaCodeVisitor* obj); static void vala_ccode_array_module_append_initializer_list (ValaCCodeArrayModule* self, ValaCCodeExpression* name_cnode, ValaInitializerList* initializer_list, gint rank, gint* i) { g_return_if_fail (self != NULL); g_return_if_fail (name_cnode != NULL); g_return_if_fail (initializer_list != NULL); { ValaInitializerList* _tmp0_; ValaList* _tmp1_ = NULL; ValaList* _e_list; ValaList* _tmp2_; gint _tmp3_; gint _tmp4_; gint _e_size; gint _e_index; _tmp0_ = initializer_list; _tmp1_ = vala_initializer_list_get_initializers (_tmp0_); _e_list = _tmp1_; _tmp2_ = _e_list; _tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_); _tmp4_ = _tmp3_; _e_size = _tmp4_; _e_index = -1; while (TRUE) { gint _tmp5_; gint _tmp6_; gint _tmp7_; ValaList* _tmp8_; gint _tmp9_; gpointer _tmp10_ = NULL; ValaExpression* e; gint _tmp11_; _tmp5_ = _e_index; _e_index = _tmp5_ + 1; _tmp6_ = _e_index; _tmp7_ = _e_size; if (!(_tmp6_ < _tmp7_)) { break; } _tmp8_ = _e_list; _tmp9_ = _e_index; _tmp10_ = vala_list_get (_tmp8_, _tmp9_); e = (ValaExpression*) _tmp10_; _tmp11_ = rank; if (_tmp11_ > 1) { ValaCCodeExpression* _tmp12_; ValaExpression* _tmp13_; gint _tmp14_; _tmp12_ = name_cnode; _tmp13_ = e; _tmp14_ = rank; vala_ccode_array_module_append_initializer_list (self, _tmp12_, VALA_INITIALIZER_LIST (_tmp13_), _tmp14_ - 1, i); } else { ValaCCodeFunction* _tmp15_; ValaCCodeFunction* _tmp16_; ValaCCodeExpression* _tmp17_; gint _tmp18_; gchar* _tmp19_ = NULL; gchar* _tmp20_; ValaCCodeConstant* _tmp21_; ValaCCodeConstant* _tmp22_; ValaCCodeElementAccess* _tmp23_; ValaCCodeElementAccess* _tmp24_; ValaExpression* _tmp25_; ValaCCodeExpression* _tmp26_ = NULL; ValaCCodeExpression* _tmp27_; gint _tmp28_; _tmp15_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp16_ = _tmp15_; _tmp17_ = name_cnode; _tmp18_ = *i; _tmp19_ = g_strdup_printf ("%i", _tmp18_); _tmp20_ = _tmp19_; _tmp21_ = vala_ccode_constant_new (_tmp20_); _tmp22_ = _tmp21_; _tmp23_ = vala_ccode_element_access_new (_tmp17_, (ValaCCodeExpression*) _tmp22_); _tmp24_ = _tmp23_; _tmp25_ = e; _tmp26_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, _tmp25_); _tmp27_ = _tmp26_; vala_ccode_function_add_assignment (_tmp16_, (ValaCCodeExpression*) _tmp24_, _tmp27_); _vala_ccode_node_unref0 (_tmp27_); _vala_ccode_node_unref0 (_tmp24_); _vala_ccode_node_unref0 (_tmp22_); _g_free0 (_tmp20_); _tmp28_ = *i; *i = _tmp28_ + 1; } _vala_code_node_unref0 (e); } _vala_iterable_unref0 (_e_list); } } static gpointer _vala_code_node_ref0 (gpointer self) { return self ? vala_code_node_ref (self) : NULL; } static gpointer _vala_ccode_node_ref0 (gpointer self) { return self ? vala_ccode_node_ref (self) : NULL; } static void vala_ccode_array_module_real_visit_array_creation_expression (ValaCodeVisitor* base, ValaArrayCreationExpression* expr) { ValaCCodeArrayModule * self; ValaArrayCreationExpression* _tmp0_; ValaDataType* _tmp1_; ValaDataType* _tmp2_; ValaArrayType* _tmp3_; ValaArrayType* array_type; gboolean _tmp4_ = FALSE; ValaArrayType* _tmp5_; gboolean _tmp9_; ValaCCodeFunctionCall* gnew = NULL; ValaCodeContext* _tmp27_; ValaCodeContext* _tmp28_; ValaProfile _tmp29_; ValaProfile _tmp30_; gboolean first; ValaCCodeExpression* cexpr; gboolean _tmp67_ = FALSE; ValaArrayCreationExpression* _tmp68_; ValaDataType* _tmp69_; ValaDataType* _tmp70_; ValaTypeSymbol* _tmp71_; ValaTypeSymbol* _tmp72_; gboolean _tmp79_; ValaCCodeFunctionCall* _tmp84_; ValaCCodeExpression* _tmp85_; ValaCodeContext* _tmp86_; ValaCodeContext* _tmp87_; ValaProfile _tmp88_; ValaProfile _tmp89_; ValaArrayCreationExpression* _tmp104_; ValaDataType* _tmp105_; ValaDataType* _tmp106_; ValaArrayCreationExpression* _tmp107_; ValaLocalVariable* _tmp108_ = NULL; ValaLocalVariable* temp_var; ValaLocalVariable* _tmp109_; const gchar* _tmp110_; const gchar* _tmp111_; ValaCCodeExpression* _tmp112_ = NULL; ValaCCodeExpression* name_cnode; gint i; ValaLocalVariable* _tmp113_; ValaCCodeFunction* _tmp114_; ValaCCodeFunction* _tmp115_; ValaCCodeExpression* _tmp116_; ValaCCodeFunctionCall* _tmp117_; ValaArrayCreationExpression* _tmp118_; ValaInitializerList* _tmp119_; ValaInitializerList* _tmp120_; ValaArrayCreationExpression* _tmp128_; ValaCCodeExpression* _tmp129_; self = (ValaCCodeArrayModule*) base; g_return_if_fail (expr != NULL); _tmp0_ = expr; _tmp1_ = vala_expression_get_target_type ((ValaExpression*) _tmp0_); _tmp2_ = _tmp1_; _tmp3_ = _vala_code_node_ref0 (VALA_IS_ARRAY_TYPE (_tmp2_) ? ((ValaArrayType*) _tmp2_) : NULL); array_type = _tmp3_; _tmp5_ = array_type; if (_tmp5_ != NULL) { ValaArrayType* _tmp6_; gboolean _tmp7_; gboolean _tmp8_; _tmp6_ = array_type; _tmp7_ = vala_array_type_get_fixed_length (_tmp6_); _tmp8_ = _tmp7_; _tmp4_ = _tmp8_; } else { _tmp4_ = FALSE; } _tmp9_ = _tmp4_; if (_tmp9_) { ValaArrayType* _tmp10_; ValaArrayCreationExpression* _tmp11_; ValaLocalVariable* _tmp12_ = NULL; ValaLocalVariable* temp_var; ValaLocalVariable* _tmp13_; const gchar* _tmp14_; const gchar* _tmp15_; ValaCCodeExpression* _tmp16_ = NULL; ValaCCodeExpression* name_cnode; gint i; ValaLocalVariable* _tmp17_; ValaCCodeExpression* _tmp18_; ValaArrayCreationExpression* _tmp19_; ValaInitializerList* _tmp20_; ValaInitializerList* _tmp21_; ValaArrayCreationExpression* _tmp22_; gint _tmp23_; gint _tmp24_; ValaArrayCreationExpression* _tmp25_; ValaCCodeExpression* _tmp26_; _tmp10_ = array_type; _tmp11_ = expr; _tmp12_ = vala_ccode_base_module_get_temp_variable ((ValaCCodeBaseModule*) self, (ValaDataType*) _tmp10_, TRUE, (ValaCodeNode*) _tmp11_, TRUE); temp_var = _tmp12_; _tmp13_ = temp_var; _tmp14_ = vala_symbol_get_name ((ValaSymbol*) _tmp13_); _tmp15_ = _tmp14_; _tmp16_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp15_); name_cnode = _tmp16_; i = 0; _tmp17_ = temp_var; vala_ccode_base_module_emit_temp_var ((ValaCCodeBaseModule*) self, _tmp17_); _tmp18_ = name_cnode; _tmp19_ = expr; _tmp20_ = vala_array_creation_expression_get_initializer_list (_tmp19_); _tmp21_ = _tmp20_; _tmp22_ = expr; _tmp23_ = vala_array_creation_expression_get_rank (_tmp22_); _tmp24_ = _tmp23_; vala_ccode_array_module_append_initializer_list (self, _tmp18_, _tmp21_, _tmp24_, &i); _tmp25_ = expr; _tmp26_ = name_cnode; vala_ccode_base_module_set_cvalue ((ValaCCodeBaseModule*) self, (ValaExpression*) _tmp25_, _tmp26_); _vala_ccode_node_unref0 (name_cnode); _vala_code_node_unref0 (temp_var); _vala_code_node_unref0 (array_type); return; } _tmp27_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self); _tmp28_ = _tmp27_; _tmp29_ = vala_code_context_get_profile (_tmp28_); _tmp30_ = _tmp29_; if (_tmp30_ == VALA_PROFILE_POSIX) { ValaCCodeFile* _tmp31_; ValaCCodeIdentifier* _tmp32_; ValaCCodeIdentifier* _tmp33_; ValaCCodeFunctionCall* _tmp34_; _tmp31_ = ((ValaCCodeBaseModule*) self)->cfile; vala_ccode_file_add_include (_tmp31_, "stdlib.h", FALSE); _tmp32_ = vala_ccode_identifier_new ("calloc"); _tmp33_ = _tmp32_; _tmp34_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp33_); _vala_ccode_node_unref0 (gnew); gnew = _tmp34_; _vala_ccode_node_unref0 (_tmp33_); } else { ValaCCodeIdentifier* _tmp35_; ValaCCodeIdentifier* _tmp36_; ValaCCodeFunctionCall* _tmp37_; ValaCCodeFunctionCall* _tmp38_; ValaArrayCreationExpression* _tmp39_; ValaDataType* _tmp40_; ValaDataType* _tmp41_; gchar* _tmp42_ = NULL; gchar* _tmp43_; ValaCCodeIdentifier* _tmp44_; ValaCCodeIdentifier* _tmp45_; _tmp35_ = vala_ccode_identifier_new ("g_new0"); _tmp36_ = _tmp35_; _tmp37_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp36_); _vala_ccode_node_unref0 (gnew); gnew = _tmp37_; _vala_ccode_node_unref0 (_tmp36_); _tmp38_ = gnew; _tmp39_ = expr; _tmp40_ = vala_array_creation_expression_get_element_type (_tmp39_); _tmp41_ = _tmp40_; _tmp42_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp41_); _tmp43_ = _tmp42_; _tmp44_ = vala_ccode_identifier_new (_tmp43_); _tmp45_ = _tmp44_; vala_ccode_function_call_add_argument (_tmp38_, (ValaCCodeExpression*) _tmp45_); _vala_ccode_node_unref0 (_tmp45_); _g_free0 (_tmp43_); } first = TRUE; cexpr = NULL; { ValaArrayCreationExpression* _tmp46_; ValaList* _tmp47_ = NULL; ValaList* _size_list; ValaList* _tmp48_; gint _tmp49_; gint _tmp50_; gint _size_size; gint _size_index; _tmp46_ = expr; _tmp47_ = vala_array_creation_expression_get_sizes (_tmp46_); _size_list = _tmp47_; _tmp48_ = _size_list; _tmp49_ = vala_collection_get_size ((ValaCollection*) _tmp48_); _tmp50_ = _tmp49_; _size_size = _tmp50_; _size_index = -1; while (TRUE) { gint _tmp51_; gint _tmp52_; gint _tmp53_; ValaList* _tmp54_; gint _tmp55_; gpointer _tmp56_ = NULL; ValaExpression* size; ValaExpression* _tmp57_; ValaCCodeExpression* _tmp58_ = NULL; ValaCCodeExpression* csize; ValaArrayCreationExpression* _tmp59_; ValaCCodeExpression* _tmp60_; gboolean _tmp61_; _tmp51_ = _size_index; _size_index = _tmp51_ + 1; _tmp52_ = _size_index; _tmp53_ = _size_size; if (!(_tmp52_ < _tmp53_)) { break; } _tmp54_ = _size_list; _tmp55_ = _size_index; _tmp56_ = vala_list_get (_tmp54_, _tmp55_); size = (ValaExpression*) _tmp56_; _tmp57_ = size; _tmp58_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, _tmp57_); csize = _tmp58_; _tmp59_ = expr; _tmp60_ = csize; vala_ccode_base_module_append_array_length ((ValaCCodeBaseModule*) self, (ValaExpression*) _tmp59_, _tmp60_); _tmp61_ = first; if (_tmp61_) { ValaCCodeExpression* _tmp62_; ValaCCodeExpression* _tmp63_; _tmp62_ = csize; _tmp63_ = _vala_ccode_node_ref0 (_tmp62_); _vala_ccode_node_unref0 (cexpr); cexpr = _tmp63_; first = FALSE; } else { ValaCCodeExpression* _tmp64_; ValaCCodeExpression* _tmp65_; ValaCCodeBinaryExpression* _tmp66_; _tmp64_ = cexpr; _tmp65_ = csize; _tmp66_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, _tmp64_, _tmp65_); _vala_ccode_node_unref0 (cexpr); cexpr = (ValaCCodeExpression*) _tmp66_; } _vala_ccode_node_unref0 (csize); _vala_code_node_unref0 (size); } _vala_iterable_unref0 (_size_list); } _tmp68_ = expr; _tmp69_ = vala_array_creation_expression_get_element_type (_tmp68_); _tmp70_ = _tmp69_; _tmp71_ = vala_data_type_get_data_type (_tmp70_); _tmp72_ = _tmp71_; if (_tmp72_ != NULL) { ValaArrayCreationExpression* _tmp73_; ValaDataType* _tmp74_; ValaDataType* _tmp75_; ValaTypeSymbol* _tmp76_; ValaTypeSymbol* _tmp77_; gboolean _tmp78_ = FALSE; _tmp73_ = expr; _tmp74_ = vala_array_creation_expression_get_element_type (_tmp73_); _tmp75_ = _tmp74_; _tmp76_ = vala_data_type_get_data_type (_tmp75_); _tmp77_ = _tmp76_; _tmp78_ = vala_typesymbol_is_reference_type (_tmp77_); _tmp67_ = _tmp78_; } else { _tmp67_ = FALSE; } _tmp79_ = _tmp67_; if (_tmp79_) { ValaCCodeExpression* _tmp80_; ValaCCodeConstant* _tmp81_; ValaCCodeConstant* _tmp82_; ValaCCodeBinaryExpression* _tmp83_; _tmp80_ = cexpr; _tmp81_ = vala_ccode_constant_new ("1"); _tmp82_ = _tmp81_; _tmp83_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, _tmp80_, (ValaCCodeExpression*) _tmp82_); _vala_ccode_node_unref0 (cexpr); cexpr = (ValaCCodeExpression*) _tmp83_; _vala_ccode_node_unref0 (_tmp82_); } _tmp84_ = gnew; _tmp85_ = cexpr; vala_ccode_function_call_add_argument (_tmp84_, _tmp85_); _tmp86_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self); _tmp87_ = _tmp86_; _tmp88_ = vala_code_context_get_profile (_tmp87_); _tmp89_ = _tmp88_; if (_tmp89_ == VALA_PROFILE_POSIX) { ValaCCodeIdentifier* _tmp90_; ValaCCodeIdentifier* _tmp91_; ValaCCodeFunctionCall* _tmp92_; ValaCCodeFunctionCall* _tmp93_; ValaCCodeFunctionCall* csizeof; ValaCCodeFunctionCall* _tmp94_; ValaArrayCreationExpression* _tmp95_; ValaDataType* _tmp96_; ValaDataType* _tmp97_; gchar* _tmp98_ = NULL; gchar* _tmp99_; ValaCCodeIdentifier* _tmp100_; ValaCCodeIdentifier* _tmp101_; ValaCCodeFunctionCall* _tmp102_; ValaCCodeFunctionCall* _tmp103_; _tmp90_ = vala_ccode_identifier_new ("sizeof"); _tmp91_ = _tmp90_; _tmp92_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp91_); _tmp93_ = _tmp92_; _vala_ccode_node_unref0 (_tmp91_); csizeof = _tmp93_; _tmp94_ = csizeof; _tmp95_ = expr; _tmp96_ = vala_array_creation_expression_get_element_type (_tmp95_); _tmp97_ = _tmp96_; _tmp98_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp97_); _tmp99_ = _tmp98_; _tmp100_ = vala_ccode_identifier_new (_tmp99_); _tmp101_ = _tmp100_; vala_ccode_function_call_add_argument (_tmp94_, (ValaCCodeExpression*) _tmp101_); _vala_ccode_node_unref0 (_tmp101_); _g_free0 (_tmp99_); _tmp102_ = gnew; _tmp103_ = csizeof; vala_ccode_function_call_add_argument (_tmp102_, (ValaCCodeExpression*) _tmp103_); _vala_ccode_node_unref0 (csizeof); } _tmp104_ = expr; _tmp105_ = vala_expression_get_value_type ((ValaExpression*) _tmp104_); _tmp106_ = _tmp105_; _tmp107_ = expr; _tmp108_ = vala_ccode_base_module_get_temp_variable ((ValaCCodeBaseModule*) self, _tmp106_, TRUE, (ValaCodeNode*) _tmp107_, TRUE); temp_var = _tmp108_; _tmp109_ = temp_var; _tmp110_ = vala_symbol_get_name ((ValaSymbol*) _tmp109_); _tmp111_ = _tmp110_; _tmp112_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp111_); name_cnode = _tmp112_; i = 0; _tmp113_ = temp_var; vala_ccode_base_module_emit_temp_var ((ValaCCodeBaseModule*) self, _tmp113_); _tmp114_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp115_ = _tmp114_; _tmp116_ = name_cnode; _tmp117_ = gnew; vala_ccode_function_add_assignment (_tmp115_, _tmp116_, (ValaCCodeExpression*) _tmp117_); _tmp118_ = expr; _tmp119_ = vala_array_creation_expression_get_initializer_list (_tmp118_); _tmp120_ = _tmp119_; if (_tmp120_ != NULL) { ValaCCodeExpression* _tmp121_; ValaArrayCreationExpression* _tmp122_; ValaInitializerList* _tmp123_; ValaInitializerList* _tmp124_; ValaArrayCreationExpression* _tmp125_; gint _tmp126_; gint _tmp127_; _tmp121_ = name_cnode; _tmp122_ = expr; _tmp123_ = vala_array_creation_expression_get_initializer_list (_tmp122_); _tmp124_ = _tmp123_; _tmp125_ = expr; _tmp126_ = vala_array_creation_expression_get_rank (_tmp125_); _tmp127_ = _tmp126_; vala_ccode_array_module_append_initializer_list (self, _tmp121_, _tmp124_, _tmp127_, &i); } _tmp128_ = expr; _tmp129_ = name_cnode; vala_ccode_base_module_set_cvalue ((ValaCCodeBaseModule*) self, (ValaExpression*) _tmp128_, _tmp129_); _vala_ccode_node_unref0 (name_cnode); _vala_code_node_unref0 (temp_var); _vala_ccode_node_unref0 (cexpr); _vala_ccode_node_unref0 (gnew); _vala_code_node_unref0 (array_type); } static gchar* vala_ccode_array_module_real_get_array_length_cname (ValaCCodeBaseModule* base, const gchar* array_cname, gint dim) { ValaCCodeArrayModule * self; gchar* result = NULL; const gchar* _tmp0_; gint _tmp1_; gchar* _tmp2_ = NULL; self = (ValaCCodeArrayModule*) base; g_return_val_if_fail (array_cname != NULL, NULL); _tmp0_ = array_cname; _tmp1_ = dim; _tmp2_ = g_strdup_printf ("%s_length%d", _tmp0_, _tmp1_); result = _tmp2_; return result; } static gchar* vala_ccode_array_module_real_get_parameter_array_length_cname (ValaCCodeBaseModule* base, ValaParameter* param, gint dim) { ValaCCodeArrayModule * self; gchar* result = NULL; ValaParameter* _tmp0_; gchar* _tmp1_ = NULL; gchar* _tmp2_; gboolean _tmp3_; self = (ValaCCodeArrayModule*) base; g_return_val_if_fail (param != NULL, NULL); _tmp0_ = param; _tmp1_ = vala_ccode_base_module_get_ccode_array_length_name ((ValaCodeNode*) _tmp0_); _tmp2_ = _tmp1_; _tmp3_ = _tmp2_ != NULL; _g_free0 (_tmp2_); if (_tmp3_) { ValaParameter* _tmp4_; gchar* _tmp5_ = NULL; _tmp4_ = param; _tmp5_ = vala_ccode_base_module_get_ccode_array_length_name ((ValaCodeNode*) _tmp4_); result = _tmp5_; return result; } else { ValaParameter* _tmp6_; const gchar* _tmp7_; const gchar* _tmp8_; gchar* _tmp9_ = NULL; gchar* _tmp10_; gint _tmp11_; gchar* _tmp12_ = NULL; gchar* _tmp13_; _tmp6_ = param; _tmp7_ = vala_symbol_get_name ((ValaSymbol*) _tmp6_); _tmp8_ = _tmp7_; _tmp9_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, _tmp8_); _tmp10_ = _tmp9_; _tmp11_ = dim; _tmp12_ = vala_ccode_base_module_get_array_length_cname ((ValaCCodeBaseModule*) self, _tmp10_, _tmp11_); _tmp13_ = _tmp12_; _g_free0 (_tmp10_); result = _tmp13_; return result; } } static ValaCCodeExpression* vala_ccode_array_module_real_get_array_length_cexpression (ValaCCodeBaseModule* base, ValaExpression* array_expr, gint dim) { ValaCCodeArrayModule * self; ValaCCodeExpression* result = NULL; ValaExpression* _tmp0_; ValaTargetValue* _tmp1_; ValaTargetValue* _tmp2_; gint _tmp3_; ValaCCodeExpression* _tmp4_ = NULL; self = (ValaCCodeArrayModule*) base; g_return_val_if_fail (array_expr != NULL, NULL); _tmp0_ = array_expr; _tmp1_ = vala_expression_get_target_value (_tmp0_); _tmp2_ = _tmp1_; _tmp3_ = dim; _tmp4_ = vala_ccode_base_module_get_array_length_cvalue ((ValaCCodeBaseModule*) self, _tmp2_, _tmp3_); result = _tmp4_; return result; } static gpointer _vala_iterable_ref0 (gpointer self) { return self ? vala_iterable_ref (self) : NULL; } static ValaCCodeExpression* vala_ccode_array_module_real_get_array_length_cvalue (ValaCCodeBaseModule* base, ValaTargetValue* value, gint dim) { ValaCCodeArrayModule * self; ValaCCodeExpression* result = NULL; ValaTargetValue* _tmp0_; ValaDataType* _tmp1_; ValaDataType* _tmp2_; ValaArrayType* _tmp3_; ValaArrayType* array_type; gboolean _tmp4_ = FALSE; ValaArrayType* _tmp5_; gboolean _tmp9_; gint _tmp17_; ValaTargetValue* _tmp39_; ValaList* _tmp40_; ValaList* _tmp41_; ValaList* size; gboolean _tmp42_ = FALSE; ValaList* _tmp43_; gboolean _tmp48_; ValaList* _tmp49_; gint _tmp50_; gpointer _tmp51_ = NULL; self = (ValaCCodeArrayModule*) base; g_return_val_if_fail (value != NULL, NULL); _tmp0_ = value; _tmp1_ = vala_target_value_get_value_type (_tmp0_); _tmp2_ = _tmp1_; _tmp3_ = _vala_code_node_ref0 (VALA_IS_ARRAY_TYPE (_tmp2_) ? ((ValaArrayType*) _tmp2_) : NULL); array_type = _tmp3_; _tmp5_ = array_type; if (_tmp5_ != NULL) { ValaArrayType* _tmp6_; gboolean _tmp7_; gboolean _tmp8_; _tmp6_ = array_type; _tmp7_ = vala_array_type_get_fixed_length (_tmp6_); _tmp8_ = _tmp7_; _tmp4_ = _tmp8_; } else { _tmp4_ = FALSE; } _tmp9_ = _tmp4_; if (_tmp9_) { ValaArrayType* _tmp10_; gint _tmp11_; gint _tmp12_; gchar* _tmp13_ = NULL; gchar* _tmp14_; ValaCCodeConstant* _tmp15_; ValaCCodeExpression* _tmp16_; _tmp10_ = array_type; _tmp11_ = vala_array_type_get_length (_tmp10_); _tmp12_ = _tmp11_; _tmp13_ = g_strdup_printf ("%i", _tmp12_); _tmp14_ = _tmp13_; _tmp15_ = vala_ccode_constant_new (_tmp14_); _tmp16_ = (ValaCCodeExpression*) _tmp15_; _g_free0 (_tmp14_); result = _tmp16_; _vala_code_node_unref0 (array_type); return result; } _tmp17_ = dim; if (_tmp17_ == (-1)) { gboolean _tmp18_ = FALSE; ValaArrayType* _tmp19_; gboolean _tmp23_; _tmp19_ = array_type; if (_tmp19_ != NULL) { ValaArrayType* _tmp20_; gint _tmp21_; gint _tmp22_; _tmp20_ = array_type; _tmp21_ = vala_array_type_get_rank (_tmp20_); _tmp22_ = _tmp21_; _tmp18_ = _tmp22_ > 1; } else { _tmp18_ = FALSE; } _tmp23_ = _tmp18_; if (_tmp23_) { ValaTargetValue* _tmp24_; ValaCCodeExpression* _tmp25_ = NULL; ValaCCodeExpression* cexpr; _tmp24_ = value; _tmp25_ = vala_ccode_base_module_get_array_length_cvalue ((ValaCCodeBaseModule*) self, _tmp24_, 1); cexpr = _tmp25_; { gboolean _tmp26_; dim = 2; _tmp26_ = TRUE; while (TRUE) { gboolean _tmp27_; gint _tmp29_; ValaArrayType* _tmp30_; gint _tmp31_; gint _tmp32_; ValaCCodeExpression* _tmp33_; ValaTargetValue* _tmp34_; gint _tmp35_; ValaCCodeExpression* _tmp36_ = NULL; ValaCCodeExpression* _tmp37_; ValaCCodeBinaryExpression* _tmp38_; _tmp27_ = _tmp26_; if (!_tmp27_) { gint _tmp28_; _tmp28_ = dim; dim = _tmp28_ + 1; } _tmp26_ = FALSE; _tmp29_ = dim; _tmp30_ = array_type; _tmp31_ = vala_array_type_get_rank (_tmp30_); _tmp32_ = _tmp31_; if (!(_tmp29_ <= _tmp32_)) { break; } _tmp33_ = cexpr; _tmp34_ = value; _tmp35_ = dim; _tmp36_ = vala_ccode_base_module_get_array_length_cvalue ((ValaCCodeBaseModule*) self, _tmp34_, _tmp35_); _tmp37_ = _tmp36_; _tmp38_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, _tmp33_, _tmp37_); _vala_ccode_node_unref0 (cexpr); cexpr = (ValaCCodeExpression*) _tmp38_; _vala_ccode_node_unref0 (_tmp37_); } } result = cexpr; _vala_code_node_unref0 (array_type); return result; } else { dim = 1; } } _tmp39_ = value; _tmp40_ = VALA_GLIB_VALUE (_tmp39_)->array_length_cvalues; _tmp41_ = _vala_iterable_ref0 (_tmp40_); size = _tmp41_; _tmp43_ = size; if (_tmp43_ != NULL) { ValaList* _tmp44_; gint _tmp45_; gint _tmp46_; gint _tmp47_; _tmp44_ = size; _tmp45_ = vala_collection_get_size ((ValaCollection*) _tmp44_); _tmp46_ = _tmp45_; _tmp47_ = dim; _tmp42_ = _tmp46_ >= _tmp47_; } else { _tmp42_ = FALSE; } _tmp48_ = _tmp42_; g_assert (_tmp48_); _tmp49_ = size; _tmp50_ = dim; _tmp51_ = vala_list_get (_tmp49_, _tmp50_ - 1); result = (ValaCCodeExpression*) _tmp51_; _vala_iterable_unref0 (size); _vala_code_node_unref0 (array_type); return result; } static gchar* vala_ccode_array_module_real_get_array_size_cname (ValaCCodeBaseModule* base, const gchar* array_cname) { ValaCCodeArrayModule * self; gchar* result = NULL; const gchar* _tmp0_; gchar* _tmp1_ = NULL; self = (ValaCCodeArrayModule*) base; g_return_val_if_fail (array_cname != NULL, NULL); _tmp0_ = array_cname; _tmp1_ = g_strdup_printf ("_%s_size_", _tmp0_); result = _tmp1_; return result; } static void vala_ccode_array_module_real_visit_element_access (ValaCodeVisitor* base, ValaElementAccess* expr) { ValaCCodeArrayModule * self; ValaElementAccess* _tmp0_; ValaList* _tmp1_ = NULL; ValaList* indices; ValaList* _tmp2_; gint _tmp3_; gint _tmp4_; gint rank; ValaElementAccess* _tmp5_; ValaExpression* _tmp6_; ValaExpression* _tmp7_; ValaCCodeExpression* _tmp8_ = NULL; ValaCCodeExpression* ccontainer; ValaList* _tmp9_; gpointer _tmp10_ = NULL; ValaExpression* _tmp11_; ValaCCodeExpression* _tmp12_ = NULL; ValaCCodeExpression* _tmp13_; ValaCCodeExpression* cindex; ValaElementAccess* _tmp14_; ValaExpression* _tmp15_; ValaExpression* _tmp16_; ValaSymbol* _tmp17_; ValaSymbol* _tmp18_; ValaElementAccess* _tmp70_; ValaTargetValue* _tmp71_; ValaTargetValue* _tmp72_; ValaElementAccess* _tmp73_; ValaDataType* _tmp74_; ValaDataType* _tmp75_; ValaDataType* _tmp76_ = NULL; ValaDataType* _tmp77_; ValaElementAccess* _tmp78_; gboolean _tmp79_; gboolean _tmp80_; ValaElementAccess* _tmp88_; ValaTargetValue* _tmp89_; ValaTargetValue* _tmp90_; self = (ValaCCodeArrayModule*) base; g_return_if_fail (expr != NULL); _tmp0_ = expr; _tmp1_ = vala_element_access_get_indices (_tmp0_); indices = _tmp1_; _tmp2_ = indices; _tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_); _tmp4_ = _tmp3_; rank = _tmp4_; _tmp5_ = expr; _tmp6_ = vala_element_access_get_container (_tmp5_); _tmp7_ = _tmp6_; _tmp8_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, _tmp7_); ccontainer = _tmp8_; _tmp9_ = indices; _tmp10_ = vala_list_get (_tmp9_, 0); _tmp11_ = (ValaExpression*) _tmp10_; _tmp12_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, _tmp11_); _tmp13_ = _tmp12_; _vala_code_node_unref0 (_tmp11_); cindex = _tmp13_; _tmp14_ = expr; _tmp15_ = vala_element_access_get_container (_tmp14_); _tmp16_ = _tmp15_; _tmp17_ = vala_expression_get_symbol_reference (_tmp16_); _tmp18_ = _tmp17_; if (VALA_IS_ARRAY_LENGTH_FIELD (_tmp18_)) { ValaList* _tmp19_; gpointer _tmp20_ = NULL; ValaIntegerLiteral* lit; ValaElementAccess* _tmp21_; ValaExpression* _tmp22_; ValaExpression* _tmp23_; ValaMemberAccess* _tmp24_; ValaMemberAccess* memberaccess; gboolean _tmp25_ = FALSE; ValaIntegerLiteral* _tmp26_; gboolean _tmp28_; _tmp19_ = indices; _tmp20_ = vala_list_get (_tmp19_, 0); lit = VALA_IS_INTEGER_LITERAL ((ValaExpression*) _tmp20_) ? ((ValaIntegerLiteral*) ((ValaExpression*) _tmp20_)) : NULL; _tmp21_ = expr; _tmp22_ = vala_element_access_get_container (_tmp21_); _tmp23_ = _tmp22_; _tmp24_ = _vala_code_node_ref0 (VALA_IS_MEMBER_ACCESS (_tmp23_) ? ((ValaMemberAccess*) _tmp23_) : NULL); memberaccess = _tmp24_; _tmp26_ = lit; if (_tmp26_ != NULL) { ValaMemberAccess* _tmp27_; _tmp27_ = memberaccess; _tmp25_ = _tmp27_ != NULL; } else { _tmp25_ = FALSE; } _tmp28_ = _tmp25_; if (_tmp28_) { ValaIntegerLiteral* _tmp29_; const gchar* _tmp30_; const gchar* _tmp31_; gint _tmp32_ = 0; gint dim; ValaElementAccess* _tmp33_; ValaMemberAccess* _tmp34_; ValaExpression* _tmp35_; ValaExpression* _tmp36_; gint _tmp37_; ValaCCodeExpression* _tmp38_ = NULL; ValaCCodeExpression* _tmp39_; _tmp29_ = lit; _tmp30_ = vala_integer_literal_get_value (_tmp29_); _tmp31_ = _tmp30_; _tmp32_ = atoi (_tmp31_); dim = _tmp32_; _tmp33_ = expr; _tmp34_ = memberaccess; _tmp35_ = vala_member_access_get_inner (_tmp34_); _tmp36_ = _tmp35_; _tmp37_ = dim; _tmp38_ = vala_ccode_base_module_get_array_length_cexpression ((ValaCCodeBaseModule*) self, _tmp36_, _tmp37_ + 1); _tmp39_ = _tmp38_; vala_ccode_base_module_set_cvalue ((ValaCCodeBaseModule*) self, (ValaExpression*) _tmp33_, _tmp39_); _vala_ccode_node_unref0 (_tmp39_); } else { ValaElementAccess* _tmp40_; ValaSourceReference* _tmp41_; ValaSourceReference* _tmp42_; _tmp40_ = expr; _tmp41_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp40_); _tmp42_ = _tmp41_; vala_report_error (_tmp42_, "only integer literals supported as index"); } _vala_code_node_unref0 (memberaccess); _vala_code_node_unref0 (lit); } else { ValaElementAccess* _tmp65_; ValaCCodeExpression* _tmp66_; ValaCCodeExpression* _tmp67_; ValaCCodeElementAccess* _tmp68_; ValaCCodeElementAccess* _tmp69_; { gint i; i = 1; { gboolean _tmp43_; _tmp43_ = TRUE; while (TRUE) { gboolean _tmp44_; gint _tmp46_; gint _tmp47_; ValaCCodeExpression* _tmp48_; ValaElementAccess* _tmp49_; ValaExpression* _tmp50_; ValaExpression* _tmp51_; gint _tmp52_; ValaCCodeExpression* _tmp53_ = NULL; ValaCCodeExpression* _tmp54_; ValaCCodeBinaryExpression* _tmp55_; ValaCCodeBinaryExpression* _tmp56_; ValaCCodeBinaryExpression* cmul; ValaCCodeBinaryExpression* _tmp57_; ValaList* _tmp58_; gint _tmp59_; gpointer _tmp60_ = NULL; ValaExpression* _tmp61_; ValaCCodeExpression* _tmp62_ = NULL; ValaCCodeExpression* _tmp63_; ValaCCodeBinaryExpression* _tmp64_; _tmp44_ = _tmp43_; if (!_tmp44_) { gint _tmp45_; _tmp45_ = i; i = _tmp45_ + 1; } _tmp43_ = FALSE; _tmp46_ = i; _tmp47_ = rank; if (!(_tmp46_ < _tmp47_)) { break; } _tmp48_ = cindex; _tmp49_ = expr; _tmp50_ = vala_element_access_get_container (_tmp49_); _tmp51_ = _tmp50_; _tmp52_ = i; _tmp53_ = vala_ccode_base_module_get_array_length_cexpression ((ValaCCodeBaseModule*) self, _tmp51_, _tmp52_ + 1); _tmp54_ = _tmp53_; _tmp55_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, _tmp48_, _tmp54_); _tmp56_ = _tmp55_; _vala_ccode_node_unref0 (_tmp54_); cmul = _tmp56_; _tmp57_ = cmul; _tmp58_ = indices; _tmp59_ = i; _tmp60_ = vala_list_get (_tmp58_, _tmp59_); _tmp61_ = (ValaExpression*) _tmp60_; _tmp62_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, _tmp61_); _tmp63_ = _tmp62_; _tmp64_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) _tmp57_, _tmp63_); _vala_ccode_node_unref0 (cindex); cindex = (ValaCCodeExpression*) _tmp64_; _vala_ccode_node_unref0 (_tmp63_); _vala_code_node_unref0 (_tmp61_); _vala_ccode_node_unref0 (cmul); } } } _tmp65_ = expr; _tmp66_ = ccontainer; _tmp67_ = cindex; _tmp68_ = vala_ccode_element_access_new (_tmp66_, _tmp67_); _tmp69_ = _tmp68_; vala_ccode_base_module_set_cvalue ((ValaCCodeBaseModule*) self, (ValaExpression*) _tmp65_, (ValaCCodeExpression*) _tmp69_); _vala_ccode_node_unref0 (_tmp69_); } _tmp70_ = expr; _tmp71_ = vala_expression_get_target_value ((ValaExpression*) _tmp70_); _tmp72_ = _tmp71_; _tmp73_ = expr; _tmp74_ = vala_expression_get_value_type ((ValaExpression*) _tmp73_); _tmp75_ = _tmp74_; _tmp76_ = vala_data_type_copy (_tmp75_); _tmp77_ = _tmp76_; vala_target_value_set_value_type (_tmp72_, _tmp77_); _vala_code_node_unref0 (_tmp77_); _tmp78_ = expr; _tmp79_ = vala_expression_get_lvalue ((ValaExpression*) _tmp78_); _tmp80_ = _tmp79_; if (!_tmp80_) { ValaElementAccess* _tmp81_; ValaElementAccess* _tmp82_; ValaTargetValue* _tmp83_; ValaTargetValue* _tmp84_; ValaElementAccess* _tmp85_; ValaTargetValue* _tmp86_ = NULL; ValaTargetValue* _tmp87_; _tmp81_ = expr; _tmp82_ = expr; _tmp83_ = vala_expression_get_target_value ((ValaExpression*) _tmp82_); _tmp84_ = _tmp83_; _tmp85_ = expr; _tmp86_ = vala_ccode_base_module_store_temp_value ((ValaCCodeBaseModule*) self, _tmp84_, (ValaCodeNode*) _tmp85_, NULL); _tmp87_ = _tmp86_; vala_expression_set_target_value ((ValaExpression*) _tmp81_, _tmp87_); _vala_target_value_unref0 (_tmp87_); } _tmp88_ = expr; _tmp89_ = vala_expression_get_target_value ((ValaExpression*) _tmp88_); _tmp90_ = _tmp89_; VALA_GLIB_VALUE (_tmp90_)->lvalue = TRUE; _vala_ccode_node_unref0 (cindex); _vala_ccode_node_unref0 (ccontainer); _vala_iterable_unref0 (indices); } static void vala_ccode_array_module_real_visit_slice_expression (ValaCodeVisitor* base, ValaSliceExpression* expr) { ValaCCodeArrayModule * self; ValaSliceExpression* _tmp0_; ValaExpression* _tmp1_; ValaExpression* _tmp2_; ValaCCodeExpression* _tmp3_ = NULL; ValaCCodeExpression* ccontainer; ValaSliceExpression* _tmp4_; ValaExpression* _tmp5_; ValaExpression* _tmp6_; ValaCCodeExpression* _tmp7_ = NULL; ValaCCodeExpression* cstart; ValaSliceExpression* _tmp8_; ValaExpression* _tmp9_; ValaExpression* _tmp10_; ValaCCodeExpression* _tmp11_ = NULL; ValaCCodeExpression* cstop; ValaCCodeBinaryExpression* _tmp12_; ValaCCodeBinaryExpression* cstartpointer; ValaCCodeBinaryExpression* _tmp13_; ValaCCodeBinaryExpression* splicelen; ValaSliceExpression* _tmp14_; ValaSliceExpression* _tmp15_; self = (ValaCCodeArrayModule*) base; g_return_if_fail (expr != NULL); _tmp0_ = expr; _tmp1_ = vala_slice_expression_get_container (_tmp0_); _tmp2_ = _tmp1_; _tmp3_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, _tmp2_); ccontainer = _tmp3_; _tmp4_ = expr; _tmp5_ = vala_slice_expression_get_start (_tmp4_); _tmp6_ = _tmp5_; _tmp7_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, _tmp6_); cstart = _tmp7_; _tmp8_ = expr; _tmp9_ = vala_slice_expression_get_stop (_tmp8_); _tmp10_ = _tmp9_; _tmp11_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, _tmp10_); cstop = _tmp11_; _tmp12_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, ccontainer, cstart); cstartpointer = _tmp12_; _tmp13_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MINUS, cstop, cstart); splicelen = _tmp13_; _tmp14_ = expr; vala_ccode_base_module_set_cvalue ((ValaCCodeBaseModule*) self, (ValaExpression*) _tmp14_, (ValaCCodeExpression*) cstartpointer); _tmp15_ = expr; vala_ccode_base_module_append_array_length ((ValaCCodeBaseModule*) self, (ValaExpression*) _tmp15_, (ValaCCodeExpression*) splicelen); _vala_ccode_node_unref0 (splicelen); _vala_ccode_node_unref0 (cstartpointer); _vala_ccode_node_unref0 (cstop); _vala_ccode_node_unref0 (cstart); _vala_ccode_node_unref0 (ccontainer); } static void vala_ccode_array_module_append_struct_array_free_loop (ValaCCodeArrayModule* self, ValaStruct* st) { ValaCCodeIdentifier* _tmp0_; ValaCCodeIdentifier* _tmp1_; ValaCCodeConstant* _tmp2_; ValaCCodeConstant* _tmp3_; ValaCCodeAssignment* _tmp4_; ValaCCodeAssignment* _tmp5_; ValaCCodeAssignment* cforinit; ValaCCodeIdentifier* _tmp6_; ValaCCodeIdentifier* _tmp7_; ValaCCodeIdentifier* _tmp8_; ValaCCodeIdentifier* _tmp9_; ValaCCodeBinaryExpression* _tmp10_; ValaCCodeBinaryExpression* _tmp11_; ValaCCodeBinaryExpression* cforcond; ValaCCodeIdentifier* _tmp12_; ValaCCodeIdentifier* _tmp13_; ValaCCodeIdentifier* _tmp14_; ValaCCodeIdentifier* _tmp15_; ValaCCodeConstant* _tmp16_; ValaCCodeConstant* _tmp17_; ValaCCodeBinaryExpression* _tmp18_; ValaCCodeBinaryExpression* _tmp19_; ValaCCodeAssignment* _tmp20_; ValaCCodeAssignment* _tmp21_; ValaCCodeAssignment* cforiter; ValaCCodeFunction* _tmp22_; ValaCCodeFunction* _tmp23_; ValaCCodeIdentifier* _tmp24_; ValaCCodeIdentifier* cptrarray; ValaCCodeIdentifier* _tmp25_; ValaCCodeIdentifier* _tmp26_; ValaCCodeElementAccess* _tmp27_; ValaCCodeElementAccess* _tmp28_; ValaCCodeElementAccess* cea; ValaStruct* _tmp29_; ValaStructValueType* _tmp30_; ValaStructValueType* _tmp31_; ValaCCodeExpression* _tmp32_ = NULL; ValaCCodeExpression* _tmp33_; ValaCCodeFunctionCall* _tmp34_; ValaCCodeFunctionCall* _tmp35_; ValaCCodeFunctionCall* cfreecall; ValaCCodeUnaryExpression* _tmp36_; ValaCCodeUnaryExpression* _tmp37_; ValaCCodeFunction* _tmp38_; ValaCCodeFunction* _tmp39_; ValaCCodeFunction* _tmp40_; ValaCCodeFunction* _tmp41_; g_return_if_fail (self != NULL); g_return_if_fail (st != NULL); _tmp0_ = vala_ccode_identifier_new ("i"); _tmp1_ = _tmp0_; _tmp2_ = vala_ccode_constant_new ("0"); _tmp3_ = _tmp2_; _tmp4_ = vala_ccode_assignment_new ((ValaCCodeExpression*) _tmp1_, (ValaCCodeExpression*) _tmp3_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE); _tmp5_ = _tmp4_; _vala_ccode_node_unref0 (_tmp3_); _vala_ccode_node_unref0 (_tmp1_); cforinit = _tmp5_; _tmp6_ = vala_ccode_identifier_new ("i"); _tmp7_ = _tmp6_; _tmp8_ = vala_ccode_identifier_new ("array_length"); _tmp9_ = _tmp8_; _tmp10_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_LESS_THAN, (ValaCCodeExpression*) _tmp7_, (ValaCCodeExpression*) _tmp9_); _tmp11_ = _tmp10_; _vala_ccode_node_unref0 (_tmp9_); _vala_ccode_node_unref0 (_tmp7_); cforcond = _tmp11_; _tmp12_ = vala_ccode_identifier_new ("i"); _tmp13_ = _tmp12_; _tmp14_ = vala_ccode_identifier_new ("i"); _tmp15_ = _tmp14_; _tmp16_ = vala_ccode_constant_new ("1"); _tmp17_ = _tmp16_; _tmp18_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) _tmp15_, (ValaCCodeExpression*) _tmp17_); _tmp19_ = _tmp18_; _tmp20_ = vala_ccode_assignment_new ((ValaCCodeExpression*) _tmp13_, (ValaCCodeExpression*) _tmp19_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE); _tmp21_ = _tmp20_; _vala_ccode_node_unref0 (_tmp19_); _vala_ccode_node_unref0 (_tmp17_); _vala_ccode_node_unref0 (_tmp15_); _vala_ccode_node_unref0 (_tmp13_); cforiter = _tmp21_; _tmp22_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp23_ = _tmp22_; vala_ccode_function_open_for (_tmp23_, (ValaCCodeExpression*) cforinit, (ValaCCodeExpression*) cforcond, (ValaCCodeExpression*) cforiter); _tmp24_ = vala_ccode_identifier_new ("array"); cptrarray = _tmp24_; _tmp25_ = vala_ccode_identifier_new ("i"); _tmp26_ = _tmp25_; _tmp27_ = vala_ccode_element_access_new ((ValaCCodeExpression*) cptrarray, (ValaCCodeExpression*) _tmp26_); _tmp28_ = _tmp27_; _vala_ccode_node_unref0 (_tmp26_); cea = _tmp28_; _tmp29_ = st; _tmp30_ = vala_struct_value_type_new (_tmp29_); _tmp31_ = _tmp30_; _tmp32_ = vala_ccode_base_module_get_destroy_func_expression ((ValaCCodeBaseModule*) self, (ValaDataType*) _tmp31_, FALSE); _tmp33_ = _tmp32_; _tmp34_ = vala_ccode_function_call_new (_tmp33_); _tmp35_ = _tmp34_; _vala_ccode_node_unref0 (_tmp33_); _vala_code_node_unref0 (_tmp31_); cfreecall = _tmp35_; _tmp36_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, (ValaCCodeExpression*) cea); _tmp37_ = _tmp36_; vala_ccode_function_call_add_argument (cfreecall, (ValaCCodeExpression*) _tmp37_); _vala_ccode_node_unref0 (_tmp37_); _tmp38_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp39_ = _tmp38_; vala_ccode_function_add_expression (_tmp39_, (ValaCCodeExpression*) cfreecall); _tmp40_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp41_ = _tmp40_; vala_ccode_function_close (_tmp41_); _vala_ccode_node_unref0 (cfreecall); _vala_ccode_node_unref0 (cea); _vala_ccode_node_unref0 (cptrarray); _vala_ccode_node_unref0 (cforiter); _vala_ccode_node_unref0 (cforcond); _vala_ccode_node_unref0 (cforinit); } static gchar* vala_ccode_array_module_real_append_struct_array_free (ValaCCodeBaseModule* base, ValaStruct* st) { ValaCCodeArrayModule * self; gchar* result = NULL; ValaStruct* _tmp0_; gchar* _tmp1_ = NULL; gchar* _tmp2_; gchar* _tmp3_ = NULL; gchar* _tmp4_; gchar* cname; ValaCCodeFile* _tmp5_; const gchar* _tmp6_; gboolean _tmp7_ = FALSE; const gchar* _tmp8_; ValaCCodeFunction* _tmp9_; ValaCCodeFunction* fun; ValaCCodeFunction* _tmp10_; ValaCCodeFunction* _tmp11_; ValaStruct* _tmp12_; gchar* _tmp13_ = NULL; gchar* _tmp14_; gchar* _tmp15_ = NULL; gchar* _tmp16_; ValaCCodeParameter* _tmp17_; ValaCCodeParameter* _tmp18_; ValaCCodeFunction* _tmp19_; ValaCCodeParameter* _tmp20_; ValaCCodeParameter* _tmp21_; ValaCCodeFunction* _tmp22_; ValaCCodeIdentifier* _tmp23_; ValaCCodeIdentifier* _tmp24_; ValaCCodeConstant* _tmp25_; ValaCCodeConstant* _tmp26_; ValaCCodeBinaryExpression* _tmp27_; ValaCCodeBinaryExpression* _tmp28_; ValaCCodeBinaryExpression* ccondarr; ValaCCodeFunction* _tmp29_; ValaCCodeFunction* _tmp30_; ValaCCodeBinaryExpression* _tmp31_; ValaCCodeFunction* _tmp32_; ValaCCodeFunction* _tmp33_; ValaCCodeVariableDeclarator* _tmp34_; ValaCCodeVariableDeclarator* _tmp35_; ValaStruct* _tmp36_; ValaCCodeFunction* _tmp37_; ValaCCodeFunction* _tmp38_; ValaCCodeIdentifier* _tmp39_; ValaCCodeIdentifier* _tmp40_; ValaCCodeFunctionCall* _tmp41_; ValaCCodeFunctionCall* _tmp42_; ValaCCodeFunctionCall* carrfree; ValaCCodeFunctionCall* _tmp43_; ValaCCodeIdentifier* _tmp44_; ValaCCodeIdentifier* _tmp45_; ValaCCodeFunction* _tmp46_; ValaCCodeFunction* _tmp47_; ValaCCodeFunctionCall* _tmp48_; ValaCCodeFile* _tmp49_; ValaCCodeFunction* _tmp50_; ValaCCodeFile* _tmp51_; ValaCCodeFunction* _tmp52_; self = (ValaCCodeArrayModule*) base; g_return_val_if_fail (st != NULL, NULL); _tmp0_ = st; _tmp1_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp0_); _tmp2_ = _tmp1_; _tmp3_ = g_strdup_printf ("_vala_%s_array_free", _tmp2_); _tmp4_ = _tmp3_; _g_free0 (_tmp2_); cname = _tmp4_; _tmp5_ = ((ValaCCodeBaseModule*) self)->cfile; _tmp6_ = cname; _tmp7_ = vala_ccode_file_add_declaration (_tmp5_, _tmp6_); if (_tmp7_) { result = cname; return result; } _tmp8_ = cname; _tmp9_ = vala_ccode_function_new (_tmp8_, "void"); fun = _tmp9_; _tmp10_ = fun; vala_ccode_function_set_modifiers (_tmp10_, VALA_CCODE_MODIFIERS_STATIC); _tmp11_ = fun; _tmp12_ = st; _tmp13_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp12_); _tmp14_ = _tmp13_; _tmp15_ = g_strdup_printf ("%s*", _tmp14_); _tmp16_ = _tmp15_; _tmp17_ = vala_ccode_parameter_new ("array", _tmp16_); _tmp18_ = _tmp17_; vala_ccode_function_add_parameter (_tmp11_, _tmp18_); _vala_ccode_node_unref0 (_tmp18_); _g_free0 (_tmp16_); _g_free0 (_tmp14_); _tmp19_ = fun; _tmp20_ = vala_ccode_parameter_new ("array_length", "gint"); _tmp21_ = _tmp20_; vala_ccode_function_add_parameter (_tmp19_, _tmp21_); _vala_ccode_node_unref0 (_tmp21_); _tmp22_ = fun; vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, _tmp22_); _tmp23_ = vala_ccode_identifier_new ("array"); _tmp24_ = _tmp23_; _tmp25_ = vala_ccode_constant_new ("NULL"); _tmp26_ = _tmp25_; _tmp27_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_INEQUALITY, (ValaCCodeExpression*) _tmp24_, (ValaCCodeExpression*) _tmp26_); _tmp28_ = _tmp27_; _vala_ccode_node_unref0 (_tmp26_); _vala_ccode_node_unref0 (_tmp24_); ccondarr = _tmp28_; _tmp29_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp30_ = _tmp29_; _tmp31_ = ccondarr; vala_ccode_function_open_if (_tmp30_, (ValaCCodeExpression*) _tmp31_); _tmp32_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp33_ = _tmp32_; _tmp34_ = vala_ccode_variable_declarator_new ("i", NULL, NULL); _tmp35_ = _tmp34_; vala_ccode_function_add_declaration (_tmp33_, "int", (ValaCCodeDeclarator*) _tmp35_, 0); _vala_ccode_node_unref0 (_tmp35_); _tmp36_ = st; vala_ccode_array_module_append_struct_array_free_loop (self, _tmp36_); _tmp37_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp38_ = _tmp37_; vala_ccode_function_close (_tmp38_); _tmp39_ = vala_ccode_identifier_new ("g_free"); _tmp40_ = _tmp39_; _tmp41_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp40_); _tmp42_ = _tmp41_; _vala_ccode_node_unref0 (_tmp40_); carrfree = _tmp42_; _tmp43_ = carrfree; _tmp44_ = vala_ccode_identifier_new ("array"); _tmp45_ = _tmp44_; vala_ccode_function_call_add_argument (_tmp43_, (ValaCCodeExpression*) _tmp45_); _vala_ccode_node_unref0 (_tmp45_); _tmp46_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp47_ = _tmp46_; _tmp48_ = carrfree; vala_ccode_function_add_expression (_tmp47_, (ValaCCodeExpression*) _tmp48_); vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self); _tmp49_ = ((ValaCCodeBaseModule*) self)->cfile; _tmp50_ = fun; vala_ccode_file_add_function_declaration (_tmp49_, _tmp50_); _tmp51_ = ((ValaCCodeBaseModule*) self)->cfile; _tmp52_ = fun; vala_ccode_file_add_function (_tmp51_, _tmp52_); result = cname; _vala_ccode_node_unref0 (carrfree); _vala_ccode_node_unref0 (ccondarr); _vala_ccode_node_unref0 (fun); return result; } static void vala_ccode_array_module_append_vala_array_free_loop (ValaCCodeArrayModule* self) { ValaCCodeIdentifier* _tmp0_; ValaCCodeIdentifier* _tmp1_; ValaCCodeConstant* _tmp2_; ValaCCodeConstant* _tmp3_; ValaCCodeAssignment* _tmp4_; ValaCCodeAssignment* _tmp5_; ValaCCodeAssignment* cforinit; ValaCCodeIdentifier* _tmp6_; ValaCCodeIdentifier* _tmp7_; ValaCCodeIdentifier* _tmp8_; ValaCCodeIdentifier* _tmp9_; ValaCCodeBinaryExpression* _tmp10_; ValaCCodeBinaryExpression* _tmp11_; ValaCCodeBinaryExpression* cforcond; ValaCCodeIdentifier* _tmp12_; ValaCCodeIdentifier* _tmp13_; ValaCCodeIdentifier* _tmp14_; ValaCCodeIdentifier* _tmp15_; ValaCCodeConstant* _tmp16_; ValaCCodeConstant* _tmp17_; ValaCCodeBinaryExpression* _tmp18_; ValaCCodeBinaryExpression* _tmp19_; ValaCCodeAssignment* _tmp20_; ValaCCodeAssignment* _tmp21_; ValaCCodeAssignment* cforiter; ValaCCodeFunction* _tmp22_; ValaCCodeFunction* _tmp23_; ValaCCodeIdentifier* _tmp24_; ValaCCodeIdentifier* _tmp25_; ValaCCodeCastExpression* _tmp26_; ValaCCodeCastExpression* _tmp27_; ValaCCodeCastExpression* cptrarray; ValaCCodeIdentifier* _tmp28_; ValaCCodeIdentifier* _tmp29_; ValaCCodeElementAccess* _tmp30_; ValaCCodeElementAccess* _tmp31_; ValaCCodeElementAccess* cea; ValaCCodeConstant* _tmp32_; ValaCCodeConstant* _tmp33_; ValaCCodeBinaryExpression* _tmp34_; ValaCCodeBinaryExpression* _tmp35_; ValaCCodeBinaryExpression* cfreecond; ValaCCodeFunction* _tmp36_; ValaCCodeFunction* _tmp37_; ValaCCodeIdentifier* _tmp38_; ValaCCodeIdentifier* _tmp39_; ValaCCodeFunctionCall* _tmp40_; ValaCCodeFunctionCall* _tmp41_; ValaCCodeFunctionCall* cfreecall; ValaCCodeFunction* _tmp42_; ValaCCodeFunction* _tmp43_; ValaCCodeFunction* _tmp44_; ValaCCodeFunction* _tmp45_; g_return_if_fail (self != NULL); _tmp0_ = vala_ccode_identifier_new ("i"); _tmp1_ = _tmp0_; _tmp2_ = vala_ccode_constant_new ("0"); _tmp3_ = _tmp2_; _tmp4_ = vala_ccode_assignment_new ((ValaCCodeExpression*) _tmp1_, (ValaCCodeExpression*) _tmp3_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE); _tmp5_ = _tmp4_; _vala_ccode_node_unref0 (_tmp3_); _vala_ccode_node_unref0 (_tmp1_); cforinit = _tmp5_; _tmp6_ = vala_ccode_identifier_new ("i"); _tmp7_ = _tmp6_; _tmp8_ = vala_ccode_identifier_new ("array_length"); _tmp9_ = _tmp8_; _tmp10_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_LESS_THAN, (ValaCCodeExpression*) _tmp7_, (ValaCCodeExpression*) _tmp9_); _tmp11_ = _tmp10_; _vala_ccode_node_unref0 (_tmp9_); _vala_ccode_node_unref0 (_tmp7_); cforcond = _tmp11_; _tmp12_ = vala_ccode_identifier_new ("i"); _tmp13_ = _tmp12_; _tmp14_ = vala_ccode_identifier_new ("i"); _tmp15_ = _tmp14_; _tmp16_ = vala_ccode_constant_new ("1"); _tmp17_ = _tmp16_; _tmp18_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) _tmp15_, (ValaCCodeExpression*) _tmp17_); _tmp19_ = _tmp18_; _tmp20_ = vala_ccode_assignment_new ((ValaCCodeExpression*) _tmp13_, (ValaCCodeExpression*) _tmp19_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE); _tmp21_ = _tmp20_; _vala_ccode_node_unref0 (_tmp19_); _vala_ccode_node_unref0 (_tmp17_); _vala_ccode_node_unref0 (_tmp15_); _vala_ccode_node_unref0 (_tmp13_); cforiter = _tmp21_; _tmp22_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp23_ = _tmp22_; vala_ccode_function_open_for (_tmp23_, (ValaCCodeExpression*) cforinit, (ValaCCodeExpression*) cforcond, (ValaCCodeExpression*) cforiter); _tmp24_ = vala_ccode_identifier_new ("array"); _tmp25_ = _tmp24_; _tmp26_ = vala_ccode_cast_expression_new ((ValaCCodeExpression*) _tmp25_, "gpointer*"); _tmp27_ = _tmp26_; _vala_ccode_node_unref0 (_tmp25_); cptrarray = _tmp27_; _tmp28_ = vala_ccode_identifier_new ("i"); _tmp29_ = _tmp28_; _tmp30_ = vala_ccode_element_access_new ((ValaCCodeExpression*) cptrarray, (ValaCCodeExpression*) _tmp29_); _tmp31_ = _tmp30_; _vala_ccode_node_unref0 (_tmp29_); cea = _tmp31_; _tmp32_ = vala_ccode_constant_new ("NULL"); _tmp33_ = _tmp32_; _tmp34_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_INEQUALITY, (ValaCCodeExpression*) cea, (ValaCCodeExpression*) _tmp33_); _tmp35_ = _tmp34_; _vala_ccode_node_unref0 (_tmp33_); cfreecond = _tmp35_; _tmp36_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp37_ = _tmp36_; vala_ccode_function_open_if (_tmp37_, (ValaCCodeExpression*) cfreecond); _tmp38_ = vala_ccode_identifier_new ("destroy_func"); _tmp39_ = _tmp38_; _tmp40_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp39_); _tmp41_ = _tmp40_; _vala_ccode_node_unref0 (_tmp39_); cfreecall = _tmp41_; vala_ccode_function_call_add_argument (cfreecall, (ValaCCodeExpression*) cea); _tmp42_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp43_ = _tmp42_; vala_ccode_function_add_expression (_tmp43_, (ValaCCodeExpression*) cfreecall); _tmp44_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp45_ = _tmp44_; vala_ccode_function_close (_tmp45_); _vala_ccode_node_unref0 (cfreecall); _vala_ccode_node_unref0 (cfreecond); _vala_ccode_node_unref0 (cea); _vala_ccode_node_unref0 (cptrarray); _vala_ccode_node_unref0 (cforiter); _vala_ccode_node_unref0 (cforcond); _vala_ccode_node_unref0 (cforinit); } static void vala_ccode_array_module_real_append_vala_array_free (ValaCCodeBaseModule* base) { ValaCCodeArrayModule * self; ValaCCodeFunction* _tmp0_; ValaCCodeFunction* fun; ValaCCodeFunction* _tmp1_; ValaCCodeFunction* _tmp2_; ValaCCodeParameter* _tmp3_; ValaCCodeParameter* _tmp4_; ValaCCodeFunction* _tmp5_; ValaCCodeParameter* _tmp6_; ValaCCodeParameter* _tmp7_; ValaCCodeFunction* _tmp8_; ValaCCodeParameter* _tmp9_; ValaCCodeParameter* _tmp10_; ValaCCodeFunction* _tmp11_; ValaCCodeIdentifier* _tmp12_; ValaCCodeIdentifier* _tmp13_; ValaCCodeConstant* _tmp14_; ValaCCodeConstant* _tmp15_; ValaCCodeBinaryExpression* _tmp16_; ValaCCodeBinaryExpression* _tmp17_; ValaCCodeBinaryExpression* ccondarr; ValaCCodeIdentifier* _tmp18_; ValaCCodeIdentifier* _tmp19_; ValaCCodeConstant* _tmp20_; ValaCCodeConstant* _tmp21_; ValaCCodeBinaryExpression* _tmp22_; ValaCCodeBinaryExpression* _tmp23_; ValaCCodeBinaryExpression* ccondfunc; ValaCCodeFunction* _tmp24_; ValaCCodeFunction* _tmp25_; ValaCCodeBinaryExpression* _tmp26_; ValaCCodeBinaryExpression* _tmp27_; ValaCCodeFunction* _tmp28_; ValaCCodeFunction* _tmp29_; ValaCCodeVariableDeclarator* _tmp30_; ValaCCodeVariableDeclarator* _tmp31_; ValaCCodeFunction* _tmp32_; ValaCCodeFunction* _tmp33_; ValaCCodeFile* _tmp34_; ValaCCodeFunction* _tmp35_; ValaCCodeFile* _tmp36_; ValaCCodeFunction* _tmp37_; ValaCCodeFunction* _tmp38_; ValaCCodeFunction* _tmp39_; ValaCCodeFunction* _tmp40_; ValaCCodeParameter* _tmp41_; ValaCCodeParameter* _tmp42_; ValaCCodeFunction* _tmp43_; ValaCCodeParameter* _tmp44_; ValaCCodeParameter* _tmp45_; ValaCCodeFunction* _tmp46_; ValaCCodeParameter* _tmp47_; ValaCCodeParameter* _tmp48_; ValaCCodeFunction* _tmp49_; ValaCCodeIdentifier* _tmp50_; ValaCCodeIdentifier* _tmp51_; ValaCCodeFunctionCall* _tmp52_; ValaCCodeFunctionCall* _tmp53_; ValaCCodeFunctionCall* ccall; ValaCCodeIdentifier* _tmp54_; ValaCCodeIdentifier* _tmp55_; ValaCCodeIdentifier* _tmp56_; ValaCCodeIdentifier* _tmp57_; ValaCCodeIdentifier* _tmp58_; ValaCCodeIdentifier* _tmp59_; ValaCCodeFunction* _tmp60_; ValaCCodeFunction* _tmp61_; ValaCCodeIdentifier* _tmp62_; ValaCCodeIdentifier* _tmp63_; ValaCCodeFunctionCall* _tmp64_; ValaCCodeFunctionCall* _tmp65_; ValaCCodeFunctionCall* carrfree; ValaCCodeIdentifier* _tmp66_; ValaCCodeIdentifier* _tmp67_; ValaCCodeFunction* _tmp68_; ValaCCodeFunction* _tmp69_; ValaCCodeFile* _tmp70_; ValaCCodeFunction* _tmp71_; ValaCCodeFile* _tmp72_; ValaCCodeFunction* _tmp73_; self = (ValaCCodeArrayModule*) base; _tmp0_ = vala_ccode_function_new ("_vala_array_destroy", "void"); fun = _tmp0_; _tmp1_ = fun; vala_ccode_function_set_modifiers (_tmp1_, VALA_CCODE_MODIFIERS_STATIC); _tmp2_ = fun; _tmp3_ = vala_ccode_parameter_new ("array", "gpointer"); _tmp4_ = _tmp3_; vala_ccode_function_add_parameter (_tmp2_, _tmp4_); _vala_ccode_node_unref0 (_tmp4_); _tmp5_ = fun; _tmp6_ = vala_ccode_parameter_new ("array_length", "gint"); _tmp7_ = _tmp6_; vala_ccode_function_add_parameter (_tmp5_, _tmp7_); _vala_ccode_node_unref0 (_tmp7_); _tmp8_ = fun; _tmp9_ = vala_ccode_parameter_new ("destroy_func", "GDestroyNotify"); _tmp10_ = _tmp9_; vala_ccode_function_add_parameter (_tmp8_, _tmp10_); _vala_ccode_node_unref0 (_tmp10_); _tmp11_ = fun; vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, _tmp11_); _tmp12_ = vala_ccode_identifier_new ("array"); _tmp13_ = _tmp12_; _tmp14_ = vala_ccode_constant_new ("NULL"); _tmp15_ = _tmp14_; _tmp16_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_INEQUALITY, (ValaCCodeExpression*) _tmp13_, (ValaCCodeExpression*) _tmp15_); _tmp17_ = _tmp16_; _vala_ccode_node_unref0 (_tmp15_); _vala_ccode_node_unref0 (_tmp13_); ccondarr = _tmp17_; _tmp18_ = vala_ccode_identifier_new ("destroy_func"); _tmp19_ = _tmp18_; _tmp20_ = vala_ccode_constant_new ("NULL"); _tmp21_ = _tmp20_; _tmp22_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_INEQUALITY, (ValaCCodeExpression*) _tmp19_, (ValaCCodeExpression*) _tmp21_); _tmp23_ = _tmp22_; _vala_ccode_node_unref0 (_tmp21_); _vala_ccode_node_unref0 (_tmp19_); ccondfunc = _tmp23_; _tmp24_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp25_ = _tmp24_; _tmp26_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_AND, (ValaCCodeExpression*) ccondarr, (ValaCCodeExpression*) ccondfunc); _tmp27_ = _tmp26_; vala_ccode_function_open_if (_tmp25_, (ValaCCodeExpression*) _tmp27_); _vala_ccode_node_unref0 (_tmp27_); _tmp28_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp29_ = _tmp28_; _tmp30_ = vala_ccode_variable_declarator_new ("i", NULL, NULL); _tmp31_ = _tmp30_; vala_ccode_function_add_declaration (_tmp29_, "int", (ValaCCodeDeclarator*) _tmp31_, 0); _vala_ccode_node_unref0 (_tmp31_); vala_ccode_array_module_append_vala_array_free_loop (self); _tmp32_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp33_ = _tmp32_; vala_ccode_function_close (_tmp33_); vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self); _tmp34_ = ((ValaCCodeBaseModule*) self)->cfile; _tmp35_ = fun; vala_ccode_file_add_function_declaration (_tmp34_, _tmp35_); _tmp36_ = ((ValaCCodeBaseModule*) self)->cfile; _tmp37_ = fun; vala_ccode_file_add_function (_tmp36_, _tmp37_); _tmp38_ = vala_ccode_function_new ("_vala_array_free", "void"); _vala_ccode_node_unref0 (fun); fun = _tmp38_; _tmp39_ = fun; vala_ccode_function_set_modifiers (_tmp39_, VALA_CCODE_MODIFIERS_STATIC); _tmp40_ = fun; _tmp41_ = vala_ccode_parameter_new ("array", "gpointer"); _tmp42_ = _tmp41_; vala_ccode_function_add_parameter (_tmp40_, _tmp42_); _vala_ccode_node_unref0 (_tmp42_); _tmp43_ = fun; _tmp44_ = vala_ccode_parameter_new ("array_length", "gint"); _tmp45_ = _tmp44_; vala_ccode_function_add_parameter (_tmp43_, _tmp45_); _vala_ccode_node_unref0 (_tmp45_); _tmp46_ = fun; _tmp47_ = vala_ccode_parameter_new ("destroy_func", "GDestroyNotify"); _tmp48_ = _tmp47_; vala_ccode_function_add_parameter (_tmp46_, _tmp48_); _vala_ccode_node_unref0 (_tmp48_); _tmp49_ = fun; vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, _tmp49_); _tmp50_ = vala_ccode_identifier_new ("_vala_array_destroy"); _tmp51_ = _tmp50_; _tmp52_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp51_); _tmp53_ = _tmp52_; _vala_ccode_node_unref0 (_tmp51_); ccall = _tmp53_; _tmp54_ = vala_ccode_identifier_new ("array"); _tmp55_ = _tmp54_; vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) _tmp55_); _vala_ccode_node_unref0 (_tmp55_); _tmp56_ = vala_ccode_identifier_new ("array_length"); _tmp57_ = _tmp56_; vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) _tmp57_); _vala_ccode_node_unref0 (_tmp57_); _tmp58_ = vala_ccode_identifier_new ("destroy_func"); _tmp59_ = _tmp58_; vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) _tmp59_); _vala_ccode_node_unref0 (_tmp59_); _tmp60_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp61_ = _tmp60_; vala_ccode_function_add_expression (_tmp61_, (ValaCCodeExpression*) ccall); _tmp62_ = vala_ccode_identifier_new ("g_free"); _tmp63_ = _tmp62_; _tmp64_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp63_); _tmp65_ = _tmp64_; _vala_ccode_node_unref0 (_tmp63_); carrfree = _tmp65_; _tmp66_ = vala_ccode_identifier_new ("array"); _tmp67_ = _tmp66_; vala_ccode_function_call_add_argument (carrfree, (ValaCCodeExpression*) _tmp67_); _vala_ccode_node_unref0 (_tmp67_); _tmp68_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp69_ = _tmp68_; vala_ccode_function_add_expression (_tmp69_, (ValaCCodeExpression*) carrfree); vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self); _tmp70_ = ((ValaCCodeBaseModule*) self)->cfile; _tmp71_ = fun; vala_ccode_file_add_function_declaration (_tmp70_, _tmp71_); _tmp72_ = ((ValaCCodeBaseModule*) self)->cfile; _tmp73_ = fun; vala_ccode_file_add_function (_tmp72_, _tmp73_); _vala_ccode_node_unref0 (carrfree); _vala_ccode_node_unref0 (ccall); _vala_ccode_node_unref0 (ccondfunc); _vala_ccode_node_unref0 (ccondarr); _vala_ccode_node_unref0 (fun); } static void vala_ccode_array_module_real_append_vala_array_move (ValaCCodeBaseModule* base) { ValaCCodeArrayModule * self; ValaCCodeFile* _tmp0_; ValaCCodeFunction* _tmp1_; ValaCCodeFunction* fun; ValaCCodeParameter* _tmp2_; ValaCCodeParameter* _tmp3_; ValaCCodeParameter* _tmp4_; ValaCCodeParameter* _tmp5_; ValaCCodeParameter* _tmp6_; ValaCCodeParameter* _tmp7_; ValaCCodeParameter* _tmp8_; ValaCCodeParameter* _tmp9_; ValaCCodeParameter* _tmp10_; ValaCCodeParameter* _tmp11_; ValaCCodeIdentifier* _tmp12_; ValaCCodeIdentifier* _tmp13_; ValaCCodeCastExpression* _tmp14_; ValaCCodeCastExpression* _tmp15_; ValaCCodeCastExpression* array; ValaCCodeIdentifier* _tmp16_; ValaCCodeIdentifier* element_size; ValaCCodeIdentifier* _tmp17_; ValaCCodeIdentifier* length; ValaCCodeIdentifier* _tmp18_; ValaCCodeIdentifier* src; ValaCCodeIdentifier* _tmp19_; ValaCCodeIdentifier* dest; ValaCCodeBinaryExpression* _tmp20_; ValaCCodeBinaryExpression* _tmp21_; ValaCCodeBinaryExpression* _tmp22_; ValaCCodeBinaryExpression* _tmp23_; ValaCCodeBinaryExpression* src_address; ValaCCodeBinaryExpression* _tmp24_; ValaCCodeBinaryExpression* _tmp25_; ValaCCodeBinaryExpression* _tmp26_; ValaCCodeBinaryExpression* _tmp27_; ValaCCodeBinaryExpression* dest_address; ValaCCodeBinaryExpression* _tmp28_; ValaCCodeBinaryExpression* _tmp29_; ValaCCodeBinaryExpression* _tmp30_; ValaCCodeBinaryExpression* _tmp31_; ValaCCodeBinaryExpression* _tmp32_; ValaCCodeBinaryExpression* _tmp33_; ValaCCodeBinaryExpression* dest_end_address; ValaCCodeIdentifier* _tmp34_; ValaCCodeIdentifier* _tmp35_; ValaCCodeFunctionCall* _tmp36_; ValaCCodeFunctionCall* _tmp37_; ValaCCodeFunctionCall* ccall; ValaCCodeBinaryExpression* _tmp38_; ValaCCodeBinaryExpression* _tmp39_; ValaCCodeFunction* _tmp40_; ValaCCodeFunction* _tmp41_; ValaCCodeFunction* _tmp42_; ValaCCodeFunction* _tmp43_; ValaCCodeBinaryExpression* _tmp44_; ValaCCodeBinaryExpression* _tmp45_; ValaCCodeIdentifier* _tmp46_; ValaCCodeIdentifier* _tmp47_; ValaCCodeFunctionCall* _tmp48_; ValaCCodeFunctionCall* _tmp49_; ValaCCodeFunctionCall* czero1; ValaCCodeConstant* _tmp50_; ValaCCodeConstant* _tmp51_; ValaCCodeBinaryExpression* _tmp52_; ValaCCodeBinaryExpression* _tmp53_; ValaCCodeBinaryExpression* _tmp54_; ValaCCodeBinaryExpression* _tmp55_; ValaCCodeFunction* _tmp56_; ValaCCodeFunction* _tmp57_; ValaCCodeFunction* _tmp58_; ValaCCodeFunction* _tmp59_; ValaCCodeIdentifier* _tmp60_; ValaCCodeIdentifier* _tmp61_; ValaCCodeFunctionCall* _tmp62_; ValaCCodeFunctionCall* _tmp63_; ValaCCodeFunctionCall* czero2; ValaCCodeConstant* _tmp64_; ValaCCodeConstant* _tmp65_; ValaCCodeBinaryExpression* _tmp66_; ValaCCodeBinaryExpression* _tmp67_; ValaCCodeBinaryExpression* _tmp68_; ValaCCodeBinaryExpression* _tmp69_; ValaCCodeFunction* _tmp70_; ValaCCodeFunction* _tmp71_; ValaCCodeFunction* _tmp72_; ValaCCodeFunction* _tmp73_; ValaCCodeFile* _tmp74_; ValaCCodeFile* _tmp75_; self = (ValaCCodeArrayModule*) base; _tmp0_ = ((ValaCCodeBaseModule*) self)->cfile; vala_ccode_file_add_include (_tmp0_, "string.h", FALSE); _tmp1_ = vala_ccode_function_new ("_vala_array_move", "void"); fun = _tmp1_; vala_ccode_function_set_modifiers (fun, VALA_CCODE_MODIFIERS_STATIC); _tmp2_ = vala_ccode_parameter_new ("array", "gpointer"); _tmp3_ = _tmp2_; vala_ccode_function_add_parameter (fun, _tmp3_); _vala_ccode_node_unref0 (_tmp3_); _tmp4_ = vala_ccode_parameter_new ("element_size", "gsize"); _tmp5_ = _tmp4_; vala_ccode_function_add_parameter (fun, _tmp5_); _vala_ccode_node_unref0 (_tmp5_); _tmp6_ = vala_ccode_parameter_new ("src", "gint"); _tmp7_ = _tmp6_; vala_ccode_function_add_parameter (fun, _tmp7_); _vala_ccode_node_unref0 (_tmp7_); _tmp8_ = vala_ccode_parameter_new ("dest", "gint"); _tmp9_ = _tmp8_; vala_ccode_function_add_parameter (fun, _tmp9_); _vala_ccode_node_unref0 (_tmp9_); _tmp10_ = vala_ccode_parameter_new ("length", "gint"); _tmp11_ = _tmp10_; vala_ccode_function_add_parameter (fun, _tmp11_); _vala_ccode_node_unref0 (_tmp11_); vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, fun); _tmp12_ = vala_ccode_identifier_new ("array"); _tmp13_ = _tmp12_; _tmp14_ = vala_ccode_cast_expression_new ((ValaCCodeExpression*) _tmp13_, "char*"); _tmp15_ = _tmp14_; _vala_ccode_node_unref0 (_tmp13_); array = _tmp15_; _tmp16_ = vala_ccode_identifier_new ("element_size"); element_size = _tmp16_; _tmp17_ = vala_ccode_identifier_new ("length"); length = _tmp17_; _tmp18_ = vala_ccode_identifier_new ("src"); src = _tmp18_; _tmp19_ = vala_ccode_identifier_new ("dest"); dest = _tmp19_; _tmp20_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) src, (ValaCCodeExpression*) element_size); _tmp21_ = _tmp20_; _tmp22_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) array, (ValaCCodeExpression*) _tmp21_); _tmp23_ = _tmp22_; _vala_ccode_node_unref0 (_tmp21_); src_address = _tmp23_; _tmp24_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) dest, (ValaCCodeExpression*) element_size); _tmp25_ = _tmp24_; _tmp26_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) array, (ValaCCodeExpression*) _tmp25_); _tmp27_ = _tmp26_; _vala_ccode_node_unref0 (_tmp25_); dest_address = _tmp27_; _tmp28_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) dest, (ValaCCodeExpression*) length); _tmp29_ = _tmp28_; _tmp30_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) _tmp29_, (ValaCCodeExpression*) element_size); _tmp31_ = _tmp30_; _tmp32_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) array, (ValaCCodeExpression*) _tmp31_); _tmp33_ = _tmp32_; _vala_ccode_node_unref0 (_tmp31_); _vala_ccode_node_unref0 (_tmp29_); dest_end_address = _tmp33_; _tmp34_ = vala_ccode_identifier_new ("g_memmove"); _tmp35_ = _tmp34_; _tmp36_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp35_); _tmp37_ = _tmp36_; _vala_ccode_node_unref0 (_tmp35_); ccall = _tmp37_; vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) dest_address); vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) src_address); _tmp38_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) length, (ValaCCodeExpression*) element_size); _tmp39_ = _tmp38_; vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) _tmp39_); _vala_ccode_node_unref0 (_tmp39_); _tmp40_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp41_ = _tmp40_; vala_ccode_function_add_expression (_tmp41_, (ValaCCodeExpression*) ccall); _tmp42_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp43_ = _tmp42_; _tmp44_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_LESS_THAN, (ValaCCodeExpression*) src, (ValaCCodeExpression*) dest); _tmp45_ = _tmp44_; vala_ccode_function_open_if (_tmp43_, (ValaCCodeExpression*) _tmp45_); _vala_ccode_node_unref0 (_tmp45_); _tmp46_ = vala_ccode_identifier_new ("memset"); _tmp47_ = _tmp46_; _tmp48_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp47_); _tmp49_ = _tmp48_; _vala_ccode_node_unref0 (_tmp47_); czero1 = _tmp49_; vala_ccode_function_call_add_argument (czero1, (ValaCCodeExpression*) src_address); _tmp50_ = vala_ccode_constant_new ("0"); _tmp51_ = _tmp50_; vala_ccode_function_call_add_argument (czero1, (ValaCCodeExpression*) _tmp51_); _vala_ccode_node_unref0 (_tmp51_); _tmp52_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MINUS, (ValaCCodeExpression*) dest, (ValaCCodeExpression*) src); _tmp53_ = _tmp52_; _tmp54_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) _tmp53_, (ValaCCodeExpression*) element_size); _tmp55_ = _tmp54_; vala_ccode_function_call_add_argument (czero1, (ValaCCodeExpression*) _tmp55_); _vala_ccode_node_unref0 (_tmp55_); _vala_ccode_node_unref0 (_tmp53_); _tmp56_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp57_ = _tmp56_; vala_ccode_function_add_expression (_tmp57_, (ValaCCodeExpression*) czero1); _tmp58_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp59_ = _tmp58_; vala_ccode_function_add_else (_tmp59_); _tmp60_ = vala_ccode_identifier_new ("memset"); _tmp61_ = _tmp60_; _tmp62_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp61_); _tmp63_ = _tmp62_; _vala_ccode_node_unref0 (_tmp61_); czero2 = _tmp63_; vala_ccode_function_call_add_argument (czero2, (ValaCCodeExpression*) dest_end_address); _tmp64_ = vala_ccode_constant_new ("0"); _tmp65_ = _tmp64_; vala_ccode_function_call_add_argument (czero2, (ValaCCodeExpression*) _tmp65_); _vala_ccode_node_unref0 (_tmp65_); _tmp66_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MINUS, (ValaCCodeExpression*) src, (ValaCCodeExpression*) dest); _tmp67_ = _tmp66_; _tmp68_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) _tmp67_, (ValaCCodeExpression*) element_size); _tmp69_ = _tmp68_; vala_ccode_function_call_add_argument (czero2, (ValaCCodeExpression*) _tmp69_); _vala_ccode_node_unref0 (_tmp69_); _vala_ccode_node_unref0 (_tmp67_); _tmp70_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp71_ = _tmp70_; vala_ccode_function_add_expression (_tmp71_, (ValaCCodeExpression*) czero2); _tmp72_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp73_ = _tmp72_; vala_ccode_function_close (_tmp73_); vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self); _tmp74_ = ((ValaCCodeBaseModule*) self)->cfile; vala_ccode_file_add_function_declaration (_tmp74_, fun); _tmp75_ = ((ValaCCodeBaseModule*) self)->cfile; vala_ccode_file_add_function (_tmp75_, fun); _vala_ccode_node_unref0 (czero2); _vala_ccode_node_unref0 (czero1); _vala_ccode_node_unref0 (ccall); _vala_ccode_node_unref0 (dest_end_address); _vala_ccode_node_unref0 (dest_address); _vala_ccode_node_unref0 (src_address); _vala_ccode_node_unref0 (dest); _vala_ccode_node_unref0 (src); _vala_ccode_node_unref0 (length); _vala_ccode_node_unref0 (element_size); _vala_ccode_node_unref0 (array); _vala_ccode_node_unref0 (fun); } static void vala_ccode_array_module_real_append_vala_array_length (ValaCCodeBaseModule* base) { ValaCCodeArrayModule * self; ValaCCodeFunction* _tmp0_; ValaCCodeFunction* fun; ValaCCodeParameter* _tmp1_; ValaCCodeParameter* _tmp2_; ValaCCodeFunction* _tmp3_; ValaCCodeFunction* _tmp4_; ValaCCodeConstant* _tmp5_; ValaCCodeConstant* _tmp6_; ValaCCodeVariableDeclarator* _tmp7_; ValaCCodeVariableDeclarator* _tmp8_; ValaCCodeIdentifier* _tmp9_; ValaCCodeIdentifier* array_check; ValaCCodeFunction* _tmp10_; ValaCCodeFunction* _tmp11_; ValaCCodeIdentifier* _tmp12_; ValaCCodeIdentifier* _tmp13_; ValaCCodeCastExpression* _tmp14_; ValaCCodeCastExpression* _tmp15_; ValaCCodeConstant* _tmp16_; ValaCCodeConstant* _tmp17_; ValaCCodeElementAccess* _tmp18_; ValaCCodeElementAccess* _tmp19_; ValaCCodeElementAccess* array_element_check; ValaCCodeFunction* _tmp20_; ValaCCodeFunction* _tmp21_; ValaCCodeFunction* _tmp22_; ValaCCodeFunction* _tmp23_; ValaCCodeIdentifier* _tmp24_; ValaCCodeIdentifier* _tmp25_; ValaCCodeUnaryExpression* _tmp26_; ValaCCodeUnaryExpression* _tmp27_; ValaCCodeFunction* _tmp28_; ValaCCodeFunction* _tmp29_; ValaCCodeFunction* _tmp30_; ValaCCodeFunction* _tmp31_; ValaCCodeFunction* _tmp32_; ValaCCodeFunction* _tmp33_; ValaCCodeIdentifier* _tmp34_; ValaCCodeIdentifier* _tmp35_; ValaCCodeFile* _tmp36_; ValaCCodeFile* _tmp37_; self = (ValaCCodeArrayModule*) base; _tmp0_ = vala_ccode_function_new ("_vala_array_length", "gint"); fun = _tmp0_; vala_ccode_function_set_modifiers (fun, VALA_CCODE_MODIFIERS_STATIC); _tmp1_ = vala_ccode_parameter_new ("array", "gpointer"); _tmp2_ = _tmp1_; vala_ccode_function_add_parameter (fun, _tmp2_); _vala_ccode_node_unref0 (_tmp2_); vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, fun); _tmp3_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp4_ = _tmp3_; _tmp5_ = vala_ccode_constant_new ("0"); _tmp6_ = _tmp5_; _tmp7_ = vala_ccode_variable_declarator_new ("length", (ValaCCodeExpression*) _tmp6_, NULL); _tmp8_ = _tmp7_; vala_ccode_function_add_declaration (_tmp4_, "int", (ValaCCodeDeclarator*) _tmp8_, 0); _vala_ccode_node_unref0 (_tmp8_); _vala_ccode_node_unref0 (_tmp6_); _tmp9_ = vala_ccode_identifier_new ("array"); array_check = _tmp9_; _tmp10_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp11_ = _tmp10_; vala_ccode_function_open_if (_tmp11_, (ValaCCodeExpression*) array_check); _tmp12_ = vala_ccode_identifier_new ("array"); _tmp13_ = _tmp12_; _tmp14_ = vala_ccode_cast_expression_new ((ValaCCodeExpression*) _tmp13_, "gpointer*"); _tmp15_ = _tmp14_; _tmp16_ = vala_ccode_constant_new ("length"); _tmp17_ = _tmp16_; _tmp18_ = vala_ccode_element_access_new ((ValaCCodeExpression*) _tmp15_, (ValaCCodeExpression*) _tmp17_); _tmp19_ = _tmp18_; _vala_ccode_node_unref0 (_tmp17_); _vala_ccode_node_unref0 (_tmp15_); _vala_ccode_node_unref0 (_tmp13_); array_element_check = _tmp19_; _tmp20_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp21_ = _tmp20_; vala_ccode_function_open_while (_tmp21_, (ValaCCodeExpression*) array_element_check); _tmp22_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp23_ = _tmp22_; _tmp24_ = vala_ccode_identifier_new ("length"); _tmp25_ = _tmp24_; _tmp26_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POSTFIX_INCREMENT, (ValaCCodeExpression*) _tmp25_); _tmp27_ = _tmp26_; vala_ccode_function_add_expression (_tmp23_, (ValaCCodeExpression*) _tmp27_); _vala_ccode_node_unref0 (_tmp27_); _vala_ccode_node_unref0 (_tmp25_); _tmp28_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp29_ = _tmp28_; vala_ccode_function_close (_tmp29_); _tmp30_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp31_ = _tmp30_; vala_ccode_function_close (_tmp31_); _tmp32_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp33_ = _tmp32_; _tmp34_ = vala_ccode_identifier_new ("length"); _tmp35_ = _tmp34_; vala_ccode_function_add_return (_tmp33_, (ValaCCodeExpression*) _tmp35_); _vala_ccode_node_unref0 (_tmp35_); vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self); _tmp36_ = ((ValaCCodeBaseModule*) self)->cfile; vala_ccode_file_add_function_declaration (_tmp36_, fun); _tmp37_ = ((ValaCCodeBaseModule*) self)->cfile; vala_ccode_file_add_function (_tmp37_, fun); _vala_ccode_node_unref0 (array_element_check); _vala_ccode_node_unref0 (array_check); _vala_ccode_node_unref0 (fun); } static ValaTargetValue* vala_ccode_array_module_real_copy_value (ValaCCodeBaseModule* base, ValaTargetValue* value, ValaCodeNode* node) { ValaCCodeArrayModule * self; ValaTargetValue* result = NULL; ValaTargetValue* _tmp0_; ValaDataType* _tmp1_; ValaDataType* _tmp2_; ValaDataType* _tmp3_; ValaDataType* type; ValaTargetValue* _tmp4_; ValaCCodeExpression* _tmp5_ = NULL; ValaCCodeExpression* cexpr; ValaDataType* _tmp6_; self = (ValaCCodeArrayModule*) base; g_return_val_if_fail (value != NULL, NULL); g_return_val_if_fail (node != NULL, NULL); _tmp0_ = value; _tmp1_ = vala_target_value_get_value_type (_tmp0_); _tmp2_ = _tmp1_; _tmp3_ = _vala_code_node_ref0 (_tmp2_); type = _tmp3_; _tmp4_ = value; _tmp5_ = vala_ccode_base_module_get_cvalue_ ((ValaCCodeBaseModule*) self, _tmp4_); cexpr = _tmp5_; _tmp6_ = type; if (VALA_IS_ARRAY_TYPE (_tmp6_)) { ValaDataType* _tmp7_; ValaArrayType* _tmp8_; ValaArrayType* array_type; ValaArrayType* _tmp9_; gboolean _tmp10_; gboolean _tmp11_; ValaDataType* _tmp15_; ValaCodeNode* _tmp16_; ValaTargetValue* _tmp17_ = NULL; ValaTargetValue* temp_value; ValaArrayType* _tmp18_; gchar* _tmp19_ = NULL; gchar* _tmp20_; ValaCCodeIdentifier* _tmp21_; ValaCCodeIdentifier* _tmp22_; ValaCCodeFunctionCall* _tmp23_; ValaCCodeFunctionCall* _tmp24_; ValaCCodeFunctionCall* copy_call; ValaCCodeFunctionCall* _tmp25_; ValaCCodeExpression* _tmp26_; ValaCCodeFunctionCall* _tmp27_; ValaTargetValue* _tmp28_; ValaCCodeExpression* _tmp29_ = NULL; ValaCCodeExpression* _tmp30_; ValaCCodeFunction* _tmp31_; ValaCCodeFunction* _tmp32_; ValaCCodeFunctionCall* _tmp33_; _tmp7_ = type; _tmp8_ = _vala_code_node_ref0 (VALA_ARRAY_TYPE (_tmp7_)); array_type = _tmp8_; _tmp9_ = array_type; _tmp10_ = vala_array_type_get_fixed_length (_tmp9_); _tmp11_ = _tmp10_; if (!_tmp11_) { ValaTargetValue* _tmp12_; ValaCodeNode* _tmp13_; ValaTargetValue* _tmp14_ = NULL; _tmp12_ = value; _tmp13_ = node; _tmp14_ = VALA_CCODE_BASE_MODULE_CLASS (vala_ccode_array_module_parent_class)->copy_value ((ValaCCodeBaseModule*) VALA_CCODE_METHOD_CALL_MODULE (self), _tmp12_, _tmp13_); result = _tmp14_; _vala_code_node_unref0 (array_type); _vala_ccode_node_unref0 (cexpr); _vala_code_node_unref0 (type); return result; } _tmp15_ = type; _tmp16_ = node; _tmp17_ = vala_ccode_base_module_create_temp_value ((ValaCCodeBaseModule*) self, _tmp15_, FALSE, _tmp16_, NULL); temp_value = _tmp17_; _tmp18_ = array_type; _tmp19_ = vala_ccode_array_module_generate_array_copy_wrapper (self, _tmp18_); _tmp20_ = _tmp19_; _tmp21_ = vala_ccode_identifier_new (_tmp20_); _tmp22_ = _tmp21_; _tmp23_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp22_); _tmp24_ = _tmp23_; _vala_ccode_node_unref0 (_tmp22_); _g_free0 (_tmp20_); copy_call = _tmp24_; _tmp25_ = copy_call; _tmp26_ = cexpr; vala_ccode_function_call_add_argument (_tmp25_, _tmp26_); _tmp27_ = copy_call; _tmp28_ = temp_value; _tmp29_ = vala_ccode_base_module_get_cvalue_ ((ValaCCodeBaseModule*) self, _tmp28_); _tmp30_ = _tmp29_; vala_ccode_function_call_add_argument (_tmp27_, _tmp30_); _vala_ccode_node_unref0 (_tmp30_); _tmp31_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp32_ = _tmp31_; _tmp33_ = copy_call; vala_ccode_function_add_expression (_tmp32_, (ValaCCodeExpression*) _tmp33_); result = temp_value; _vala_ccode_node_unref0 (copy_call); _vala_code_node_unref0 (array_type); _vala_ccode_node_unref0 (cexpr); _vala_code_node_unref0 (type); return result; } else { ValaTargetValue* _tmp34_; ValaCodeNode* _tmp35_; ValaTargetValue* _tmp36_ = NULL; _tmp34_ = value; _tmp35_ = node; _tmp36_ = VALA_CCODE_BASE_MODULE_CLASS (vala_ccode_array_module_parent_class)->copy_value ((ValaCCodeBaseModule*) VALA_CCODE_METHOD_CALL_MODULE (self), _tmp34_, _tmp35_); result = _tmp36_; _vala_ccode_node_unref0 (cexpr); _vala_code_node_unref0 (type); return result; } _vala_ccode_node_unref0 (cexpr); _vala_code_node_unref0 (type); } static ValaCCodeExpression* vala_ccode_array_module_real_get_dup_func_expression (ValaCCodeBaseModule* base, ValaDataType* type, ValaSourceReference* source_reference, gboolean is_chainup) { ValaCCodeArrayModule * self; ValaCCodeExpression* result = NULL; ValaDataType* _tmp0_; self = (ValaCCodeArrayModule*) base; g_return_val_if_fail (type != NULL, NULL); _tmp0_ = type; if (VALA_IS_ARRAY_TYPE (_tmp0_)) { ValaDataType* _tmp1_; ValaArrayType* _tmp2_; ValaArrayType* array_type; ValaArrayType* _tmp3_; gboolean _tmp4_; gboolean _tmp5_; ValaArrayType* _tmp6_; gchar* _tmp7_ = NULL; gchar* _tmp8_; ValaCCodeIdentifier* _tmp9_; ValaCCodeExpression* _tmp10_; _tmp1_ = type; _tmp2_ = _vala_code_node_ref0 (VALA_ARRAY_TYPE (_tmp1_)); array_type = _tmp2_; _tmp3_ = array_type; _tmp4_ = vala_array_type_get_fixed_length (_tmp3_); _tmp5_ = _tmp4_; g_assert (!_tmp5_); _tmp6_ = array_type; _tmp7_ = vala_ccode_array_module_generate_array_dup_wrapper (self, _tmp6_); _tmp8_ = _tmp7_; _tmp9_ = vala_ccode_identifier_new (_tmp8_); _tmp10_ = (ValaCCodeExpression*) _tmp9_; _g_free0 (_tmp8_); result = _tmp10_; _vala_code_node_unref0 (array_type); return result; } else { ValaDataType* _tmp11_; ValaSourceReference* _tmp12_; gboolean _tmp13_; ValaCCodeExpression* _tmp14_ = NULL; _tmp11_ = type; _tmp12_ = source_reference; _tmp13_ = is_chainup; _tmp14_ = VALA_CCODE_BASE_MODULE_CLASS (vala_ccode_array_module_parent_class)->get_dup_func_expression ((ValaCCodeBaseModule*) VALA_CCODE_METHOD_CALL_MODULE (self), _tmp11_, _tmp12_, _tmp13_); result = _tmp14_; return result; } } static ValaCCodeExpression* vala_ccode_array_module_real_destroy_value (ValaCCodeBaseModule* base, ValaTargetValue* value, gboolean is_macro_definition) { ValaCCodeArrayModule * self; ValaCCodeExpression* result = NULL; ValaTargetValue* _tmp0_; ValaDataType* _tmp1_; ValaDataType* _tmp2_; ValaDataType* _tmp3_; ValaDataType* type; ValaDataType* _tmp4_; self = (ValaCCodeArrayModule*) base; g_return_val_if_fail (value != NULL, NULL); _tmp0_ = value; _tmp1_ = vala_target_value_get_value_type (_tmp0_); _tmp2_ = _tmp1_; _tmp3_ = _vala_code_node_ref0 (_tmp2_); type = _tmp3_; _tmp4_ = type; if (VALA_IS_ARRAY_TYPE (_tmp4_)) { ValaDataType* _tmp5_; ValaArrayType* _tmp6_; ValaArrayType* array_type; ValaArrayType* _tmp7_; gboolean _tmp8_; gboolean _tmp9_; ValaDataType* _tmp13_; ValaCCodeExpression* _tmp14_ = NULL; ValaCCodeExpression* _tmp15_; ValaCCodeFunctionCall* _tmp16_; ValaCCodeFunctionCall* _tmp17_; ValaCCodeFunctionCall* ccall; ValaCCodeIdentifier* _tmp18_; ValaCCodeIdentifier* _tmp19_; ValaCCodeFunctionCall* _tmp20_; ValaCCodeFunctionCall* _tmp21_; ValaTargetValue* _tmp22_; ValaCCodeExpression* _tmp23_ = NULL; ValaCCodeExpression* _tmp24_; ValaCCodeFunctionCall* _tmp25_; ValaArrayType* _tmp26_; gint _tmp27_; gint _tmp28_; gchar* _tmp29_ = NULL; gchar* _tmp30_; ValaCCodeConstant* _tmp31_; ValaCCodeConstant* _tmp32_; ValaCCodeFunctionCall* _tmp33_; ValaArrayType* _tmp34_; ValaDataType* _tmp35_; ValaDataType* _tmp36_; ValaCCodeExpression* _tmp37_ = NULL; ValaCCodeExpression* _tmp38_; ValaCCodeCastExpression* _tmp39_; ValaCCodeCastExpression* _tmp40_; _tmp5_ = type; _tmp6_ = _vala_code_node_ref0 (VALA_ARRAY_TYPE (_tmp5_)); array_type = _tmp6_; _tmp7_ = array_type; _tmp8_ = vala_array_type_get_fixed_length (_tmp7_); _tmp9_ = _tmp8_; if (!_tmp9_) { ValaTargetValue* _tmp10_; gboolean _tmp11_; ValaCCodeExpression* _tmp12_ = NULL; _tmp10_ = value; _tmp11_ = is_macro_definition; _tmp12_ = VALA_CCODE_BASE_MODULE_CLASS (vala_ccode_array_module_parent_class)->destroy_value ((ValaCCodeBaseModule*) VALA_CCODE_METHOD_CALL_MODULE (self), _tmp10_, _tmp11_); result = _tmp12_; _vala_code_node_unref0 (array_type); _vala_code_node_unref0 (type); return result; } ((ValaCCodeBaseModule*) self)->requires_array_free = TRUE; _tmp13_ = type; _tmp14_ = vala_ccode_base_module_get_destroy_func_expression ((ValaCCodeBaseModule*) self, _tmp13_, FALSE); _tmp15_ = _tmp14_; _tmp16_ = vala_ccode_function_call_new (_tmp15_); _tmp17_ = _tmp16_; _vala_ccode_node_unref0 (_tmp15_); ccall = _tmp17_; _tmp18_ = vala_ccode_identifier_new ("_vala_array_destroy"); _tmp19_ = _tmp18_; _tmp20_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp19_); _vala_ccode_node_unref0 (ccall); ccall = _tmp20_; _vala_ccode_node_unref0 (_tmp19_); _tmp21_ = ccall; _tmp22_ = value; _tmp23_ = vala_ccode_base_module_get_cvalue_ ((ValaCCodeBaseModule*) self, _tmp22_); _tmp24_ = _tmp23_; vala_ccode_function_call_add_argument (_tmp21_, _tmp24_); _vala_ccode_node_unref0 (_tmp24_); _tmp25_ = ccall; _tmp26_ = array_type; _tmp27_ = vala_array_type_get_length (_tmp26_); _tmp28_ = _tmp27_; _tmp29_ = g_strdup_printf ("%d", _tmp28_); _tmp30_ = _tmp29_; _tmp31_ = vala_ccode_constant_new (_tmp30_); _tmp32_ = _tmp31_; vala_ccode_function_call_add_argument (_tmp25_, (ValaCCodeExpression*) _tmp32_); _vala_ccode_node_unref0 (_tmp32_); _g_free0 (_tmp30_); _tmp33_ = ccall; _tmp34_ = array_type; _tmp35_ = vala_array_type_get_element_type (_tmp34_); _tmp36_ = _tmp35_; _tmp37_ = vala_ccode_base_module_get_destroy_func_expression ((ValaCCodeBaseModule*) self, _tmp36_, FALSE); _tmp38_ = _tmp37_; _tmp39_ = vala_ccode_cast_expression_new (_tmp38_, "GDestroyNotify"); _tmp40_ = _tmp39_; vala_ccode_function_call_add_argument (_tmp33_, (ValaCCodeExpression*) _tmp40_); _vala_ccode_node_unref0 (_tmp40_); _vala_ccode_node_unref0 (_tmp38_); result = (ValaCCodeExpression*) ccall; _vala_code_node_unref0 (array_type); _vala_code_node_unref0 (type); return result; } else { ValaTargetValue* _tmp41_; gboolean _tmp42_; ValaCCodeExpression* _tmp43_ = NULL; _tmp41_ = value; _tmp42_ = is_macro_definition; _tmp43_ = VALA_CCODE_BASE_MODULE_CLASS (vala_ccode_array_module_parent_class)->destroy_value ((ValaCCodeBaseModule*) VALA_CCODE_METHOD_CALL_MODULE (self), _tmp41_, _tmp42_); result = _tmp43_; _vala_code_node_unref0 (type); return result; } _vala_code_node_unref0 (type); } static gchar* vala_ccode_array_module_generate_array_dup_wrapper (ValaCCodeArrayModule* self, ValaArrayType* array_type) { gchar* result = NULL; gint _tmp0_; gint _tmp1_; gchar* _tmp2_ = NULL; gchar* dup_func; const gchar* _tmp3_; gboolean _tmp4_ = FALSE; const gchar* _tmp5_; ValaArrayType* _tmp6_; gchar* _tmp7_ = NULL; gchar* _tmp8_; ValaCCodeFunction* _tmp9_; ValaCCodeFunction* _tmp10_; ValaCCodeFunction* function; ValaCCodeFunction* _tmp11_; ValaCCodeFunction* _tmp12_; ValaArrayType* _tmp13_; gchar* _tmp14_ = NULL; gchar* _tmp15_; ValaCCodeParameter* _tmp16_; ValaCCodeParameter* _tmp17_; ValaCCodeFunction* _tmp18_; ValaCCodeParameter* _tmp19_; ValaCCodeParameter* _tmp20_; ValaArrayType* _tmp21_; ValaDataType* _tmp22_; ValaDataType* _tmp23_; ValaCCodeBaseModuleEmitContext* _tmp39_; ValaCCodeBaseModuleEmitContext* _tmp40_; ValaCCodeFunction* _tmp41_; ValaArrayType* _tmp42_; ValaDataType* _tmp43_; ValaDataType* _tmp44_; gboolean _tmp45_ = FALSE; ValaCCodeFile* _tmp170_; ValaCCodeFunction* _tmp171_; ValaCCodeFile* _tmp172_; ValaCCodeFunction* _tmp173_; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (array_type != NULL, NULL); _tmp0_ = self->priv->next_array_dup_id; self->priv->next_array_dup_id = _tmp0_ + 1; _tmp1_ = self->priv->next_array_dup_id; _tmp2_ = g_strdup_printf ("_vala_array_dup%d", _tmp1_); dup_func = _tmp2_; _tmp3_ = dup_func; _tmp4_ = vala_ccode_base_module_add_wrapper ((ValaCCodeBaseModule*) self, _tmp3_); if (!_tmp4_) { result = dup_func; return result; } _tmp5_ = dup_func; _tmp6_ = array_type; _tmp7_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp6_); _tmp8_ = _tmp7_; _tmp9_ = vala_ccode_function_new (_tmp5_, _tmp8_); _tmp10_ = _tmp9_; _g_free0 (_tmp8_); function = _tmp10_; _tmp11_ = function; vala_ccode_function_set_modifiers (_tmp11_, VALA_CCODE_MODIFIERS_STATIC); _tmp12_ = function; _tmp13_ = array_type; _tmp14_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp13_); _tmp15_ = _tmp14_; _tmp16_ = vala_ccode_parameter_new ("self", _tmp15_); _tmp17_ = _tmp16_; vala_ccode_function_add_parameter (_tmp12_, _tmp17_); _vala_ccode_node_unref0 (_tmp17_); _g_free0 (_tmp15_); _tmp18_ = function; _tmp19_ = vala_ccode_parameter_new ("length", "int"); _tmp20_ = _tmp19_; vala_ccode_function_add_parameter (_tmp18_, _tmp20_); _vala_ccode_node_unref0 (_tmp20_); _tmp21_ = array_type; _tmp22_ = vala_array_type_get_element_type (_tmp21_); _tmp23_ = _tmp22_; if (VALA_IS_GENERIC_TYPE (_tmp23_)) { ValaArrayType* _tmp24_; ValaDataType* _tmp25_; ValaDataType* _tmp26_; ValaTypeParameter* _tmp27_; ValaTypeParameter* _tmp28_; const gchar* _tmp29_; const gchar* _tmp30_; gchar* _tmp31_ = NULL; gchar* _tmp32_; gchar* _tmp33_ = NULL; gchar* _tmp34_; gchar* func_name; ValaCCodeFunction* _tmp35_; const gchar* _tmp36_; ValaCCodeParameter* _tmp37_; ValaCCodeParameter* _tmp38_; _tmp24_ = array_type; _tmp25_ = vala_array_type_get_element_type (_tmp24_); _tmp26_ = _tmp25_; _tmp27_ = vala_data_type_get_type_parameter (_tmp26_); _tmp28_ = _tmp27_; _tmp29_ = vala_symbol_get_name ((ValaSymbol*) _tmp28_); _tmp30_ = _tmp29_; _tmp31_ = g_utf8_strdown (_tmp30_, (gssize) (-1)); _tmp32_ = _tmp31_; _tmp33_ = g_strdup_printf ("%s_dup_func", _tmp32_); _tmp34_ = _tmp33_; _g_free0 (_tmp32_); func_name = _tmp34_; _tmp35_ = function; _tmp36_ = func_name; _tmp37_ = vala_ccode_parameter_new (_tmp36_, "GBoxedCopyFunc"); _tmp38_ = _tmp37_; vala_ccode_function_add_parameter (_tmp35_, _tmp38_); _vala_ccode_node_unref0 (_tmp38_); _g_free0 (func_name); } _tmp39_ = vala_ccode_base_module_emit_context_new (NULL); _tmp40_ = _tmp39_; vala_ccode_base_module_push_context ((ValaCCodeBaseModule*) self, _tmp40_); _vala_ccode_base_module_emit_context_unref0 (_tmp40_); _tmp41_ = function; vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, _tmp41_); _tmp42_ = array_type; _tmp43_ = vala_array_type_get_element_type (_tmp42_); _tmp44_ = _tmp43_; _tmp45_ = vala_ccode_base_module_requires_copy ((ValaCCodeBaseModule*) self, _tmp44_); if (_tmp45_) { ValaCCodeVariableDeclarator* _tmp46_; ValaCCodeVariableDeclarator* cvardecl; ValaCCodeIdentifier* _tmp47_; ValaCCodeIdentifier* _tmp48_; ValaCCodeFunctionCall* _tmp49_; ValaCCodeFunctionCall* _tmp50_; ValaCCodeFunctionCall* gnew; ValaCCodeFunctionCall* _tmp51_; ValaArrayType* _tmp52_; ValaDataType* _tmp53_; ValaDataType* _tmp54_; gchar* _tmp55_ = NULL; gchar* _tmp56_; ValaCCodeIdentifier* _tmp57_; ValaCCodeIdentifier* _tmp58_; ValaCCodeIdentifier* _tmp59_; ValaCCodeExpression* length_expr; gboolean _tmp60_ = FALSE; ValaArrayType* _tmp61_; ValaDataType* _tmp62_; ValaDataType* _tmp63_; ValaTypeSymbol* _tmp64_; ValaTypeSymbol* _tmp65_; gboolean _tmp72_; ValaCCodeFunctionCall* _tmp77_; ValaCCodeExpression* _tmp78_; ValaCCodeFunction* _tmp79_; ValaCCodeFunction* _tmp80_; ValaArrayType* _tmp81_; gchar* _tmp82_ = NULL; gchar* _tmp83_; ValaCCodeVariableDeclarator* _tmp84_; ValaCCodeFunction* _tmp85_; ValaCCodeFunction* _tmp86_; ValaCCodeIdentifier* _tmp87_; ValaCCodeIdentifier* _tmp88_; ValaCCodeFunctionCall* _tmp89_; ValaCCodeFunction* _tmp90_; ValaCCodeFunction* _tmp91_; ValaCCodeVariableDeclarator* _tmp92_; ValaCCodeVariableDeclarator* _tmp93_; ValaCCodeFunction* _tmp94_; ValaCCodeFunction* _tmp95_; ValaCCodeIdentifier* _tmp96_; ValaCCodeIdentifier* _tmp97_; ValaCCodeConstant* _tmp98_; ValaCCodeConstant* _tmp99_; ValaCCodeAssignment* _tmp100_; ValaCCodeAssignment* _tmp101_; ValaCCodeIdentifier* _tmp102_; ValaCCodeIdentifier* _tmp103_; ValaCCodeIdentifier* _tmp104_; ValaCCodeIdentifier* _tmp105_; ValaCCodeBinaryExpression* _tmp106_; ValaCCodeBinaryExpression* _tmp107_; ValaCCodeIdentifier* _tmp108_; ValaCCodeIdentifier* _tmp109_; ValaCCodeUnaryExpression* _tmp110_; ValaCCodeUnaryExpression* _tmp111_; ValaCCodeFunction* _tmp112_; ValaCCodeFunction* _tmp113_; ValaCCodeIdentifier* _tmp114_; ValaCCodeIdentifier* _tmp115_; ValaCCodeIdentifier* _tmp116_; ValaCCodeIdentifier* _tmp117_; ValaCCodeElementAccess* _tmp118_; ValaCCodeElementAccess* _tmp119_; ValaArrayType* _tmp120_; ValaDataType* _tmp121_; ValaDataType* _tmp122_; ValaCCodeIdentifier* _tmp123_; ValaCCodeIdentifier* _tmp124_; ValaCCodeIdentifier* _tmp125_; ValaCCodeIdentifier* _tmp126_; ValaCCodeElementAccess* _tmp127_; ValaCCodeElementAccess* _tmp128_; ValaGLibValue* _tmp129_; ValaGLibValue* _tmp130_; ValaArrayType* _tmp131_; ValaTargetValue* _tmp132_ = NULL; ValaTargetValue* _tmp133_; ValaCCodeExpression* _tmp134_ = NULL; ValaCCodeExpression* _tmp135_; ValaCCodeFunction* _tmp136_; ValaCCodeFunction* _tmp137_; ValaCCodeFunction* _tmp138_; ValaCCodeFunction* _tmp139_; ValaCCodeIdentifier* _tmp140_; ValaCCodeIdentifier* _tmp141_; _tmp46_ = vala_ccode_variable_declarator_new ("result", NULL, NULL); cvardecl = _tmp46_; _tmp47_ = vala_ccode_identifier_new ("g_new0"); _tmp48_ = _tmp47_; _tmp49_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp48_); _tmp50_ = _tmp49_; _vala_ccode_node_unref0 (_tmp48_); gnew = _tmp50_; _tmp51_ = gnew; _tmp52_ = array_type; _tmp53_ = vala_array_type_get_element_type (_tmp52_); _tmp54_ = _tmp53_; _tmp55_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp54_); _tmp56_ = _tmp55_; _tmp57_ = vala_ccode_identifier_new (_tmp56_); _tmp58_ = _tmp57_; vala_ccode_function_call_add_argument (_tmp51_, (ValaCCodeExpression*) _tmp58_); _vala_ccode_node_unref0 (_tmp58_); _g_free0 (_tmp56_); _tmp59_ = vala_ccode_identifier_new ("length"); length_expr = (ValaCCodeExpression*) _tmp59_; _tmp61_ = array_type; _tmp62_ = vala_array_type_get_element_type (_tmp61_); _tmp63_ = _tmp62_; _tmp64_ = vala_data_type_get_data_type (_tmp63_); _tmp65_ = _tmp64_; if (_tmp65_ != NULL) { ValaArrayType* _tmp66_; ValaDataType* _tmp67_; ValaDataType* _tmp68_; ValaTypeSymbol* _tmp69_; ValaTypeSymbol* _tmp70_; gboolean _tmp71_ = FALSE; _tmp66_ = array_type; _tmp67_ = vala_array_type_get_element_type (_tmp66_); _tmp68_ = _tmp67_; _tmp69_ = vala_data_type_get_data_type (_tmp68_); _tmp70_ = _tmp69_; _tmp71_ = vala_typesymbol_is_reference_type (_tmp70_); _tmp60_ = _tmp71_; } else { _tmp60_ = FALSE; } _tmp72_ = _tmp60_; if (_tmp72_) { ValaCCodeExpression* _tmp73_; ValaCCodeConstant* _tmp74_; ValaCCodeConstant* _tmp75_; ValaCCodeBinaryExpression* _tmp76_; _tmp73_ = length_expr; _tmp74_ = vala_ccode_constant_new ("1"); _tmp75_ = _tmp74_; _tmp76_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, _tmp73_, (ValaCCodeExpression*) _tmp75_); _vala_ccode_node_unref0 (length_expr); length_expr = (ValaCCodeExpression*) _tmp76_; _vala_ccode_node_unref0 (_tmp75_); } _tmp77_ = gnew; _tmp78_ = length_expr; vala_ccode_function_call_add_argument (_tmp77_, _tmp78_); _tmp79_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp80_ = _tmp79_; _tmp81_ = array_type; _tmp82_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp81_); _tmp83_ = _tmp82_; _tmp84_ = cvardecl; vala_ccode_function_add_declaration (_tmp80_, _tmp83_, (ValaCCodeDeclarator*) _tmp84_, 0); _g_free0 (_tmp83_); _tmp85_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp86_ = _tmp85_; _tmp87_ = vala_ccode_identifier_new ("result"); _tmp88_ = _tmp87_; _tmp89_ = gnew; vala_ccode_function_add_assignment (_tmp86_, (ValaCCodeExpression*) _tmp88_, (ValaCCodeExpression*) _tmp89_); _vala_ccode_node_unref0 (_tmp88_); _tmp90_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp91_ = _tmp90_; _tmp92_ = vala_ccode_variable_declarator_new ("i", NULL, NULL); _tmp93_ = _tmp92_; vala_ccode_function_add_declaration (_tmp91_, "int", (ValaCCodeDeclarator*) _tmp93_, 0); _vala_ccode_node_unref0 (_tmp93_); _tmp94_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp95_ = _tmp94_; _tmp96_ = vala_ccode_identifier_new ("i"); _tmp97_ = _tmp96_; _tmp98_ = vala_ccode_constant_new ("0"); _tmp99_ = _tmp98_; _tmp100_ = vala_ccode_assignment_new ((ValaCCodeExpression*) _tmp97_, (ValaCCodeExpression*) _tmp99_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE); _tmp101_ = _tmp100_; _tmp102_ = vala_ccode_identifier_new ("i"); _tmp103_ = _tmp102_; _tmp104_ = vala_ccode_identifier_new ("length"); _tmp105_ = _tmp104_; _tmp106_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_LESS_THAN, (ValaCCodeExpression*) _tmp103_, (ValaCCodeExpression*) _tmp105_); _tmp107_ = _tmp106_; _tmp108_ = vala_ccode_identifier_new ("i"); _tmp109_ = _tmp108_; _tmp110_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POSTFIX_INCREMENT, (ValaCCodeExpression*) _tmp109_); _tmp111_ = _tmp110_; vala_ccode_function_open_for (_tmp95_, (ValaCCodeExpression*) _tmp101_, (ValaCCodeExpression*) _tmp107_, (ValaCCodeExpression*) _tmp111_); _vala_ccode_node_unref0 (_tmp111_); _vala_ccode_node_unref0 (_tmp109_); _vala_ccode_node_unref0 (_tmp107_); _vala_ccode_node_unref0 (_tmp105_); _vala_ccode_node_unref0 (_tmp103_); _vala_ccode_node_unref0 (_tmp101_); _vala_ccode_node_unref0 (_tmp99_); _vala_ccode_node_unref0 (_tmp97_); _tmp112_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp113_ = _tmp112_; _tmp114_ = vala_ccode_identifier_new ("result"); _tmp115_ = _tmp114_; _tmp116_ = vala_ccode_identifier_new ("i"); _tmp117_ = _tmp116_; _tmp118_ = vala_ccode_element_access_new ((ValaCCodeExpression*) _tmp115_, (ValaCCodeExpression*) _tmp117_); _tmp119_ = _tmp118_; _tmp120_ = array_type; _tmp121_ = vala_array_type_get_element_type (_tmp120_); _tmp122_ = _tmp121_; _tmp123_ = vala_ccode_identifier_new ("self"); _tmp124_ = _tmp123_; _tmp125_ = vala_ccode_identifier_new ("i"); _tmp126_ = _tmp125_; _tmp127_ = vala_ccode_element_access_new ((ValaCCodeExpression*) _tmp124_, (ValaCCodeExpression*) _tmp126_); _tmp128_ = _tmp127_; _tmp129_ = vala_glib_value_new (_tmp122_, (ValaCCodeExpression*) _tmp128_, TRUE); _tmp130_ = _tmp129_; _tmp131_ = array_type; _tmp132_ = vala_ccode_base_module_copy_value ((ValaCCodeBaseModule*) self, (ValaTargetValue*) _tmp130_, (ValaCodeNode*) _tmp131_); _tmp133_ = _tmp132_; _tmp134_ = vala_ccode_base_module_get_cvalue_ ((ValaCCodeBaseModule*) self, _tmp133_); _tmp135_ = _tmp134_; vala_ccode_function_add_assignment (_tmp113_, (ValaCCodeExpression*) _tmp119_, _tmp135_); _vala_ccode_node_unref0 (_tmp135_); _vala_target_value_unref0 (_tmp133_); _vala_target_value_unref0 (_tmp130_); _vala_ccode_node_unref0 (_tmp128_); _vala_ccode_node_unref0 (_tmp126_); _vala_ccode_node_unref0 (_tmp124_); _vala_ccode_node_unref0 (_tmp119_); _vala_ccode_node_unref0 (_tmp117_); _vala_ccode_node_unref0 (_tmp115_); _tmp136_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp137_ = _tmp136_; vala_ccode_function_close (_tmp137_); _tmp138_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp139_ = _tmp138_; _tmp140_ = vala_ccode_identifier_new ("result"); _tmp141_ = _tmp140_; vala_ccode_function_add_return (_tmp139_, (ValaCCodeExpression*) _tmp141_); _vala_ccode_node_unref0 (_tmp141_); _vala_ccode_node_unref0 (length_expr); _vala_ccode_node_unref0 (gnew); _vala_ccode_node_unref0 (cvardecl); } else { ValaCCodeIdentifier* _tmp142_; ValaCCodeIdentifier* _tmp143_; ValaCCodeFunctionCall* _tmp144_; ValaCCodeFunctionCall* _tmp145_; ValaCCodeFunctionCall* dup_call; ValaCCodeFunctionCall* _tmp146_; ValaCCodeIdentifier* _tmp147_; ValaCCodeIdentifier* _tmp148_; ValaCCodeIdentifier* _tmp149_; ValaCCodeIdentifier* _tmp150_; ValaCCodeFunctionCall* _tmp151_; ValaCCodeFunctionCall* _tmp152_; ValaCCodeFunctionCall* sizeof_call; ValaCCodeFunctionCall* _tmp153_; ValaArrayType* _tmp154_; ValaDataType* _tmp155_; ValaDataType* _tmp156_; gchar* _tmp157_ = NULL; gchar* _tmp158_; ValaCCodeIdentifier* _tmp159_; ValaCCodeIdentifier* _tmp160_; ValaCCodeFunctionCall* _tmp161_; ValaCCodeIdentifier* _tmp162_; ValaCCodeIdentifier* _tmp163_; ValaCCodeFunctionCall* _tmp164_; ValaCCodeBinaryExpression* _tmp165_; ValaCCodeBinaryExpression* _tmp166_; ValaCCodeFunction* _tmp167_; ValaCCodeFunction* _tmp168_; ValaCCodeFunctionCall* _tmp169_; _tmp142_ = vala_ccode_identifier_new ("g_memdup"); _tmp143_ = _tmp142_; _tmp144_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp143_); _tmp145_ = _tmp144_; _vala_ccode_node_unref0 (_tmp143_); dup_call = _tmp145_; _tmp146_ = dup_call; _tmp147_ = vala_ccode_identifier_new ("self"); _tmp148_ = _tmp147_; vala_ccode_function_call_add_argument (_tmp146_, (ValaCCodeExpression*) _tmp148_); _vala_ccode_node_unref0 (_tmp148_); _tmp149_ = vala_ccode_identifier_new ("sizeof"); _tmp150_ = _tmp149_; _tmp151_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp150_); _tmp152_ = _tmp151_; _vala_ccode_node_unref0 (_tmp150_); sizeof_call = _tmp152_; _tmp153_ = sizeof_call; _tmp154_ = array_type; _tmp155_ = vala_array_type_get_element_type (_tmp154_); _tmp156_ = _tmp155_; _tmp157_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp156_); _tmp158_ = _tmp157_; _tmp159_ = vala_ccode_identifier_new (_tmp158_); _tmp160_ = _tmp159_; vala_ccode_function_call_add_argument (_tmp153_, (ValaCCodeExpression*) _tmp160_); _vala_ccode_node_unref0 (_tmp160_); _g_free0 (_tmp158_); _tmp161_ = dup_call; _tmp162_ = vala_ccode_identifier_new ("length"); _tmp163_ = _tmp162_; _tmp164_ = sizeof_call; _tmp165_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) _tmp163_, (ValaCCodeExpression*) _tmp164_); _tmp166_ = _tmp165_; vala_ccode_function_call_add_argument (_tmp161_, (ValaCCodeExpression*) _tmp166_); _vala_ccode_node_unref0 (_tmp166_); _vala_ccode_node_unref0 (_tmp163_); _tmp167_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp168_ = _tmp167_; _tmp169_ = dup_call; vala_ccode_function_add_return (_tmp168_, (ValaCCodeExpression*) _tmp169_); _vala_ccode_node_unref0 (sizeof_call); _vala_ccode_node_unref0 (dup_call); } _tmp170_ = ((ValaCCodeBaseModule*) self)->cfile; _tmp171_ = function; vala_ccode_file_add_function_declaration (_tmp170_, _tmp171_); _tmp172_ = ((ValaCCodeBaseModule*) self)->cfile; _tmp173_ = function; vala_ccode_file_add_function (_tmp172_, _tmp173_); vala_ccode_base_module_pop_context ((ValaCCodeBaseModule*) self); result = dup_func; _vala_ccode_node_unref0 (function); return result; } static gchar* vala_ccode_array_module_generate_array_copy_wrapper (ValaCCodeArrayModule* self, ValaArrayType* array_type) { gchar* result = NULL; gint _tmp0_; gint _tmp1_; gchar* _tmp2_ = NULL; gchar* dup_func; const gchar* _tmp3_; gboolean _tmp4_ = FALSE; const gchar* _tmp5_; ValaCCodeFunction* _tmp6_; ValaCCodeFunction* function; ValaCCodeFunction* _tmp7_; ValaCCodeFunction* _tmp8_; ValaArrayType* _tmp9_; gchar* _tmp10_ = NULL; gchar* _tmp11_; gchar* _tmp12_; gchar* _tmp13_; ValaCCodeParameter* _tmp14_; ValaCCodeParameter* _tmp15_; ValaCCodeFunction* _tmp16_; ValaArrayType* _tmp17_; gchar* _tmp18_ = NULL; gchar* _tmp19_; gchar* _tmp20_; gchar* _tmp21_; ValaCCodeParameter* _tmp22_; ValaCCodeParameter* _tmp23_; ValaCCodeBaseModuleEmitContext* _tmp24_; ValaCCodeBaseModuleEmitContext* _tmp25_; ValaCCodeFunction* _tmp26_; ValaArrayType* _tmp27_; ValaDataType* _tmp28_; ValaDataType* _tmp29_; gboolean _tmp30_ = FALSE; ValaCCodeFile* _tmp119_; ValaCCodeFunction* _tmp120_; ValaCCodeFile* _tmp121_; ValaCCodeFunction* _tmp122_; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (array_type != NULL, NULL); _tmp0_ = self->priv->next_array_dup_id; self->priv->next_array_dup_id = _tmp0_ + 1; _tmp1_ = self->priv->next_array_dup_id; _tmp2_ = g_strdup_printf ("_vala_array_copy%d", _tmp1_); dup_func = _tmp2_; _tmp3_ = dup_func; _tmp4_ = vala_ccode_base_module_add_wrapper ((ValaCCodeBaseModule*) self, _tmp3_); if (!_tmp4_) { result = dup_func; return result; } _tmp5_ = dup_func; _tmp6_ = vala_ccode_function_new (_tmp5_, "void"); function = _tmp6_; _tmp7_ = function; vala_ccode_function_set_modifiers (_tmp7_, VALA_CCODE_MODIFIERS_STATIC); _tmp8_ = function; _tmp9_ = array_type; _tmp10_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp9_); _tmp11_ = _tmp10_; _tmp12_ = g_strconcat (_tmp11_, "*", NULL); _tmp13_ = _tmp12_; _tmp14_ = vala_ccode_parameter_new ("self", _tmp13_); _tmp15_ = _tmp14_; vala_ccode_function_add_parameter (_tmp8_, _tmp15_); _vala_ccode_node_unref0 (_tmp15_); _g_free0 (_tmp13_); _g_free0 (_tmp11_); _tmp16_ = function; _tmp17_ = array_type; _tmp18_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp17_); _tmp19_ = _tmp18_; _tmp20_ = g_strconcat (_tmp19_, "*", NULL); _tmp21_ = _tmp20_; _tmp22_ = vala_ccode_parameter_new ("dest", _tmp21_); _tmp23_ = _tmp22_; vala_ccode_function_add_parameter (_tmp16_, _tmp23_); _vala_ccode_node_unref0 (_tmp23_); _g_free0 (_tmp21_); _g_free0 (_tmp19_); _tmp24_ = vala_ccode_base_module_emit_context_new (NULL); _tmp25_ = _tmp24_; vala_ccode_base_module_push_context ((ValaCCodeBaseModule*) self, _tmp25_); _vala_ccode_base_module_emit_context_unref0 (_tmp25_); _tmp26_ = function; vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, _tmp26_); _tmp27_ = array_type; _tmp28_ = vala_array_type_get_element_type (_tmp27_); _tmp29_ = _tmp28_; _tmp30_ = vala_ccode_base_module_requires_copy ((ValaCCodeBaseModule*) self, _tmp29_); if (_tmp30_) { ValaCCodeFunction* _tmp31_; ValaCCodeFunction* _tmp32_; ValaCCodeVariableDeclarator* _tmp33_; ValaCCodeVariableDeclarator* _tmp34_; ValaCCodeFunction* _tmp35_; ValaCCodeFunction* _tmp36_; ValaCCodeIdentifier* _tmp37_; ValaCCodeIdentifier* _tmp38_; ValaCCodeConstant* _tmp39_; ValaCCodeConstant* _tmp40_; ValaCCodeAssignment* _tmp41_; ValaCCodeAssignment* _tmp42_; ValaCCodeIdentifier* _tmp43_; ValaCCodeIdentifier* _tmp44_; ValaArrayType* _tmp45_; gint _tmp46_; gint _tmp47_; gchar* _tmp48_ = NULL; gchar* _tmp49_; ValaCCodeConstant* _tmp50_; ValaCCodeConstant* _tmp51_; ValaCCodeBinaryExpression* _tmp52_; ValaCCodeBinaryExpression* _tmp53_; ValaCCodeIdentifier* _tmp54_; ValaCCodeIdentifier* _tmp55_; ValaCCodeUnaryExpression* _tmp56_; ValaCCodeUnaryExpression* _tmp57_; ValaCCodeFunction* _tmp58_; ValaCCodeFunction* _tmp59_; ValaCCodeIdentifier* _tmp60_; ValaCCodeIdentifier* _tmp61_; ValaCCodeIdentifier* _tmp62_; ValaCCodeIdentifier* _tmp63_; ValaCCodeElementAccess* _tmp64_; ValaCCodeElementAccess* _tmp65_; ValaArrayType* _tmp66_; ValaDataType* _tmp67_; ValaDataType* _tmp68_; ValaCCodeIdentifier* _tmp69_; ValaCCodeIdentifier* _tmp70_; ValaCCodeIdentifier* _tmp71_; ValaCCodeIdentifier* _tmp72_; ValaCCodeElementAccess* _tmp73_; ValaCCodeElementAccess* _tmp74_; ValaGLibValue* _tmp75_; ValaGLibValue* _tmp76_; ValaArrayType* _tmp77_; ValaTargetValue* _tmp78_ = NULL; ValaTargetValue* _tmp79_; ValaCCodeExpression* _tmp80_ = NULL; ValaCCodeExpression* _tmp81_; _tmp31_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp32_ = _tmp31_; _tmp33_ = vala_ccode_variable_declarator_new ("i", NULL, NULL); _tmp34_ = _tmp33_; vala_ccode_function_add_declaration (_tmp32_, "int", (ValaCCodeDeclarator*) _tmp34_, 0); _vala_ccode_node_unref0 (_tmp34_); _tmp35_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp36_ = _tmp35_; _tmp37_ = vala_ccode_identifier_new ("i"); _tmp38_ = _tmp37_; _tmp39_ = vala_ccode_constant_new ("0"); _tmp40_ = _tmp39_; _tmp41_ = vala_ccode_assignment_new ((ValaCCodeExpression*) _tmp38_, (ValaCCodeExpression*) _tmp40_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE); _tmp42_ = _tmp41_; _tmp43_ = vala_ccode_identifier_new ("i"); _tmp44_ = _tmp43_; _tmp45_ = array_type; _tmp46_ = vala_array_type_get_length (_tmp45_); _tmp47_ = _tmp46_; _tmp48_ = g_strdup_printf ("%d", _tmp47_); _tmp49_ = _tmp48_; _tmp50_ = vala_ccode_constant_new (_tmp49_); _tmp51_ = _tmp50_; _tmp52_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_LESS_THAN, (ValaCCodeExpression*) _tmp44_, (ValaCCodeExpression*) _tmp51_); _tmp53_ = _tmp52_; _tmp54_ = vala_ccode_identifier_new ("i"); _tmp55_ = _tmp54_; _tmp56_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POSTFIX_INCREMENT, (ValaCCodeExpression*) _tmp55_); _tmp57_ = _tmp56_; vala_ccode_function_open_for (_tmp36_, (ValaCCodeExpression*) _tmp42_, (ValaCCodeExpression*) _tmp53_, (ValaCCodeExpression*) _tmp57_); _vala_ccode_node_unref0 (_tmp57_); _vala_ccode_node_unref0 (_tmp55_); _vala_ccode_node_unref0 (_tmp53_); _vala_ccode_node_unref0 (_tmp51_); _g_free0 (_tmp49_); _vala_ccode_node_unref0 (_tmp44_); _vala_ccode_node_unref0 (_tmp42_); _vala_ccode_node_unref0 (_tmp40_); _vala_ccode_node_unref0 (_tmp38_); _tmp58_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp59_ = _tmp58_; _tmp60_ = vala_ccode_identifier_new ("dest"); _tmp61_ = _tmp60_; _tmp62_ = vala_ccode_identifier_new ("i"); _tmp63_ = _tmp62_; _tmp64_ = vala_ccode_element_access_new ((ValaCCodeExpression*) _tmp61_, (ValaCCodeExpression*) _tmp63_); _tmp65_ = _tmp64_; _tmp66_ = array_type; _tmp67_ = vala_array_type_get_element_type (_tmp66_); _tmp68_ = _tmp67_; _tmp69_ = vala_ccode_identifier_new ("self"); _tmp70_ = _tmp69_; _tmp71_ = vala_ccode_identifier_new ("i"); _tmp72_ = _tmp71_; _tmp73_ = vala_ccode_element_access_new ((ValaCCodeExpression*) _tmp70_, (ValaCCodeExpression*) _tmp72_); _tmp74_ = _tmp73_; _tmp75_ = vala_glib_value_new (_tmp68_, (ValaCCodeExpression*) _tmp74_, TRUE); _tmp76_ = _tmp75_; _tmp77_ = array_type; _tmp78_ = vala_ccode_base_module_copy_value ((ValaCCodeBaseModule*) self, (ValaTargetValue*) _tmp76_, (ValaCodeNode*) _tmp77_); _tmp79_ = _tmp78_; _tmp80_ = vala_ccode_base_module_get_cvalue_ ((ValaCCodeBaseModule*) self, _tmp79_); _tmp81_ = _tmp80_; vala_ccode_function_add_assignment (_tmp59_, (ValaCCodeExpression*) _tmp65_, _tmp81_); _vala_ccode_node_unref0 (_tmp81_); _vala_target_value_unref0 (_tmp79_); _vala_target_value_unref0 (_tmp76_); _vala_ccode_node_unref0 (_tmp74_); _vala_ccode_node_unref0 (_tmp72_); _vala_ccode_node_unref0 (_tmp70_); _vala_ccode_node_unref0 (_tmp65_); _vala_ccode_node_unref0 (_tmp63_); _vala_ccode_node_unref0 (_tmp61_); } else { ValaCCodeFile* _tmp82_; ValaCCodeIdentifier* _tmp83_; ValaCCodeIdentifier* _tmp84_; ValaCCodeFunctionCall* _tmp85_; ValaCCodeFunctionCall* _tmp86_; ValaCCodeFunctionCall* dup_call; ValaCCodeFunctionCall* _tmp87_; ValaCCodeIdentifier* _tmp88_; ValaCCodeIdentifier* _tmp89_; ValaCCodeFunctionCall* _tmp90_; ValaCCodeIdentifier* _tmp91_; ValaCCodeIdentifier* _tmp92_; ValaCCodeIdentifier* _tmp93_; ValaCCodeIdentifier* _tmp94_; ValaCCodeFunctionCall* _tmp95_; ValaCCodeFunctionCall* _tmp96_; ValaCCodeFunctionCall* sizeof_call; ValaCCodeFunctionCall* _tmp97_; ValaArrayType* _tmp98_; ValaDataType* _tmp99_; ValaDataType* _tmp100_; gchar* _tmp101_ = NULL; gchar* _tmp102_; ValaCCodeIdentifier* _tmp103_; ValaCCodeIdentifier* _tmp104_; ValaCCodeFunctionCall* _tmp105_; ValaArrayType* _tmp106_; gint _tmp107_; gint _tmp108_; gchar* _tmp109_ = NULL; gchar* _tmp110_; ValaCCodeConstant* _tmp111_; ValaCCodeConstant* _tmp112_; ValaCCodeFunctionCall* _tmp113_; ValaCCodeBinaryExpression* _tmp114_; ValaCCodeBinaryExpression* _tmp115_; ValaCCodeFunction* _tmp116_; ValaCCodeFunction* _tmp117_; ValaCCodeFunctionCall* _tmp118_; _tmp82_ = ((ValaCCodeBaseModule*) self)->cfile; vala_ccode_file_add_include (_tmp82_, "string.h", FALSE); _tmp83_ = vala_ccode_identifier_new ("memcpy"); _tmp84_ = _tmp83_; _tmp85_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp84_); _tmp86_ = _tmp85_; _vala_ccode_node_unref0 (_tmp84_); dup_call = _tmp86_; _tmp87_ = dup_call; _tmp88_ = vala_ccode_identifier_new ("dest"); _tmp89_ = _tmp88_; vala_ccode_function_call_add_argument (_tmp87_, (ValaCCodeExpression*) _tmp89_); _vala_ccode_node_unref0 (_tmp89_); _tmp90_ = dup_call; _tmp91_ = vala_ccode_identifier_new ("self"); _tmp92_ = _tmp91_; vala_ccode_function_call_add_argument (_tmp90_, (ValaCCodeExpression*) _tmp92_); _vala_ccode_node_unref0 (_tmp92_); _tmp93_ = vala_ccode_identifier_new ("sizeof"); _tmp94_ = _tmp93_; _tmp95_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp94_); _tmp96_ = _tmp95_; _vala_ccode_node_unref0 (_tmp94_); sizeof_call = _tmp96_; _tmp97_ = sizeof_call; _tmp98_ = array_type; _tmp99_ = vala_array_type_get_element_type (_tmp98_); _tmp100_ = _tmp99_; _tmp101_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp100_); _tmp102_ = _tmp101_; _tmp103_ = vala_ccode_identifier_new (_tmp102_); _tmp104_ = _tmp103_; vala_ccode_function_call_add_argument (_tmp97_, (ValaCCodeExpression*) _tmp104_); _vala_ccode_node_unref0 (_tmp104_); _g_free0 (_tmp102_); _tmp105_ = dup_call; _tmp106_ = array_type; _tmp107_ = vala_array_type_get_length (_tmp106_); _tmp108_ = _tmp107_; _tmp109_ = g_strdup_printf ("%d", _tmp108_); _tmp110_ = _tmp109_; _tmp111_ = vala_ccode_constant_new (_tmp110_); _tmp112_ = _tmp111_; _tmp113_ = sizeof_call; _tmp114_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) _tmp112_, (ValaCCodeExpression*) _tmp113_); _tmp115_ = _tmp114_; vala_ccode_function_call_add_argument (_tmp105_, (ValaCCodeExpression*) _tmp115_); _vala_ccode_node_unref0 (_tmp115_); _vala_ccode_node_unref0 (_tmp112_); _g_free0 (_tmp110_); _tmp116_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp117_ = _tmp116_; _tmp118_ = dup_call; vala_ccode_function_add_expression (_tmp117_, (ValaCCodeExpression*) _tmp118_); _vala_ccode_node_unref0 (sizeof_call); _vala_ccode_node_unref0 (dup_call); } _tmp119_ = ((ValaCCodeBaseModule*) self)->cfile; _tmp120_ = function; vala_ccode_file_add_function_declaration (_tmp119_, _tmp120_); _tmp121_ = ((ValaCCodeBaseModule*) self)->cfile; _tmp122_ = function; vala_ccode_file_add_function (_tmp121_, _tmp122_); vala_ccode_base_module_pop_context ((ValaCCodeBaseModule*) self); result = dup_func; _vala_ccode_node_unref0 (function); return result; } static gchar* vala_ccode_array_module_generate_array_add_wrapper (ValaCCodeArrayModule* self, ValaArrayType* array_type) { gchar* result = NULL; gint _tmp0_; gint _tmp1_; gchar* _tmp2_ = NULL; gchar* add_func; const gchar* _tmp3_; gboolean _tmp4_ = FALSE; const gchar* _tmp5_; ValaCCodeFunction* _tmp6_; ValaCCodeFunction* function; ValaCCodeFunction* _tmp7_; ValaCCodeFunction* _tmp8_; ValaArrayType* _tmp9_; gchar* _tmp10_ = NULL; gchar* _tmp11_; gchar* _tmp12_; gchar* _tmp13_; ValaCCodeParameter* _tmp14_; ValaCCodeParameter* _tmp15_; ValaCCodeFunction* _tmp16_; ValaCCodeParameter* _tmp17_; ValaCCodeParameter* _tmp18_; ValaCCodeFunction* _tmp19_; ValaCCodeParameter* _tmp20_; ValaCCodeParameter* _tmp21_; ValaCCodeFunction* _tmp22_; ValaArrayType* _tmp23_; ValaDataType* _tmp24_; ValaDataType* _tmp25_; gchar* _tmp26_ = NULL; gchar* typename; ValaCCodeIdentifier* _tmp27_; ValaCCodeExpression* value; ValaArrayType* _tmp28_; ValaDataType* _tmp29_; ValaDataType* _tmp30_; gboolean _tmp31_ = FALSE; ValaCCodeFunction* _tmp55_; const gchar* _tmp56_; ValaCCodeParameter* _tmp57_; ValaCCodeParameter* _tmp58_; ValaCCodeIdentifier* _tmp59_; ValaCCodeIdentifier* _tmp60_; ValaCCodeUnaryExpression* _tmp61_; ValaCCodeUnaryExpression* _tmp62_; ValaCCodeUnaryExpression* array; ValaCCodeIdentifier* _tmp63_; ValaCCodeIdentifier* _tmp64_; ValaCCodeUnaryExpression* _tmp65_; ValaCCodeUnaryExpression* _tmp66_; ValaCCodeUnaryExpression* length; ValaCCodeIdentifier* _tmp67_; ValaCCodeIdentifier* _tmp68_; ValaCCodeUnaryExpression* _tmp69_; ValaCCodeUnaryExpression* _tmp70_; ValaCCodeUnaryExpression* size; ValaCCodeIdentifier* _tmp71_; ValaCCodeIdentifier* _tmp72_; ValaCCodeFunctionCall* _tmp73_; ValaCCodeFunctionCall* _tmp74_; ValaCCodeFunctionCall* renew_call; ValaCCodeFunctionCall* _tmp75_; ValaArrayType* _tmp76_; ValaDataType* _tmp77_; ValaDataType* _tmp78_; gchar* _tmp79_ = NULL; gchar* _tmp80_; ValaCCodeIdentifier* _tmp81_; ValaCCodeIdentifier* _tmp82_; ValaCCodeFunctionCall* _tmp83_; ValaCCodeUnaryExpression* _tmp84_; ValaArrayType* _tmp85_; ValaDataType* _tmp86_; ValaDataType* _tmp87_; gboolean _tmp88_ = FALSE; ValaCCodeUnaryExpression* _tmp97_; ValaCCodeUnaryExpression* _tmp98_; ValaCCodeBinaryExpression* _tmp99_; ValaCCodeBinaryExpression* csizecheck; ValaCCodeFunction* _tmp100_; ValaCCodeFunction* _tmp101_; ValaCCodeBinaryExpression* _tmp102_; ValaCCodeFunction* _tmp103_; ValaCCodeFunction* _tmp104_; ValaCCodeUnaryExpression* _tmp105_; ValaCCodeUnaryExpression* _tmp106_; ValaCCodeConstant* _tmp107_; ValaCCodeConstant* _tmp108_; ValaCCodeUnaryExpression* _tmp109_; ValaCCodeBinaryExpression* _tmp110_; ValaCCodeBinaryExpression* _tmp111_; ValaCCodeConstant* _tmp112_; ValaCCodeConstant* _tmp113_; ValaCCodeConditionalExpression* _tmp114_; ValaCCodeConditionalExpression* _tmp115_; ValaCCodeFunction* _tmp116_; ValaCCodeFunction* _tmp117_; ValaCCodeUnaryExpression* _tmp118_; ValaCCodeFunctionCall* _tmp119_; ValaCCodeFunction* _tmp120_; ValaCCodeFunction* _tmp121_; ValaCCodeFunction* _tmp122_; ValaCCodeFunction* _tmp123_; ValaCCodeUnaryExpression* _tmp124_; ValaCCodeUnaryExpression* _tmp125_; ValaCCodeUnaryExpression* _tmp126_; ValaCCodeUnaryExpression* _tmp127_; ValaCCodeElementAccess* _tmp128_; ValaCCodeElementAccess* _tmp129_; ValaCCodeExpression* _tmp130_; ValaArrayType* _tmp131_; ValaDataType* _tmp132_; ValaDataType* _tmp133_; gboolean _tmp134_ = FALSE; ValaCCodeFile* _tmp143_; ValaCCodeFunction* _tmp144_; ValaCCodeFile* _tmp145_; ValaCCodeFunction* _tmp146_; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (array_type != NULL, NULL); _tmp0_ = self->priv->next_array_add_id; self->priv->next_array_add_id = _tmp0_ + 1; _tmp1_ = self->priv->next_array_add_id; _tmp2_ = g_strdup_printf ("_vala_array_add%d", _tmp1_); add_func = _tmp2_; _tmp3_ = add_func; _tmp4_ = vala_ccode_base_module_add_wrapper ((ValaCCodeBaseModule*) self, _tmp3_); if (!_tmp4_) { result = add_func; return result; } _tmp5_ = add_func; _tmp6_ = vala_ccode_function_new (_tmp5_, "void"); function = _tmp6_; _tmp7_ = function; vala_ccode_function_set_modifiers (_tmp7_, VALA_CCODE_MODIFIERS_STATIC); _tmp8_ = function; _tmp9_ = array_type; _tmp10_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp9_); _tmp11_ = _tmp10_; _tmp12_ = g_strconcat (_tmp11_, "*", NULL); _tmp13_ = _tmp12_; _tmp14_ = vala_ccode_parameter_new ("array", _tmp13_); _tmp15_ = _tmp14_; vala_ccode_function_add_parameter (_tmp8_, _tmp15_); _vala_ccode_node_unref0 (_tmp15_); _g_free0 (_tmp13_); _g_free0 (_tmp11_); _tmp16_ = function; _tmp17_ = vala_ccode_parameter_new ("length", "int*"); _tmp18_ = _tmp17_; vala_ccode_function_add_parameter (_tmp16_, _tmp18_); _vala_ccode_node_unref0 (_tmp18_); _tmp19_ = function; _tmp20_ = vala_ccode_parameter_new ("size", "int*"); _tmp21_ = _tmp20_; vala_ccode_function_add_parameter (_tmp19_, _tmp21_); _vala_ccode_node_unref0 (_tmp21_); _tmp22_ = function; vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, _tmp22_); _tmp23_ = array_type; _tmp24_ = vala_array_type_get_element_type (_tmp23_); _tmp25_ = _tmp24_; _tmp26_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp25_); typename = _tmp26_; _tmp27_ = vala_ccode_identifier_new ("value"); value = (ValaCCodeExpression*) _tmp27_; _tmp28_ = array_type; _tmp29_ = vala_array_type_get_element_type (_tmp28_); _tmp30_ = _tmp29_; _tmp31_ = vala_data_type_is_real_struct_type (_tmp30_); if (_tmp31_) { gboolean _tmp32_ = FALSE; ValaArrayType* _tmp33_; ValaDataType* _tmp34_; ValaDataType* _tmp35_; gboolean _tmp36_; gboolean _tmp37_; gboolean _tmp43_; ValaArrayType* _tmp46_; ValaDataType* _tmp47_; ValaDataType* _tmp48_; gboolean _tmp49_; gboolean _tmp50_; _tmp33_ = array_type; _tmp34_ = vala_array_type_get_element_type (_tmp33_); _tmp35_ = _tmp34_; _tmp36_ = vala_data_type_get_nullable (_tmp35_); _tmp37_ = _tmp36_; if (!_tmp37_) { _tmp32_ = TRUE; } else { ValaArrayType* _tmp38_; ValaDataType* _tmp39_; ValaDataType* _tmp40_; gboolean _tmp41_; gboolean _tmp42_; _tmp38_ = array_type; _tmp39_ = vala_array_type_get_element_type (_tmp38_); _tmp40_ = _tmp39_; _tmp41_ = vala_data_type_get_value_owned (_tmp40_); _tmp42_ = _tmp41_; _tmp32_ = !_tmp42_; } _tmp43_ = _tmp32_; if (_tmp43_) { const gchar* _tmp44_; gchar* _tmp45_; _tmp44_ = typename; _tmp45_ = g_strconcat ("const ", _tmp44_, NULL); _g_free0 (typename); typename = _tmp45_; } _tmp46_ = array_type; _tmp47_ = vala_array_type_get_element_type (_tmp46_); _tmp48_ = _tmp47_; _tmp49_ = vala_data_type_get_nullable (_tmp48_); _tmp50_ = _tmp49_; if (!_tmp50_) { const gchar* _tmp51_; gchar* _tmp52_; ValaCCodeExpression* _tmp53_; ValaCCodeUnaryExpression* _tmp54_; _tmp51_ = typename; _tmp52_ = g_strconcat (_tmp51_, "*", NULL); _g_free0 (typename); typename = _tmp52_; _tmp53_ = value; _tmp54_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, _tmp53_); _vala_ccode_node_unref0 (value); value = (ValaCCodeExpression*) _tmp54_; } } _tmp55_ = function; _tmp56_ = typename; _tmp57_ = vala_ccode_parameter_new ("value", _tmp56_); _tmp58_ = _tmp57_; vala_ccode_function_add_parameter (_tmp55_, _tmp58_); _vala_ccode_node_unref0 (_tmp58_); _tmp59_ = vala_ccode_identifier_new ("array"); _tmp60_ = _tmp59_; _tmp61_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, (ValaCCodeExpression*) _tmp60_); _tmp62_ = _tmp61_; _vala_ccode_node_unref0 (_tmp60_); array = _tmp62_; _tmp63_ = vala_ccode_identifier_new ("length"); _tmp64_ = _tmp63_; _tmp65_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, (ValaCCodeExpression*) _tmp64_); _tmp66_ = _tmp65_; _vala_ccode_node_unref0 (_tmp64_); length = _tmp66_; _tmp67_ = vala_ccode_identifier_new ("size"); _tmp68_ = _tmp67_; _tmp69_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, (ValaCCodeExpression*) _tmp68_); _tmp70_ = _tmp69_; _vala_ccode_node_unref0 (_tmp68_); size = _tmp70_; _tmp71_ = vala_ccode_identifier_new ("g_renew"); _tmp72_ = _tmp71_; _tmp73_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp72_); _tmp74_ = _tmp73_; _vala_ccode_node_unref0 (_tmp72_); renew_call = _tmp74_; _tmp75_ = renew_call; _tmp76_ = array_type; _tmp77_ = vala_array_type_get_element_type (_tmp76_); _tmp78_ = _tmp77_; _tmp79_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp78_); _tmp80_ = _tmp79_; _tmp81_ = vala_ccode_identifier_new (_tmp80_); _tmp82_ = _tmp81_; vala_ccode_function_call_add_argument (_tmp75_, (ValaCCodeExpression*) _tmp82_); _vala_ccode_node_unref0 (_tmp82_); _g_free0 (_tmp80_); _tmp83_ = renew_call; _tmp84_ = array; vala_ccode_function_call_add_argument (_tmp83_, (ValaCCodeExpression*) _tmp84_); _tmp85_ = array_type; _tmp86_ = vala_array_type_get_element_type (_tmp85_); _tmp87_ = _tmp86_; _tmp88_ = vala_data_type_is_reference_type_or_type_parameter (_tmp87_); if (_tmp88_) { ValaCCodeFunctionCall* _tmp89_; ValaCCodeUnaryExpression* _tmp90_; ValaCCodeConstant* _tmp91_; ValaCCodeConstant* _tmp92_; ValaCCodeBinaryExpression* _tmp93_; ValaCCodeBinaryExpression* _tmp94_; _tmp89_ = renew_call; _tmp90_ = size; _tmp91_ = vala_ccode_constant_new ("1"); _tmp92_ = _tmp91_; _tmp93_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) _tmp90_, (ValaCCodeExpression*) _tmp92_); _tmp94_ = _tmp93_; vala_ccode_function_call_add_argument (_tmp89_, (ValaCCodeExpression*) _tmp94_); _vala_ccode_node_unref0 (_tmp94_); _vala_ccode_node_unref0 (_tmp92_); } else { ValaCCodeFunctionCall* _tmp95_; ValaCCodeUnaryExpression* _tmp96_; _tmp95_ = renew_call; _tmp96_ = size; vala_ccode_function_call_add_argument (_tmp95_, (ValaCCodeExpression*) _tmp96_); } _tmp97_ = length; _tmp98_ = size; _tmp99_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_EQUALITY, (ValaCCodeExpression*) _tmp97_, (ValaCCodeExpression*) _tmp98_); csizecheck = _tmp99_; _tmp100_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp101_ = _tmp100_; _tmp102_ = csizecheck; vala_ccode_function_open_if (_tmp101_, (ValaCCodeExpression*) _tmp102_); _tmp103_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp104_ = _tmp103_; _tmp105_ = size; _tmp106_ = size; _tmp107_ = vala_ccode_constant_new ("2"); _tmp108_ = _tmp107_; _tmp109_ = size; _tmp110_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) _tmp108_, (ValaCCodeExpression*) _tmp109_); _tmp111_ = _tmp110_; _tmp112_ = vala_ccode_constant_new ("4"); _tmp113_ = _tmp112_; _tmp114_ = vala_ccode_conditional_expression_new ((ValaCCodeExpression*) _tmp106_, (ValaCCodeExpression*) _tmp111_, (ValaCCodeExpression*) _tmp113_); _tmp115_ = _tmp114_; vala_ccode_function_add_assignment (_tmp104_, (ValaCCodeExpression*) _tmp105_, (ValaCCodeExpression*) _tmp115_); _vala_ccode_node_unref0 (_tmp115_); _vala_ccode_node_unref0 (_tmp113_); _vala_ccode_node_unref0 (_tmp111_); _vala_ccode_node_unref0 (_tmp108_); _tmp116_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp117_ = _tmp116_; _tmp118_ = array; _tmp119_ = renew_call; vala_ccode_function_add_assignment (_tmp117_, (ValaCCodeExpression*) _tmp118_, (ValaCCodeExpression*) _tmp119_); _tmp120_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp121_ = _tmp120_; vala_ccode_function_close (_tmp121_); _tmp122_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp123_ = _tmp122_; _tmp124_ = array; _tmp125_ = length; _tmp126_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POSTFIX_INCREMENT, (ValaCCodeExpression*) _tmp125_); _tmp127_ = _tmp126_; _tmp128_ = vala_ccode_element_access_new ((ValaCCodeExpression*) _tmp124_, (ValaCCodeExpression*) _tmp127_); _tmp129_ = _tmp128_; _tmp130_ = value; vala_ccode_function_add_assignment (_tmp123_, (ValaCCodeExpression*) _tmp129_, _tmp130_); _vala_ccode_node_unref0 (_tmp129_); _vala_ccode_node_unref0 (_tmp127_); _tmp131_ = array_type; _tmp132_ = vala_array_type_get_element_type (_tmp131_); _tmp133_ = _tmp132_; _tmp134_ = vala_data_type_is_reference_type_or_type_parameter (_tmp133_); if (_tmp134_) { ValaCCodeFunction* _tmp135_; ValaCCodeFunction* _tmp136_; ValaCCodeUnaryExpression* _tmp137_; ValaCCodeUnaryExpression* _tmp138_; ValaCCodeElementAccess* _tmp139_; ValaCCodeElementAccess* _tmp140_; ValaCCodeConstant* _tmp141_; ValaCCodeConstant* _tmp142_; _tmp135_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp136_ = _tmp135_; _tmp137_ = array; _tmp138_ = length; _tmp139_ = vala_ccode_element_access_new ((ValaCCodeExpression*) _tmp137_, (ValaCCodeExpression*) _tmp138_); _tmp140_ = _tmp139_; _tmp141_ = vala_ccode_constant_new ("NULL"); _tmp142_ = _tmp141_; vala_ccode_function_add_assignment (_tmp136_, (ValaCCodeExpression*) _tmp140_, (ValaCCodeExpression*) _tmp142_); _vala_ccode_node_unref0 (_tmp142_); _vala_ccode_node_unref0 (_tmp140_); } vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self); _tmp143_ = ((ValaCCodeBaseModule*) self)->cfile; _tmp144_ = function; vala_ccode_file_add_function_declaration (_tmp143_, _tmp144_); _tmp145_ = ((ValaCCodeBaseModule*) self)->cfile; _tmp146_ = function; vala_ccode_file_add_function (_tmp145_, _tmp146_); result = add_func; _vala_ccode_node_unref0 (csizecheck); _vala_ccode_node_unref0 (renew_call); _vala_ccode_node_unref0 (size); _vala_ccode_node_unref0 (length); _vala_ccode_node_unref0 (array); _vala_ccode_node_unref0 (value); _g_free0 (typename); _vala_ccode_node_unref0 (function); return result; } static gboolean vala_ccode_array_module_is_array_add (ValaCCodeArrayModule* self, ValaAssignment* assignment) { gboolean result = FALSE; ValaAssignment* _tmp0_; ValaExpression* _tmp1_; ValaExpression* _tmp2_; ValaBinaryExpression* _tmp3_; ValaBinaryExpression* binary; gboolean _tmp4_ = FALSE; ValaBinaryExpression* _tmp5_; gboolean _tmp11_; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (assignment != NULL, FALSE); _tmp0_ = assignment; _tmp1_ = vala_assignment_get_right (_tmp0_); _tmp2_ = _tmp1_; _tmp3_ = _vala_code_node_ref0 (VALA_IS_BINARY_EXPRESSION (_tmp2_) ? ((ValaBinaryExpression*) _tmp2_) : NULL); binary = _tmp3_; _tmp5_ = binary; if (_tmp5_ != NULL) { ValaBinaryExpression* _tmp6_; ValaExpression* _tmp7_; ValaExpression* _tmp8_; ValaDataType* _tmp9_; ValaDataType* _tmp10_; _tmp6_ = binary; _tmp7_ = vala_binary_expression_get_left (_tmp6_); _tmp8_ = _tmp7_; _tmp9_ = vala_expression_get_value_type (_tmp8_); _tmp10_ = _tmp9_; _tmp4_ = VALA_IS_ARRAY_TYPE (_tmp10_); } else { _tmp4_ = FALSE; } _tmp11_ = _tmp4_; if (_tmp11_) { ValaBinaryExpression* _tmp12_; ValaBinaryOperator _tmp13_; ValaBinaryOperator _tmp14_; _tmp12_ = binary; _tmp13_ = vala_binary_expression_get_operator (_tmp12_); _tmp14_ = _tmp13_; if (_tmp14_ == VALA_BINARY_OPERATOR_PLUS) { ValaAssignment* _tmp15_; ValaExpression* _tmp16_; ValaExpression* _tmp17_; ValaSymbol* _tmp18_; ValaSymbol* _tmp19_; ValaBinaryExpression* _tmp20_; ValaExpression* _tmp21_; ValaExpression* _tmp22_; ValaSymbol* _tmp23_; ValaSymbol* _tmp24_; _tmp15_ = assignment; _tmp16_ = vala_assignment_get_left (_tmp15_); _tmp17_ = _tmp16_; _tmp18_ = vala_expression_get_symbol_reference (_tmp17_); _tmp19_ = _tmp18_; _tmp20_ = binary; _tmp21_ = vala_binary_expression_get_left (_tmp20_); _tmp22_ = _tmp21_; _tmp23_ = vala_expression_get_symbol_reference (_tmp22_); _tmp24_ = _tmp23_; if (_tmp19_ == _tmp24_) { result = TRUE; _vala_code_node_unref0 (binary); return result; } } } result = FALSE; _vala_code_node_unref0 (binary); return result; } static void vala_ccode_array_module_real_visit_assignment (ValaCodeVisitor* base, ValaAssignment* assignment) { ValaCCodeArrayModule * self; ValaAssignment* _tmp0_; gboolean _tmp1_ = FALSE; ValaAssignment* _tmp3_; ValaExpression* _tmp4_; ValaExpression* _tmp5_; ValaBinaryExpression* _tmp6_; ValaBinaryExpression* binary; ValaAssignment* _tmp7_; ValaExpression* _tmp8_; ValaExpression* _tmp9_; ValaExpression* _tmp10_; ValaExpression* array; ValaExpression* _tmp11_; ValaDataType* _tmp12_; ValaDataType* _tmp13_; ValaArrayType* _tmp14_; ValaArrayType* array_type; ValaBinaryExpression* _tmp15_; ValaExpression* _tmp16_; ValaExpression* _tmp17_; ValaExpression* _tmp18_; ValaExpression* element; ValaExpression* _tmp19_; ValaSymbol* _tmp20_; ValaSymbol* _tmp21_; ValaSymbol* _tmp22_; ValaSymbol* array_var; gboolean _tmp23_ = FALSE; gboolean _tmp24_ = FALSE; gboolean _tmp25_ = FALSE; ValaArrayType* _tmp26_; gint _tmp27_; gint _tmp28_; gboolean _tmp30_; gboolean _tmp33_; gboolean _tmp38_; ValaExpression* _tmp42_; ValaDataType* _tmp43_; ValaDataType* _tmp44_; ValaParameter* _tmp45_; ValaParameter* value_param; ValaArrayType* _tmp46_; gchar* _tmp47_ = NULL; gchar* _tmp48_; ValaCCodeIdentifier* _tmp49_; ValaCCodeIdentifier* _tmp50_; ValaCCodeFunctionCall* _tmp51_; ValaCCodeFunctionCall* _tmp52_; ValaCCodeFunctionCall* ccall; ValaCCodeFunctionCall* _tmp53_; ValaExpression* _tmp54_; ValaCCodeExpression* _tmp55_ = NULL; ValaCCodeExpression* _tmp56_; ValaCCodeUnaryExpression* _tmp57_; ValaCCodeUnaryExpression* _tmp58_; ValaCCodeFunctionCall* _tmp59_; ValaExpression* _tmp60_; ValaCCodeExpression* _tmp61_ = NULL; ValaCCodeExpression* _tmp62_; ValaCCodeUnaryExpression* _tmp63_; ValaCCodeUnaryExpression* _tmp64_; ValaCCodeFunctionCall* _tmp65_; ValaExpression* _tmp66_; ValaTargetValue* _tmp67_; ValaTargetValue* _tmp68_; ValaCCodeExpression* _tmp69_ = NULL; ValaCCodeExpression* _tmp70_; ValaCCodeUnaryExpression* _tmp71_; ValaCCodeUnaryExpression* _tmp72_; ValaCCodeFunctionCall* _tmp73_; ValaParameter* _tmp74_; ValaExpression* _tmp75_; ValaExpression* _tmp76_; ValaCCodeExpression* _tmp77_ = NULL; ValaCCodeExpression* _tmp78_; ValaCCodeExpression* _tmp79_ = NULL; ValaCCodeExpression* _tmp80_; ValaCCodeFunction* _tmp81_; ValaCCodeFunction* _tmp82_; ValaCCodeFunctionCall* _tmp83_; self = (ValaCCodeArrayModule*) base; g_return_if_fail (assignment != NULL); _tmp0_ = assignment; _tmp1_ = vala_ccode_array_module_is_array_add (self, _tmp0_); if (!_tmp1_) { ValaAssignment* _tmp2_; _tmp2_ = assignment; VALA_CODE_VISITOR_CLASS (vala_ccode_array_module_parent_class)->visit_assignment ((ValaCodeVisitor*) VALA_CCODE_METHOD_CALL_MODULE (self), _tmp2_); return; } _tmp3_ = assignment; _tmp4_ = vala_assignment_get_right (_tmp3_); _tmp5_ = _tmp4_; _tmp6_ = _vala_code_node_ref0 (VALA_BINARY_EXPRESSION (_tmp5_)); binary = _tmp6_; _tmp7_ = assignment; _tmp8_ = vala_assignment_get_left (_tmp7_); _tmp9_ = _tmp8_; _tmp10_ = _vala_code_node_ref0 (_tmp9_); array = _tmp10_; _tmp11_ = array; _tmp12_ = vala_expression_get_value_type (_tmp11_); _tmp13_ = _tmp12_; _tmp14_ = _vala_code_node_ref0 (VALA_ARRAY_TYPE (_tmp13_)); array_type = _tmp14_; _tmp15_ = binary; _tmp16_ = vala_binary_expression_get_right (_tmp15_); _tmp17_ = _tmp16_; _tmp18_ = _vala_code_node_ref0 (_tmp17_); element = _tmp18_; _tmp19_ = array; _tmp20_ = vala_expression_get_symbol_reference (_tmp19_); _tmp21_ = _tmp20_; _tmp22_ = _vala_code_node_ref0 (_tmp21_); array_var = _tmp22_; _tmp26_ = array_type; _tmp27_ = vala_array_type_get_rank (_tmp26_); _tmp28_ = _tmp27_; if (_tmp28_ == 1) { ValaSymbol* _tmp29_; _tmp29_ = array_var; _tmp25_ = _tmp29_ != NULL; } else { _tmp25_ = FALSE; } _tmp30_ = _tmp25_; if (_tmp30_) { ValaSymbol* _tmp31_; gboolean _tmp32_ = FALSE; _tmp31_ = array_var; _tmp32_ = vala_symbol_is_internal_symbol (_tmp31_); _tmp24_ = _tmp32_; } else { _tmp24_ = FALSE; } _tmp33_ = _tmp24_; if (_tmp33_) { gboolean _tmp34_ = FALSE; ValaSymbol* _tmp35_; gboolean _tmp37_; _tmp35_ = array_var; if (VALA_IS_LOCAL_VARIABLE (_tmp35_)) { _tmp34_ = TRUE; } else { ValaSymbol* _tmp36_; _tmp36_ = array_var; _tmp34_ = VALA_IS_FIELD (_tmp36_); } _tmp37_ = _tmp34_; _tmp23_ = _tmp37_; } else { _tmp23_ = FALSE; } _tmp38_ = _tmp23_; if (_tmp38_) { } else { ValaAssignment* _tmp39_; ValaSourceReference* _tmp40_; ValaSourceReference* _tmp41_; _tmp39_ = assignment; _tmp40_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp39_); _tmp41_ = _tmp40_; vala_report_error (_tmp41_, "Array concatenation not supported for public array variables and param" \ "eters"); _vala_code_node_unref0 (array_var); _vala_code_node_unref0 (element); _vala_code_node_unref0 (array_type); _vala_code_node_unref0 (array); _vala_code_node_unref0 (binary); return; } _tmp42_ = element; _tmp43_ = vala_expression_get_target_type (_tmp42_); _tmp44_ = _tmp43_; _tmp45_ = vala_parameter_new ("value", _tmp44_, NULL); value_param = _tmp45_; _tmp46_ = array_type; _tmp47_ = vala_ccode_array_module_generate_array_add_wrapper (self, _tmp46_); _tmp48_ = _tmp47_; _tmp49_ = vala_ccode_identifier_new (_tmp48_); _tmp50_ = _tmp49_; _tmp51_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp50_); _tmp52_ = _tmp51_; _vala_ccode_node_unref0 (_tmp50_); _g_free0 (_tmp48_); ccall = _tmp52_; _tmp53_ = ccall; _tmp54_ = array; _tmp55_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, _tmp54_); _tmp56_ = _tmp55_; _tmp57_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, _tmp56_); _tmp58_ = _tmp57_; vala_ccode_function_call_add_argument (_tmp53_, (ValaCCodeExpression*) _tmp58_); _vala_ccode_node_unref0 (_tmp58_); _vala_ccode_node_unref0 (_tmp56_); _tmp59_ = ccall; _tmp60_ = array; _tmp61_ = vala_ccode_base_module_get_array_length_cexpression ((ValaCCodeBaseModule*) self, _tmp60_, -1); _tmp62_ = _tmp61_; _tmp63_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, _tmp62_); _tmp64_ = _tmp63_; vala_ccode_function_call_add_argument (_tmp59_, (ValaCCodeExpression*) _tmp64_); _vala_ccode_node_unref0 (_tmp64_); _vala_ccode_node_unref0 (_tmp62_); _tmp65_ = ccall; _tmp66_ = array; _tmp67_ = vala_expression_get_target_value (_tmp66_); _tmp68_ = _tmp67_; _tmp69_ = vala_ccode_base_module_get_array_size_cvalue ((ValaCCodeBaseModule*) self, _tmp68_); _tmp70_ = _tmp69_; _tmp71_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, _tmp70_); _tmp72_ = _tmp71_; vala_ccode_function_call_add_argument (_tmp65_, (ValaCCodeExpression*) _tmp72_); _vala_ccode_node_unref0 (_tmp72_); _vala_ccode_node_unref0 (_tmp70_); _tmp73_ = ccall; _tmp74_ = value_param; _tmp75_ = element; _tmp76_ = element; _tmp77_ = vala_ccode_base_module_get_cvalue ((ValaCCodeBaseModule*) self, _tmp76_); _tmp78_ = _tmp77_; _tmp79_ = vala_ccode_base_module_handle_struct_argument ((ValaCCodeBaseModule*) self, _tmp74_, _tmp75_, _tmp78_); _tmp80_ = _tmp79_; vala_ccode_function_call_add_argument (_tmp73_, _tmp80_); _vala_ccode_node_unref0 (_tmp80_); _vala_ccode_node_unref0 (_tmp78_); _tmp81_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp82_ = _tmp81_; _tmp83_ = ccall; vala_ccode_function_add_expression (_tmp82_, (ValaCCodeExpression*) _tmp83_); _vala_ccode_node_unref0 (ccall); _vala_code_node_unref0 (value_param); _vala_code_node_unref0 (array_var); _vala_code_node_unref0 (element); _vala_code_node_unref0 (array_type); _vala_code_node_unref0 (array); _vala_code_node_unref0 (binary); } static ValaCCodeParameter* vala_ccode_array_module_real_generate_parameter (ValaCCodeMethodModule* base, ValaParameter* param, ValaCCodeFile* decl_space, ValaMap* cparam_map, ValaMap* carg_map) { ValaCCodeArrayModule * self; ValaCCodeParameter* result = NULL; ValaParameter* _tmp0_; ValaDataType* _tmp1_; ValaDataType* _tmp2_; ValaParameter* _tmp8_; ValaDataType* _tmp9_; ValaDataType* _tmp10_; gchar* _tmp11_ = NULL; gchar* ctypename; ValaParameter* _tmp12_; ValaParameterDirection _tmp13_; ValaParameterDirection _tmp14_; ValaParameter* _tmp17_; const gchar* _tmp18_; const gchar* _tmp19_; gchar* _tmp20_ = NULL; gchar* _tmp21_; const gchar* _tmp22_; ValaCCodeParameter* _tmp23_; ValaCCodeParameter* _tmp24_; ValaCCodeParameter* main_cparam; ValaParameter* _tmp25_; ValaDataType* _tmp26_; ValaDataType* _tmp27_; ValaArrayType* _tmp28_; ValaArrayType* array_type; ValaArrayType* _tmp29_; ValaDataType* _tmp30_; ValaDataType* _tmp31_; ValaCCodeFile* _tmp32_; ValaMap* _tmp33_; ValaParameter* _tmp34_; gdouble _tmp35_ = 0.0; gint _tmp36_ = 0; ValaCCodeParameter* _tmp37_; ValaMap* _tmp38_; ValaParameter* _tmp48_; gboolean _tmp49_ = FALSE; self = (ValaCCodeArrayModule*) base; g_return_val_if_fail (param != NULL, NULL); g_return_val_if_fail (decl_space != NULL, NULL); g_return_val_if_fail (cparam_map != NULL, NULL); _tmp0_ = param; _tmp1_ = vala_variable_get_variable_type ((ValaVariable*) _tmp0_); _tmp2_ = _tmp1_; if (!VALA_IS_ARRAY_TYPE (_tmp2_)) { ValaParameter* _tmp3_; ValaCCodeFile* _tmp4_; ValaMap* _tmp5_; ValaMap* _tmp6_; ValaCCodeParameter* _tmp7_ = NULL; _tmp3_ = param; _tmp4_ = decl_space; _tmp5_ = cparam_map; _tmp6_ = carg_map; _tmp7_ = VALA_CCODE_METHOD_MODULE_CLASS (vala_ccode_array_module_parent_class)->generate_parameter ((ValaCCodeMethodModule*) VALA_CCODE_METHOD_CALL_MODULE (self), _tmp3_, _tmp4_, _tmp5_, _tmp6_); result = _tmp7_; return result; } _tmp8_ = param; _tmp9_ = vala_variable_get_variable_type ((ValaVariable*) _tmp8_); _tmp10_ = _tmp9_; _tmp11_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp10_); ctypename = _tmp11_; _tmp12_ = param; _tmp13_ = vala_parameter_get_direction (_tmp12_); _tmp14_ = _tmp13_; if (_tmp14_ != VALA_PARAMETER_DIRECTION_IN) { const gchar* _tmp15_; gchar* _tmp16_; _tmp15_ = ctypename; _tmp16_ = g_strconcat (_tmp15_, "*", NULL); _g_free0 (ctypename); ctypename = _tmp16_; } _tmp17_ = param; _tmp18_ = vala_symbol_get_name ((ValaSymbol*) _tmp17_); _tmp19_ = _tmp18_; _tmp20_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, _tmp19_); _tmp21_ = _tmp20_; _tmp22_ = ctypename; _tmp23_ = vala_ccode_parameter_new (_tmp21_, _tmp22_); _tmp24_ = _tmp23_; _g_free0 (_tmp21_); main_cparam = _tmp24_; _tmp25_ = param; _tmp26_ = vala_variable_get_variable_type ((ValaVariable*) _tmp25_); _tmp27_ = _tmp26_; _tmp28_ = _vala_code_node_ref0 (VALA_ARRAY_TYPE (_tmp27_)); array_type = _tmp28_; _tmp29_ = array_type; _tmp30_ = vala_array_type_get_element_type (_tmp29_); _tmp31_ = _tmp30_; _tmp32_ = decl_space; vala_ccode_base_module_generate_type_declaration ((ValaCCodeBaseModule*) self, _tmp31_, _tmp32_); _tmp33_ = cparam_map; _tmp34_ = param; _tmp35_ = vala_ccode_base_module_get_ccode_pos (_tmp34_); _tmp36_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, _tmp35_, FALSE); _tmp37_ = main_cparam; vala_map_set (_tmp33_, GINT_TO_POINTER (_tmp36_), _tmp37_); _tmp38_ = carg_map; if (_tmp38_ != NULL) { ValaMap* _tmp39_; ValaParameter* _tmp40_; gdouble _tmp41_ = 0.0; gint _tmp42_ = 0; ValaParameter* _tmp43_; const gchar* _tmp44_; const gchar* _tmp45_; ValaCCodeExpression* _tmp46_ = NULL; ValaCCodeExpression* _tmp47_; _tmp39_ = carg_map; _tmp40_ = param; _tmp41_ = vala_ccode_base_module_get_ccode_pos (_tmp40_); _tmp42_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, _tmp41_, FALSE); _tmp43_ = param; _tmp44_ = vala_symbol_get_name ((ValaSymbol*) _tmp43_); _tmp45_ = _tmp44_; _tmp46_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp45_); _tmp47_ = _tmp46_; vala_map_set (_tmp39_, GINT_TO_POINTER (_tmp42_), _tmp47_); _vala_ccode_node_unref0 (_tmp47_); } _tmp48_ = param; _tmp49_ = vala_ccode_base_module_get_ccode_array_length ((ValaCodeNode*) _tmp48_); if (_tmp49_) { gchar* _tmp50_; gchar* length_ctype; ValaParameter* _tmp51_; gchar* _tmp52_ = NULL; gchar* _tmp53_; gboolean _tmp54_; ValaParameter* _tmp57_; ValaParameterDirection _tmp58_; ValaParameterDirection _tmp59_; _tmp50_ = g_strdup ("int"); length_ctype = _tmp50_; _tmp51_ = param; _tmp52_ = vala_ccode_base_module_get_ccode_array_length_type ((ValaCodeNode*) _tmp51_); _tmp53_ = _tmp52_; _tmp54_ = _tmp53_ != NULL; _g_free0 (_tmp53_); if (_tmp54_) { ValaParameter* _tmp55_; gchar* _tmp56_ = NULL; _tmp55_ = param; _tmp56_ = vala_ccode_base_module_get_ccode_array_length_type ((ValaCodeNode*) _tmp55_); _g_free0 (length_ctype); length_ctype = _tmp56_; } _tmp57_ = param; _tmp58_ = vala_parameter_get_direction (_tmp57_); _tmp59_ = _tmp58_; if (_tmp59_ != VALA_PARAMETER_DIRECTION_IN) { const gchar* _tmp60_; gchar* _tmp61_ = NULL; _tmp60_ = length_ctype; _tmp61_ = g_strdup_printf ("%s*", _tmp60_); _g_free0 (length_ctype); length_ctype = _tmp61_; } { gint dim; dim = 1; { gboolean _tmp62_; _tmp62_ = TRUE; while (TRUE) { gboolean _tmp63_; gint _tmp65_; ValaArrayType* _tmp66_; gint _tmp67_; gint _tmp68_; ValaParameter* _tmp69_; gint _tmp70_; gchar* _tmp71_ = NULL; gchar* _tmp72_; const gchar* _tmp73_; ValaCCodeParameter* _tmp74_; ValaCCodeParameter* _tmp75_; ValaCCodeParameter* cparam; ValaMap* _tmp76_; ValaParameter* _tmp77_; gdouble _tmp78_ = 0.0; gint _tmp79_; gint _tmp80_ = 0; ValaCCodeParameter* _tmp81_; ValaMap* _tmp82_; _tmp63_ = _tmp62_; if (!_tmp63_) { gint _tmp64_; _tmp64_ = dim; dim = _tmp64_ + 1; } _tmp62_ = FALSE; _tmp65_ = dim; _tmp66_ = array_type; _tmp67_ = vala_array_type_get_rank (_tmp66_); _tmp68_ = _tmp67_; if (!(_tmp65_ <= _tmp68_)) { break; } _tmp69_ = param; _tmp70_ = dim; _tmp71_ = vala_ccode_base_module_get_parameter_array_length_cname ((ValaCCodeBaseModule*) self, _tmp69_, _tmp70_); _tmp72_ = _tmp71_; _tmp73_ = length_ctype; _tmp74_ = vala_ccode_parameter_new (_tmp72_, _tmp73_); _tmp75_ = _tmp74_; _g_free0 (_tmp72_); cparam = _tmp75_; _tmp76_ = cparam_map; _tmp77_ = param; _tmp78_ = vala_ccode_base_module_get_ccode_array_length_pos ((ValaCodeNode*) _tmp77_); _tmp79_ = dim; _tmp80_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, _tmp78_ + (0.01 * _tmp79_), FALSE); _tmp81_ = cparam; vala_map_set (_tmp76_, GINT_TO_POINTER (_tmp80_), _tmp81_); _tmp82_ = carg_map; if (_tmp82_ != NULL) { ValaMap* _tmp83_; ValaParameter* _tmp84_; gdouble _tmp85_ = 0.0; gint _tmp86_; gint _tmp87_ = 0; ValaCCodeParameter* _tmp88_; const gchar* _tmp89_; const gchar* _tmp90_; ValaCCodeExpression* _tmp91_ = NULL; ValaCCodeExpression* _tmp92_; _tmp83_ = carg_map; _tmp84_ = param; _tmp85_ = vala_ccode_base_module_get_ccode_array_length_pos ((ValaCodeNode*) _tmp84_); _tmp86_ = dim; _tmp87_ = vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, _tmp85_ + (0.01 * _tmp86_), FALSE); _tmp88_ = cparam; _tmp89_ = vala_ccode_parameter_get_name (_tmp88_); _tmp90_ = _tmp89_; _tmp91_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp90_); _tmp92_ = _tmp91_; vala_map_set (_tmp83_, GINT_TO_POINTER (_tmp87_), _tmp92_); _vala_ccode_node_unref0 (_tmp92_); } _vala_ccode_node_unref0 (cparam); } } } _g_free0 (length_ctype); } result = main_cparam; _vala_code_node_unref0 (array_type); _g_free0 (ctypename); return result; } ValaCCodeArrayModule* vala_ccode_array_module_construct (GType object_type) { ValaCCodeArrayModule* self = NULL; self = (ValaCCodeArrayModule*) vala_ccode_method_call_module_construct (object_type); return self; } ValaCCodeArrayModule* vala_ccode_array_module_new (void) { return vala_ccode_array_module_construct (VALA_TYPE_CCODE_ARRAY_MODULE); } static void vala_ccode_array_module_class_init (ValaCCodeArrayModuleClass * klass) { vala_ccode_array_module_parent_class = g_type_class_peek_parent (klass); VALA_CODE_VISITOR_CLASS (klass)->finalize = vala_ccode_array_module_finalize; g_type_class_add_private (klass, sizeof (ValaCCodeArrayModulePrivate)); VALA_CODE_VISITOR_CLASS (klass)->visit_array_creation_expression = vala_ccode_array_module_real_visit_array_creation_expression; VALA_CCODE_BASE_MODULE_CLASS (klass)->get_array_length_cname = vala_ccode_array_module_real_get_array_length_cname; VALA_CCODE_BASE_MODULE_CLASS (klass)->get_parameter_array_length_cname = vala_ccode_array_module_real_get_parameter_array_length_cname; VALA_CCODE_BASE_MODULE_CLASS (klass)->get_array_length_cexpression = vala_ccode_array_module_real_get_array_length_cexpression; VALA_CCODE_BASE_MODULE_CLASS (klass)->get_array_length_cvalue = vala_ccode_array_module_real_get_array_length_cvalue; VALA_CCODE_BASE_MODULE_CLASS (klass)->get_array_size_cname = vala_ccode_array_module_real_get_array_size_cname; VALA_CODE_VISITOR_CLASS (klass)->visit_element_access = vala_ccode_array_module_real_visit_element_access; VALA_CODE_VISITOR_CLASS (klass)->visit_slice_expression = vala_ccode_array_module_real_visit_slice_expression; VALA_CCODE_BASE_MODULE_CLASS (klass)->append_struct_array_free = vala_ccode_array_module_real_append_struct_array_free; VALA_CCODE_BASE_MODULE_CLASS (klass)->append_vala_array_free = vala_ccode_array_module_real_append_vala_array_free; VALA_CCODE_BASE_MODULE_CLASS (klass)->append_vala_array_move = vala_ccode_array_module_real_append_vala_array_move; VALA_CCODE_BASE_MODULE_CLASS (klass)->append_vala_array_length = vala_ccode_array_module_real_append_vala_array_length; VALA_CCODE_BASE_MODULE_CLASS (klass)->copy_value = vala_ccode_array_module_real_copy_value; VALA_CCODE_BASE_MODULE_CLASS (klass)->get_dup_func_expression = vala_ccode_array_module_real_get_dup_func_expression; VALA_CCODE_BASE_MODULE_CLASS (klass)->destroy_value = vala_ccode_array_module_real_destroy_value; VALA_CODE_VISITOR_CLASS (klass)->visit_assignment = vala_ccode_array_module_real_visit_assignment; VALA_CCODE_METHOD_MODULE_CLASS (klass)->generate_parameter = vala_ccode_array_module_real_generate_parameter; } static void vala_ccode_array_module_instance_init (ValaCCodeArrayModule * self) { self->priv = VALA_CCODE_ARRAY_MODULE_GET_PRIVATE (self); self->priv->next_array_dup_id = 0; self->priv->next_array_add_id = 0; } static void vala_ccode_array_module_finalize (ValaCodeVisitor* obj) { ValaCCodeArrayModule * self; self = VALA_CCODE_ARRAY_MODULE (obj); VALA_CODE_VISITOR_CLASS (vala_ccode_array_module_parent_class)->finalize (obj); } GType vala_ccode_array_module_get_type (void) { static volatile gsize vala_ccode_array_module_type_id__volatile = 0; if (g_once_init_enter (&vala_ccode_array_module_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (ValaCCodeArrayModuleClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_ccode_array_module_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaCCodeArrayModule), 0, (GInstanceInitFunc) vala_ccode_array_module_instance_init, NULL }; GType vala_ccode_array_module_type_id; vala_ccode_array_module_type_id = g_type_register_static (VALA_TYPE_CCODE_METHOD_CALL_MODULE, "ValaCCodeArrayModule", &g_define_type_info, 0); g_once_init_leave (&vala_ccode_array_module_type_id__volatile, vala_ccode_array_module_type_id); } return vala_ccode_array_module_type_id__volatile; }