Example #1
0
static void vala_dova_array_module_real_visit_element_access (ValaCodeVisitor* base, ValaElementAccess* expr) {
	ValaDovaArrayModule * self;
	ValaElementAccess* _tmp0_;
	ValaList* _tmp1_ = NULL;
	ValaList* indices;
	ValaElementAccess* _tmp2_;
	ValaExpression* _tmp3_;
	ValaExpression* _tmp4_;
	ValaCCodeExpression* _tmp5_ = NULL;
	ValaCCodeExpression* ccontainer;
	gpointer _tmp6_ = NULL;
	ValaExpression* _tmp7_;
	ValaCCodeExpression* _tmp8_ = NULL;
	ValaCCodeExpression* _tmp9_;
	ValaCCodeExpression* cindex;
	ValaElementAccess* _tmp10_;
	ValaCCodeElementAccess* _tmp11_;
	ValaCCodeElementAccess* _tmp12_;
	self = (ValaDovaArrayModule*) base;
	g_return_if_fail (expr != NULL);
	_tmp0_ = expr;
	_tmp1_ = vala_element_access_get_indices (_tmp0_);
	indices = _tmp1_;
	_tmp2_ = expr;
	_tmp3_ = vala_element_access_get_container (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = vala_dova_base_module_get_cvalue ((ValaDovaBaseModule*) self, _tmp4_);
	ccontainer = _tmp5_;
	_tmp6_ = vala_list_get (indices, 0);
	_tmp7_ = (ValaExpression*) _tmp6_;
	_tmp8_ = vala_dova_base_module_get_cvalue ((ValaDovaBaseModule*) self, _tmp7_);
	_tmp9_ = _tmp8_;
	_vala_code_node_unref0 (_tmp7_);
	cindex = _tmp9_;
	_tmp10_ = expr;
	_tmp11_ = vala_ccode_element_access_new (ccontainer, cindex);
	_tmp12_ = _tmp11_;
	vala_dova_base_module_set_cvalue ((ValaDovaBaseModule*) self, (ValaExpression*) _tmp10_, (ValaCCodeExpression*) _tmp12_);
	_vala_ccode_node_unref0 (_tmp12_);
	_vala_ccode_node_unref0 (cindex);
	_vala_ccode_node_unref0 (ccontainer);
	_vala_iterable_unref0 (indices);
}
Example #2
0
static void vala_dova_control_flow_module_real_visit_if_statement (ValaCodeVisitor* base, ValaIfStatement* stmt) {
	ValaDovaControlFlowModule * self;
	ValaCCodeFunction* _tmp0_;
	ValaCCodeFunction* _tmp1_;
	ValaIfStatement* _tmp2_;
	ValaExpression* _tmp3_;
	ValaExpression* _tmp4_;
	ValaCCodeExpression* _tmp5_ = NULL;
	ValaCCodeExpression* _tmp6_;
	ValaIfStatement* _tmp7_;
	ValaBlock* _tmp8_;
	ValaBlock* _tmp9_;
	ValaIfStatement* _tmp10_;
	ValaBlock* _tmp11_;
	ValaBlock* _tmp12_;
	ValaCCodeFunction* _tmp18_;
	ValaCCodeFunction* _tmp19_;
	self = (ValaDovaControlFlowModule*) base;
	g_return_if_fail (stmt != NULL);
	_tmp0_ = vala_dova_base_module_get_ccode ((ValaDovaBaseModule*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = stmt;
	_tmp3_ = vala_if_statement_get_condition (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = vala_dova_base_module_get_cvalue ((ValaDovaBaseModule*) self, _tmp4_);
	_tmp6_ = _tmp5_;
	vala_ccode_function_open_if (_tmp1_, _tmp6_);
	_vala_ccode_node_unref0 (_tmp6_);
	_tmp7_ = stmt;
	_tmp8_ = vala_if_statement_get_true_statement (_tmp7_);
	_tmp9_ = _tmp8_;
	vala_code_node_emit ((ValaCodeNode*) _tmp9_, (ValaCodeGenerator*) self);
	_tmp10_ = stmt;
	_tmp11_ = vala_if_statement_get_false_statement (_tmp10_);
	_tmp12_ = _tmp11_;
	if (_tmp12_ != NULL) {
		ValaCCodeFunction* _tmp13_;
		ValaCCodeFunction* _tmp14_;
		ValaIfStatement* _tmp15_;
		ValaBlock* _tmp16_;
		ValaBlock* _tmp17_;
		_tmp13_ = vala_dova_base_module_get_ccode ((ValaDovaBaseModule*) self);
		_tmp14_ = _tmp13_;
		vala_ccode_function_add_else (_tmp14_);
		_tmp15_ = stmt;
		_tmp16_ = vala_if_statement_get_false_statement (_tmp15_);
		_tmp17_ = _tmp16_;
		vala_code_node_emit ((ValaCodeNode*) _tmp17_, (ValaCodeGenerator*) self);
	}
	_tmp18_ = vala_dova_base_module_get_ccode ((ValaDovaBaseModule*) self);
	_tmp19_ = _tmp18_;
	vala_ccode_function_close (_tmp19_);
}
Example #3
0
static void vala_dova_control_flow_module_real_visit_switch_label (ValaCodeVisitor* base, ValaSwitchLabel* label) {
	ValaDovaControlFlowModule * self;
	ValaSwitchLabel* _tmp0_;
	ValaExpression* _tmp1_;
	ValaExpression* _tmp2_;
	self = (ValaDovaControlFlowModule*) base;
	g_return_if_fail (label != NULL);
	_tmp0_ = label;
	_tmp1_ = vala_switch_label_get_expression (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ != NULL) {
		ValaSwitchLabel* _tmp3_;
		ValaExpression* _tmp4_;
		ValaExpression* _tmp5_;
		ValaSwitchLabel* _tmp6_;
		ValaExpression* _tmp7_;
		ValaExpression* _tmp8_;
		ValaCCodeFunction* _tmp9_;
		ValaCCodeFunction* _tmp10_;
		ValaSwitchLabel* _tmp11_;
		ValaExpression* _tmp12_;
		ValaExpression* _tmp13_;
		ValaCCodeExpression* _tmp14_ = NULL;
		ValaCCodeExpression* _tmp15_;
		_tmp3_ = label;
		_tmp4_ = vala_switch_label_get_expression (_tmp3_);
		_tmp5_ = _tmp4_;
		vala_code_node_emit ((ValaCodeNode*) _tmp5_, (ValaCodeGenerator*) self);
		_tmp6_ = label;
		_tmp7_ = vala_switch_label_get_expression (_tmp6_);
		_tmp8_ = _tmp7_;
		vala_code_visitor_visit_end_full_expression ((ValaCodeVisitor*) self, _tmp8_);
		_tmp9_ = vala_dova_base_module_get_ccode ((ValaDovaBaseModule*) self);
		_tmp10_ = _tmp9_;
		_tmp11_ = label;
		_tmp12_ = vala_switch_label_get_expression (_tmp11_);
		_tmp13_ = _tmp12_;
		_tmp14_ = vala_dova_base_module_get_cvalue ((ValaDovaBaseModule*) self, _tmp13_);
		_tmp15_ = _tmp14_;
		vala_ccode_function_add_case (_tmp10_, _tmp15_);
		_vala_ccode_node_unref0 (_tmp15_);
	}
}
Example #4
0
static void vala_dova_control_flow_module_real_visit_switch_statement (ValaCodeVisitor* base, ValaSwitchStatement* stmt) {
	ValaDovaControlFlowModule * self;
	ValaCCodeFunction* _tmp0_;
	ValaCCodeFunction* _tmp1_;
	ValaSwitchStatement* _tmp2_;
	ValaExpression* _tmp3_;
	ValaExpression* _tmp4_;
	ValaCCodeExpression* _tmp5_ = NULL;
	ValaCCodeExpression* _tmp6_;
	ValaCCodeFunction* _tmp23_;
	ValaCCodeFunction* _tmp24_;
	self = (ValaDovaControlFlowModule*) base;
	g_return_if_fail (stmt != NULL);
	_tmp0_ = vala_dova_base_module_get_ccode ((ValaDovaBaseModule*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = stmt;
	_tmp3_ = vala_switch_statement_get_expression (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = vala_dova_base_module_get_cvalue ((ValaDovaBaseModule*) self, _tmp4_);
	_tmp6_ = _tmp5_;
	vala_ccode_function_open_switch (_tmp1_, _tmp6_);
	_vala_ccode_node_unref0 (_tmp6_);
	{
		ValaSwitchStatement* _tmp7_;
		ValaList* _tmp8_ = NULL;
		ValaList* _section_list;
		ValaList* _tmp9_;
		gint _tmp10_;
		gint _tmp11_;
		gint _section_size;
		gint _section_index;
		_tmp7_ = stmt;
		_tmp8_ = vala_switch_statement_get_sections (_tmp7_);
		_section_list = _tmp8_;
		_tmp9_ = _section_list;
		_tmp10_ = vala_collection_get_size ((ValaCollection*) _tmp9_);
		_tmp11_ = _tmp10_;
		_section_size = _tmp11_;
		_section_index = -1;
		while (TRUE) {
			gint _tmp12_;
			gint _tmp13_;
			gint _tmp14_;
			ValaList* _tmp15_;
			gint _tmp16_;
			gpointer _tmp17_ = NULL;
			ValaSwitchSection* section;
			ValaSwitchSection* _tmp18_;
			gboolean _tmp19_ = FALSE;
			ValaSwitchSection* _tmp22_;
			_tmp12_ = _section_index;
			_section_index = _tmp12_ + 1;
			_tmp13_ = _section_index;
			_tmp14_ = _section_size;
			if (!(_tmp13_ < _tmp14_)) {
				break;
			}
			_tmp15_ = _section_list;
			_tmp16_ = _section_index;
			_tmp17_ = vala_list_get (_tmp15_, _tmp16_);
			section = (ValaSwitchSection*) _tmp17_;
			_tmp18_ = section;
			_tmp19_ = vala_switch_section_has_default_label (_tmp18_);
			if (_tmp19_) {
				ValaCCodeFunction* _tmp20_;
				ValaCCodeFunction* _tmp21_;
				_tmp20_ = vala_dova_base_module_get_ccode ((ValaDovaBaseModule*) self);
				_tmp21_ = _tmp20_;
				vala_ccode_function_add_default (_tmp21_);
			}
			_tmp22_ = section;
			vala_code_node_emit ((ValaCodeNode*) _tmp22_, (ValaCodeGenerator*) self);
			_vala_code_node_unref0 (section);
		}
		_vala_iterable_unref0 (_section_list);
	}
	_tmp23_ = vala_dova_base_module_get_ccode ((ValaDovaBaseModule*) self);
	_tmp24_ = _tmp23_;
	vala_ccode_function_close (_tmp24_);
}
Example #5
0
static void vala_dova_array_module_real_visit_slice_expression (ValaCodeVisitor* base, ValaSliceExpression* expr) {
	ValaDovaArrayModule * 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;
	ValaSliceExpression* _tmp12_;
	ValaExpression* _tmp13_;
	ValaExpression* _tmp14_;
	ValaDataType* _tmp15_;
	ValaDataType* _tmp16_;
	ValaArrayType* _tmp17_;
	ValaArrayType* array_type;
	ValaCCodeIdentifier* _tmp18_;
	ValaCCodeIdentifier* _tmp19_;
	ValaCCodeFunctionCall* _tmp20_;
	ValaCCodeFunctionCall* _tmp21_;
	ValaCCodeFunctionCall* array;
	ValaCCodeMemberAccess* _tmp22_;
	ValaCCodeMemberAccess* _tmp23_;
	ValaDataType* _tmp24_;
	ValaDataType* _tmp25_;
	gchar* _tmp26_ = NULL;
	gchar* _tmp27_;
	gchar* _tmp28_;
	gchar* _tmp29_;
	ValaCCodeCastExpression* _tmp30_;
	ValaCCodeCastExpression* _tmp31_;
	ValaCCodeBinaryExpression* _tmp32_;
	ValaCCodeBinaryExpression* _tmp33_;
	ValaCCodeBinaryExpression* _tmp34_;
	ValaCCodeBinaryExpression* _tmp35_;
	ValaSliceExpression* _tmp36_;
	self = (ValaDovaArrayModule*) base;
	g_return_if_fail (expr != NULL);
	_tmp0_ = expr;
	_tmp1_ = vala_slice_expression_get_container (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = vala_dova_base_module_get_cvalue ((ValaDovaBaseModule*) self, _tmp2_);
	ccontainer = _tmp3_;
	_tmp4_ = expr;
	_tmp5_ = vala_slice_expression_get_start (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = vala_dova_base_module_get_cvalue ((ValaDovaBaseModule*) self, _tmp6_);
	cstart = _tmp7_;
	_tmp8_ = expr;
	_tmp9_ = vala_slice_expression_get_stop (_tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = vala_dova_base_module_get_cvalue ((ValaDovaBaseModule*) self, _tmp10_);
	cstop = _tmp11_;
	_tmp12_ = expr;
	_tmp13_ = vala_slice_expression_get_container (_tmp12_);
	_tmp14_ = _tmp13_;
	_tmp15_ = vala_expression_get_value_type (_tmp14_);
	_tmp16_ = _tmp15_;
	_tmp17_ = _vala_code_node_ref0 (VALA_ARRAY_TYPE (_tmp16_));
	array_type = _tmp17_;
	_tmp18_ = vala_ccode_identifier_new ("dova_array");
	_tmp19_ = _tmp18_;
	_tmp20_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp19_);
	_tmp21_ = _tmp20_;
	_vala_ccode_node_unref0 (_tmp19_);
	array = _tmp21_;
	_tmp22_ = vala_ccode_member_access_new (ccontainer, "data", FALSE);
	_tmp23_ = _tmp22_;
	_tmp24_ = vala_array_type_get_element_type (array_type);
	_tmp25_ = _tmp24_;
	_tmp26_ = vala_dova_base_module_get_ccode_name ((ValaDovaBaseModule*) self, (ValaCodeNode*) _tmp25_);
	_tmp27_ = _tmp26_;
	_tmp28_ = g_strconcat (_tmp27_, "*", NULL);
	_tmp29_ = _tmp28_;
	_tmp30_ = vala_ccode_cast_expression_new ((ValaCCodeExpression*) _tmp23_, _tmp29_);
	_tmp31_ = _tmp30_;
	_tmp32_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) _tmp31_, cstart);
	_tmp33_ = _tmp32_;
	vala_ccode_function_call_add_argument (array, (ValaCCodeExpression*) _tmp33_);
	_vala_ccode_node_unref0 (_tmp33_);
	_vala_ccode_node_unref0 (_tmp31_);
	_g_free0 (_tmp29_);
	_g_free0 (_tmp27_);
	_vala_ccode_node_unref0 (_tmp23_);
	_tmp34_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MINUS, cstop, cstart);
	_tmp35_ = _tmp34_;
	vala_ccode_function_call_add_argument (array, (ValaCCodeExpression*) _tmp35_);
	_vala_ccode_node_unref0 (_tmp35_);
	_tmp36_ = expr;
	vala_dova_base_module_set_cvalue ((ValaDovaBaseModule*) self, (ValaExpression*) _tmp36_, (ValaCCodeExpression*) array);
	_vala_ccode_node_unref0 (array);
	_vala_code_node_unref0 (array_type);
	_vala_ccode_node_unref0 (cstop);
	_vala_ccode_node_unref0 (cstart);
	_vala_ccode_node_unref0 (ccontainer);
}
Example #6
0
static void vala_dova_array_module_real_visit_array_creation_expression (ValaCodeVisitor* base, ValaArrayCreationExpression* expr) {
	ValaDovaArrayModule * self;
	ValaArrayCreationExpression* _tmp0_;
	ValaDataType* _tmp1_;
	ValaDataType* _tmp2_;
	ValaArrayType* _tmp3_;
	ValaArrayType* array_type;
	gboolean _tmp4_ = FALSE;
	ValaArrayType* _tmp5_;
	gboolean _tmp9_;
	ValaStruct* _tmp24_;
	ValaScope* _tmp25_;
	ValaScope* _tmp26_;
	ValaSymbol* _tmp27_ = NULL;
	ValaMethod* _tmp28_;
	ValaCCodeFile* _tmp29_;
	ValaCCodeIdentifier* _tmp30_;
	ValaCCodeIdentifier* _tmp31_;
	ValaCCodeFunctionCall* _tmp32_;
	ValaCCodeFunctionCall* _tmp33_;
	ValaCCodeFunctionCall* array_new;
	ValaCCodeFunctionCall* _tmp34_;
	ValaArrayCreationExpression* _tmp35_;
	ValaDataType* _tmp36_;
	ValaDataType* _tmp37_;
	ValaCCodeExpression* _tmp38_ = NULL;
	ValaCCodeExpression* _tmp39_;
	ValaCCodeFunctionCall* _tmp40_;
	ValaArrayCreationExpression* _tmp41_;
	ValaList* _tmp42_ = NULL;
	ValaList* _tmp43_;
	gpointer _tmp44_ = NULL;
	ValaExpression* _tmp45_;
	ValaCCodeExpression* _tmp46_ = NULL;
	ValaCCodeExpression* _tmp47_;
	ValaArrayCreationExpression* _tmp48_;
	ValaDataType* _tmp49_;
	ValaDataType* _tmp50_;
	ValaArrayCreationExpression* _tmp51_;
	ValaLocalVariable* _tmp52_ = NULL;
	ValaLocalVariable* temp_var;
	ValaLocalVariable* _tmp53_;
	const gchar* _tmp54_;
	const gchar* _tmp55_;
	ValaCCodeExpression* _tmp56_ = NULL;
	ValaCCodeExpression* name_cnode;
	ValaLocalVariable* _tmp57_;
	ValaCCodeFunction* _tmp58_;
	ValaCCodeFunction* _tmp59_;
	ValaCCodeExpression* _tmp60_;
	ValaCCodeFunctionCall* _tmp61_;
	ValaArrayCreationExpression* _tmp62_;
	ValaCCodeExpression* _tmp63_;
	self = (ValaDovaArrayModule*) 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_;
		ValaCCodeIdentifier* _tmp16_;
		ValaCCodeIdentifier* name_cnode;
		gint i;
		ValaLocalVariable* _tmp17_;
		ValaCCodeIdentifier* _tmp18_;
		ValaArrayCreationExpression* _tmp19_;
		ValaInitializerList* _tmp20_;
		ValaInitializerList* _tmp21_;
		ValaArrayCreationExpression* _tmp22_;
		ValaCCodeIdentifier* _tmp23_;
		_tmp10_ = array_type;
		_tmp11_ = expr;
		_tmp12_ = vala_dova_base_module_get_temp_variable ((ValaDovaBaseModule*) self, (ValaDataType*) _tmp10_, TRUE, (ValaCodeNode*) _tmp11_);
		temp_var = _tmp12_;
		_tmp13_ = temp_var;
		_tmp14_ = vala_symbol_get_name ((ValaSymbol*) _tmp13_);
		_tmp15_ = _tmp14_;
		_tmp16_ = vala_ccode_identifier_new (_tmp15_);
		name_cnode = _tmp16_;
		i = 0;
		_tmp17_ = temp_var;
		vala_dova_base_module_emit_temp_var ((ValaDovaBaseModule*) self, _tmp17_);
		_tmp18_ = name_cnode;
		_tmp19_ = expr;
		_tmp20_ = vala_array_creation_expression_get_initializer_list (_tmp19_);
		_tmp21_ = _tmp20_;
		vala_dova_array_module_append_initializer_list (self, (ValaCCodeExpression*) _tmp18_, _tmp21_, &i);
		_tmp22_ = expr;
		_tmp23_ = name_cnode;
		vala_dova_base_module_set_cvalue ((ValaDovaBaseModule*) self, (ValaExpression*) _tmp22_, (ValaCCodeExpression*) _tmp23_);
		_vala_ccode_node_unref0 (name_cnode);
		_vala_code_node_unref0 (temp_var);
		_vala_code_node_unref0 (array_type);
		return;
	}
	_tmp24_ = ((ValaDovaBaseModule*) self)->array_struct;
	_tmp25_ = vala_symbol_get_scope ((ValaSymbol*) _tmp24_);
	_tmp26_ = _tmp25_;
	_tmp27_ = vala_scope_lookup (_tmp26_, "create");
	_tmp28_ = VALA_METHOD (_tmp27_);
	_tmp29_ = ((ValaDovaBaseModule*) self)->cfile;
	vala_dova_base_module_generate_method_declaration ((ValaDovaBaseModule*) self, _tmp28_, _tmp29_);
	_vala_code_node_unref0 (_tmp28_);
	_tmp30_ = vala_ccode_identifier_new ("dova_array_create");
	_tmp31_ = _tmp30_;
	_tmp32_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp31_);
	_tmp33_ = _tmp32_;
	_vala_ccode_node_unref0 (_tmp31_);
	array_new = _tmp33_;
	_tmp34_ = array_new;
	_tmp35_ = expr;
	_tmp36_ = vala_array_creation_expression_get_element_type (_tmp35_);
	_tmp37_ = _tmp36_;
	_tmp38_ = vala_dova_base_module_get_type_id_expression ((ValaDovaBaseModule*) self, _tmp37_, FALSE);
	_tmp39_ = _tmp38_;
	vala_ccode_function_call_add_argument (_tmp34_, _tmp39_);
	_vala_ccode_node_unref0 (_tmp39_);
	_tmp40_ = array_new;
	_tmp41_ = expr;
	_tmp42_ = vala_array_creation_expression_get_sizes (_tmp41_);
	_tmp43_ = _tmp42_;
	_tmp44_ = vala_list_get (_tmp43_, 0);
	_tmp45_ = (ValaExpression*) _tmp44_;
	_tmp46_ = vala_dova_base_module_get_cvalue ((ValaDovaBaseModule*) self, _tmp45_);
	_tmp47_ = _tmp46_;
	vala_ccode_function_call_add_argument (_tmp40_, _tmp47_);
	_vala_ccode_node_unref0 (_tmp47_);
	_vala_code_node_unref0 (_tmp45_);
	_vala_iterable_unref0 (_tmp43_);
	_tmp48_ = expr;
	_tmp49_ = vala_expression_get_value_type ((ValaExpression*) _tmp48_);
	_tmp50_ = _tmp49_;
	_tmp51_ = expr;
	_tmp52_ = vala_dova_base_module_get_temp_variable ((ValaDovaBaseModule*) self, _tmp50_, TRUE, (ValaCodeNode*) _tmp51_);
	temp_var = _tmp52_;
	_tmp53_ = temp_var;
	_tmp54_ = vala_symbol_get_name ((ValaSymbol*) _tmp53_);
	_tmp55_ = _tmp54_;
	_tmp56_ = vala_dova_base_module_get_variable_cexpression ((ValaDovaBaseModule*) self, _tmp55_);
	name_cnode = _tmp56_;
	_tmp57_ = temp_var;
	vala_dova_base_module_emit_temp_var ((ValaDovaBaseModule*) self, _tmp57_);
	_tmp58_ = vala_dova_base_module_get_ccode ((ValaDovaBaseModule*) self);
	_tmp59_ = _tmp58_;
	_tmp60_ = name_cnode;
	_tmp61_ = array_new;
	vala_ccode_function_add_assignment (_tmp59_, _tmp60_, (ValaCCodeExpression*) _tmp61_);
	_tmp62_ = expr;
	_tmp63_ = name_cnode;
	vala_dova_base_module_set_cvalue ((ValaDovaBaseModule*) self, (ValaExpression*) _tmp62_, _tmp63_);
	_vala_ccode_node_unref0 (name_cnode);
	_vala_code_node_unref0 (temp_var);
	_vala_ccode_node_unref0 (array_new);
	_vala_code_node_unref0 (array_type);
}
Example #7
0
static void vala_dova_array_module_append_initializer_list (ValaDovaArrayModule* self, ValaCCodeExpression* name_cnode, ValaInitializerList* initializer_list, 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;
			ValaCCodeFunction* _tmp11_;
			ValaCCodeFunction* _tmp12_;
			ValaCCodeExpression* _tmp13_;
			gint _tmp14_;
			gchar* _tmp15_ = NULL;
			gchar* _tmp16_;
			ValaCCodeConstant* _tmp17_;
			ValaCCodeConstant* _tmp18_;
			ValaCCodeElementAccess* _tmp19_;
			ValaCCodeElementAccess* _tmp20_;
			ValaExpression* _tmp21_;
			ValaCCodeExpression* _tmp22_ = NULL;
			ValaCCodeExpression* _tmp23_;
			gint _tmp24_;
			_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_ = vala_dova_base_module_get_ccode ((ValaDovaBaseModule*) self);
			_tmp12_ = _tmp11_;
			_tmp13_ = name_cnode;
			_tmp14_ = *i;
			_tmp15_ = g_strdup_printf ("%i", _tmp14_);
			_tmp16_ = _tmp15_;
			_tmp17_ = vala_ccode_constant_new (_tmp16_);
			_tmp18_ = _tmp17_;
			_tmp19_ = vala_ccode_element_access_new (_tmp13_, (ValaCCodeExpression*) _tmp18_);
			_tmp20_ = _tmp19_;
			_tmp21_ = e;
			_tmp22_ = vala_dova_base_module_get_cvalue ((ValaDovaBaseModule*) self, _tmp21_);
			_tmp23_ = _tmp22_;
			vala_ccode_function_add_assignment (_tmp12_, (ValaCCodeExpression*) _tmp20_, _tmp23_);
			_vala_ccode_node_unref0 (_tmp23_);
			_vala_ccode_node_unref0 (_tmp20_);
			_vala_ccode_node_unref0 (_tmp18_);
			_g_free0 (_tmp16_);
			_tmp24_ = *i;
			*i = _tmp24_ + 1;
			_vala_code_node_unref0 (e);
		}
		_vala_iterable_unref0 (_e_list);
	}
}