static void vala_ccode_file_finalize (ValaCCodeFile* obj) {
	ValaCCodeFile * self;
	self = VALA_CCODE_FILE (obj);
	_vala_iterable_unref0 (self->priv->declarations);
	_vala_iterable_unref0 (self->priv->includes);
	_vala_ccode_node_unref0 (self->priv->comments);
	_vala_ccode_node_unref0 (self->priv->include_directives);
	_vala_ccode_node_unref0 (self->priv->type_declaration);
	_vala_ccode_node_unref0 (self->priv->type_definition);
	_vala_ccode_node_unref0 (self->priv->type_member_declaration);
	_vala_ccode_node_unref0 (self->priv->constant_declaration);
	_vala_ccode_node_unref0 (self->priv->type_member_definition);
}
예제 #2
0
static void vala_source_reference_set_using_directives (ValaSourceReference* self, ValaList* value) {
	ValaList* _tmp0_;
	ValaList* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = _vala_iterable_ref0 (_tmp0_);
	_vala_iterable_unref0 (self->priv->_using_directives);
	self->priv->_using_directives = _tmp1_;
}
예제 #3
0
static void vala_tuple_real_emit (ValaCodeNode* base, ValaCodeGenerator* codegen) {
	ValaTuple * self;
	ValaCodeGenerator* _tmp13_;
	ValaCodeGenerator* _tmp14_;
	self = (ValaTuple*) base;
	g_return_if_fail (codegen != NULL);
	{
		ValaList* _tmp0_;
		ValaList* _tmp1_;
		ValaList* _expr_list;
		ValaList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _expr_size;
		gint _expr_index;
		_tmp0_ = self->priv->expression_list;
		_tmp1_ = _vala_iterable_ref0 (_tmp0_);
		_expr_list = _tmp1_;
		_tmp2_ = _expr_list;
		_tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_expr_size = _tmp4_;
		_expr_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			ValaList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_ = NULL;
			ValaExpression* expr;
			ValaExpression* _tmp11_;
			ValaCodeGenerator* _tmp12_;
			_tmp5_ = _expr_index;
			_expr_index = _tmp5_ + 1;
			_tmp6_ = _expr_index;
			_tmp7_ = _expr_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _expr_list;
			_tmp9_ = _expr_index;
			_tmp10_ = vala_list_get (_tmp8_, _tmp9_);
			expr = (ValaExpression*) _tmp10_;
			_tmp11_ = expr;
			_tmp12_ = codegen;
			vala_code_node_emit ((ValaCodeNode*) _tmp11_, _tmp12_);
			_vala_code_node_unref0 (expr);
		}
		_vala_iterable_unref0 (_expr_list);
	}
	_tmp13_ = codegen;
	vala_code_visitor_visit_tuple ((ValaCodeVisitor*) _tmp13_, self);
	_tmp14_ = codegen;
	vala_code_visitor_visit_expression ((ValaCodeVisitor*) _tmp14_, (ValaExpression*) self);
}
예제 #4
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);
}
예제 #5
0
static void vala_source_reference_finalize (ValaSourceReference* obj) {
	ValaSourceReference * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALA_TYPE_SOURCE_REFERENCE, ValaSourceReference);
	_vala_iterable_unref0 (self->priv->_using_directives);
}
예제 #6
0
ValaMap* vala_markup_reader_get_attributes (ValaMarkupReader* self) {
	ValaMap* result = NULL;
	GHashFunc _tmp0_;
	GEqualFunc _tmp1_;
	GEqualFunc _tmp2_;
	ValaHashMap* _tmp3_;
	ValaHashMap* _result_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_str_hash;
	_tmp1_ = g_str_equal;
	_tmp2_ = g_direct_equal;
	_tmp3_ = vala_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, _tmp0_, _tmp1_, _tmp2_);
	_result_ = _tmp3_;
	{
		ValaMap* _tmp4_;
		ValaSet* _tmp5_ = NULL;
		ValaSet* _tmp6_;
		ValaIterator* _tmp7_ = NULL;
		ValaIterator* _tmp8_;
		ValaIterator* _key_it;
		_tmp4_ = self->priv->attributes;
		_tmp5_ = vala_map_get_keys (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = vala_iterable_iterator ((ValaIterable*) _tmp6_);
		_tmp8_ = _tmp7_;
		_vala_iterable_unref0 (_tmp6_);
		_key_it = _tmp8_;
		while (TRUE) {
			ValaIterator* _tmp9_;
			gboolean _tmp10_ = FALSE;
			ValaIterator* _tmp11_;
			gpointer _tmp12_ = NULL;
			gchar* key;
			ValaHashMap* _tmp13_;
			const gchar* _tmp14_;
			ValaMap* _tmp15_;
			const gchar* _tmp16_;
			gpointer _tmp17_ = NULL;
			gchar* _tmp18_;
			_tmp9_ = _key_it;
			_tmp10_ = vala_iterator_next (_tmp9_);
			if (!_tmp10_) {
				break;
			}
			_tmp11_ = _key_it;
			_tmp12_ = vala_iterator_get (_tmp11_);
			key = (gchar*) _tmp12_;
			_tmp13_ = _result_;
			_tmp14_ = key;
			_tmp15_ = self->priv->attributes;
			_tmp16_ = key;
			_tmp17_ = vala_map_get (_tmp15_, _tmp16_);
			_tmp18_ = (gchar*) _tmp17_;
			vala_map_set ((ValaMap*) _tmp13_, _tmp14_, _tmp18_);
			_g_free0 (_tmp18_);
			_g_free0 (key);
		}
		_vala_iterator_unref0 (_key_it);
	}
	result = (ValaMap*) _result_;
	return result;
}
static void vala_ccode_file_get_symbols_from_fragment (ValaCCodeFile* self, ValaList* symbols, ValaCCodeFragment* fragment) {
	g_return_if_fail (self != NULL);
	g_return_if_fail (symbols != NULL);
	g_return_if_fail (fragment != NULL);
	{
		ValaCCodeFragment* _tmp0_;
		ValaList* _tmp1_ = NULL;
		ValaList* _node_list;
		ValaList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _node_size;
		gint _node_index;
		_tmp0_ = fragment;
		_tmp1_ = vala_ccode_fragment_get_children (_tmp0_);
		_node_list = _tmp1_;
		_tmp2_ = _node_list;
		_tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_node_size = _tmp4_;
		_node_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			ValaList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_ = NULL;
			ValaCCodeNode* node;
			ValaCCodeNode* _tmp11_;
			_tmp5_ = _node_index;
			_node_index = _tmp5_ + 1;
			_tmp6_ = _node_index;
			_tmp7_ = _node_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _node_list;
			_tmp9_ = _node_index;
			_tmp10_ = vala_list_get (_tmp8_, _tmp9_);
			node = (ValaCCodeNode*) _tmp10_;
			_tmp11_ = node;
			if (VALA_IS_CCODE_FRAGMENT (_tmp11_)) {
				ValaList* _tmp12_;
				ValaCCodeNode* _tmp13_;
				_tmp12_ = symbols;
				_tmp13_ = node;
				vala_ccode_file_get_symbols_from_fragment (self, _tmp12_, VALA_CCODE_FRAGMENT (_tmp13_));
			} else {
				ValaCCodeNode* _tmp14_;
				ValaCCodeFunction* _tmp15_;
				ValaCCodeFunction* func;
				ValaCCodeFunction* _tmp16_;
				_tmp14_ = node;
				_tmp15_ = _vala_ccode_node_ref0 (VALA_IS_CCODE_FUNCTION (_tmp14_) ? ((ValaCCodeFunction*) _tmp14_) : NULL);
				func = _tmp15_;
				_tmp16_ = func;
				if (_tmp16_ != NULL) {
					ValaList* _tmp17_;
					ValaCCodeFunction* _tmp18_;
					const gchar* _tmp19_;
					const gchar* _tmp20_;
					_tmp17_ = symbols;
					_tmp18_ = func;
					_tmp19_ = vala_ccode_function_get_name (_tmp18_);
					_tmp20_ = _tmp19_;
					vala_collection_add ((ValaCollection*) _tmp17_, _tmp20_);
				}
				_vala_ccode_node_unref0 (func);
			}
			_vala_ccode_node_unref0 (node);
		}
		_vala_iterable_unref0 (_node_list);
	}
}
예제 #8
0
void vala_ccode_compiler_compile (ValaCCodeCompiler* self, ValaCodeContext* context, const gchar* cc_command, gchar** cc_options, int cc_options_length1) {
	gboolean use_pkgconfig;
	gchar* _tmp0_;
	gchar* pc;
	ValaCodeContext* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	ValaCodeContext* _tmp6_;
	ValaProfile _tmp7_;
	ValaProfile _tmp8_;
	gchar* _tmp34_;
	gchar* pkgflags;
	gboolean _tmp35_;
	const gchar* _tmp45_;
	const gchar* _tmp46_;
	gchar* _tmp47_;
	gchar* cmdline;
	ValaCodeContext* _tmp48_;
	gboolean _tmp49_;
	gboolean _tmp50_;
	ValaCodeContext* _tmp53_;
	gboolean _tmp54_;
	gboolean _tmp55_;
	ValaCodeContext* _tmp93_;
	ValaList* _tmp94_ = NULL;
	ValaList* source_files;
	ValaCodeContext* _tmp118_;
	ValaList* _tmp119_ = NULL;
	ValaList* c_source_files;
	const gchar* _tmp138_;
	const gchar* _tmp139_;
	gchar* _tmp140_ = NULL;
	gchar* _tmp141_;
	gchar* _tmp142_;
	gchar* _tmp143_;
	gchar* _tmp144_;
	gchar** _tmp145_;
	gint _tmp145__length1;
	ValaCodeContext* _tmp154_;
	gboolean _tmp155_;
	gboolean _tmp156_;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (context != NULL);
	use_pkgconfig = FALSE;
	_tmp0_ = g_strdup ("pkg-config --cflags");
	pc = _tmp0_;
	_tmp1_ = context;
	_tmp2_ = vala_code_context_get_compile_only (_tmp1_);
	_tmp3_ = _tmp2_;
	if (!_tmp3_) {
		const gchar* _tmp4_;
		gchar* _tmp5_;
		_tmp4_ = pc;
		_tmp5_ = g_strconcat (_tmp4_, " --libs", NULL);
		_g_free0 (pc);
		pc = _tmp5_;
	}
	_tmp6_ = context;
	_tmp7_ = vala_code_context_get_profile (_tmp6_);
	_tmp8_ = _tmp7_;
	if (_tmp8_ == VALA_PROFILE_GOBJECT) {
		const gchar* _tmp9_;
		gchar* _tmp10_;
		ValaCodeContext* _tmp11_;
		gboolean _tmp12_;
		gboolean _tmp13_;
		use_pkgconfig = TRUE;
		_tmp9_ = pc;
		_tmp10_ = g_strconcat (_tmp9_, " gobject-2.0", NULL);
		_g_free0 (pc);
		pc = _tmp10_;
		_tmp11_ = context;
		_tmp12_ = vala_code_context_get_thread (_tmp11_);
		_tmp13_ = _tmp12_;
		if (_tmp13_) {
			const gchar* _tmp14_;
			gchar* _tmp15_;
			_tmp14_ = pc;
			_tmp15_ = g_strconcat (_tmp14_, " gthread-2.0", NULL);
			_g_free0 (pc);
			pc = _tmp15_;
		}
	}
	{
		ValaCodeContext* _tmp16_;
		ValaList* _tmp17_ = NULL;
		ValaList* _pkg_list;
		ValaList* _tmp18_;
		gint _tmp19_;
		gint _tmp20_;
		gint _pkg_size;
		gint _pkg_index;
		_tmp16_ = context;
		_tmp17_ = vala_code_context_get_packages (_tmp16_);
		_pkg_list = _tmp17_;
		_tmp18_ = _pkg_list;
		_tmp19_ = vala_collection_get_size ((ValaCollection*) _tmp18_);
		_tmp20_ = _tmp19_;
		_pkg_size = _tmp20_;
		_pkg_index = -1;
		while (TRUE) {
			gint _tmp21_;
			gint _tmp22_;
			gint _tmp23_;
			ValaList* _tmp24_;
			gint _tmp25_;
			gpointer _tmp26_ = NULL;
			gchar* pkg;
			const gchar* _tmp27_;
			gboolean _tmp28_ = FALSE;
			_tmp21_ = _pkg_index;
			_pkg_index = _tmp21_ + 1;
			_tmp22_ = _pkg_index;
			_tmp23_ = _pkg_size;
			if (!(_tmp22_ < _tmp23_)) {
				break;
			}
			_tmp24_ = _pkg_list;
			_tmp25_ = _pkg_index;
			_tmp26_ = vala_list_get (_tmp24_, _tmp25_);
			pkg = (gchar*) _tmp26_;
			_tmp27_ = pkg;
			_tmp28_ = vala_ccode_compiler_package_exists (_tmp27_);
			if (_tmp28_) {
				const gchar* _tmp29_;
				const gchar* _tmp30_;
				gchar* _tmp31_;
				gchar* _tmp32_;
				gchar* _tmp33_;
				use_pkgconfig = TRUE;
				_tmp29_ = pc;
				_tmp30_ = pkg;
				_tmp31_ = g_strconcat (" ", _tmp30_, NULL);
				_tmp32_ = _tmp31_;
				_tmp33_ = g_strconcat (_tmp29_, _tmp32_, NULL);
				_g_free0 (pc);
				pc = _tmp33_;
				_g_free0 (_tmp32_);
			}
			_g_free0 (pkg);
		}
		_vala_iterable_unref0 (_pkg_list);
	}
	_tmp34_ = g_strdup ("");
	pkgflags = _tmp34_;
	_tmp35_ = use_pkgconfig;
	if (_tmp35_) {
		{
			gint exit_status = 0;
			const gchar* _tmp36_;
			gchar* _tmp37_ = NULL;
			gint _tmp38_ = 0;
			gint _tmp39_;
			_tmp36_ = pc;
			g_spawn_command_line_sync (_tmp36_, &_tmp37_, NULL, &_tmp38_, &_inner_error_);
			_g_free0 (pkgflags);
			pkgflags = _tmp37_;
			exit_status = _tmp38_;
			if (_inner_error_ != NULL) {
				if (_inner_error_->domain == G_SPAWN_ERROR) {
					goto __catch2_g_spawn_error;
				}
				_g_free0 (pkgflags);
				_g_free0 (pc);
				g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
				g_clear_error (&_inner_error_);
				return;
			}
			_tmp39_ = exit_status;
			if (_tmp39_ != 0) {
				gint _tmp40_;
				gchar* _tmp41_ = NULL;
				gchar* _tmp42_;
				_tmp40_ = exit_status;
				_tmp41_ = g_strdup_printf ("pkg-config exited with status %d", _tmp40_);
				_tmp42_ = _tmp41_;
				vala_report_error (NULL, _tmp42_);
				_g_free0 (_tmp42_);
				_g_free0 (pkgflags);
				_g_free0 (pc);
				return;
			}
		}
		goto __finally2;
		__catch2_g_spawn_error:
		{
			GError* e = NULL;
			GError* _tmp43_;
			const gchar* _tmp44_;
			e = _inner_error_;
			_inner_error_ = NULL;
			_tmp43_ = e;
			_tmp44_ = _tmp43_->message;
			vala_report_error (NULL, _tmp44_);
			_g_error_free0 (e);
			_g_free0 (pkgflags);
			_g_free0 (pc);
			return;
		}
		__finally2:
		if (_inner_error_ != NULL) {
			_g_free0 (pkgflags);
			_g_free0 (pc);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
	}
	_tmp45_ = cc_command;
	if (_tmp45_ == NULL) {
		cc_command = "cc";
	}
	_tmp46_ = cc_command;
	_tmp47_ = g_strdup (_tmp46_);
	cmdline = _tmp47_;
	_tmp48_ = context;
	_tmp49_ = vala_code_context_get_debug (_tmp48_);
	_tmp50_ = _tmp49_;
	if (_tmp50_) {
		const gchar* _tmp51_;
		gchar* _tmp52_;
		_tmp51_ = cmdline;
		_tmp52_ = g_strconcat (_tmp51_, " -g", NULL);
		_g_free0 (cmdline);
		cmdline = _tmp52_;
	}
	_tmp53_ = context;
	_tmp54_ = vala_code_context_get_compile_only (_tmp53_);
	_tmp55_ = _tmp54_;
	if (_tmp55_) {
		const gchar* _tmp56_;
		gchar* _tmp57_;
		_tmp56_ = cmdline;
		_tmp57_ = g_strconcat (_tmp56_, " -c", NULL);
		_g_free0 (cmdline);
		cmdline = _tmp57_;
	} else {
		ValaCodeContext* _tmp58_;
		const gchar* _tmp59_;
		const gchar* _tmp60_;
		_tmp58_ = context;
		_tmp59_ = vala_code_context_get_output (_tmp58_);
		_tmp60_ = _tmp59_;
		if (_tmp60_ != NULL) {
			ValaCodeContext* _tmp61_;
			const gchar* _tmp62_;
			const gchar* _tmp63_;
			gchar* _tmp64_;
			gchar* output;
			gboolean _tmp65_ = FALSE;
			gboolean _tmp66_ = FALSE;
			ValaCodeContext* _tmp67_;
			const gchar* _tmp68_;
			const gchar* _tmp69_;
			gboolean _tmp73_;
			gboolean _tmp78_;
			const gchar* _tmp86_;
			const gchar* _tmp87_;
			gchar* _tmp88_ = NULL;
			gchar* _tmp89_;
			gchar* _tmp90_;
			gchar* _tmp91_;
			gchar* _tmp92_;
			_tmp61_ = context;
			_tmp62_ = vala_code_context_get_output (_tmp61_);
			_tmp63_ = _tmp62_;
			_tmp64_ = g_strdup (_tmp63_);
			output = _tmp64_;
			_tmp67_ = context;
			_tmp68_ = vala_code_context_get_directory (_tmp67_);
			_tmp69_ = _tmp68_;
			if (_tmp69_ != NULL) {
				ValaCodeContext* _tmp70_;
				const gchar* _tmp71_;
				const gchar* _tmp72_;
				_tmp70_ = context;
				_tmp71_ = vala_code_context_get_directory (_tmp70_);
				_tmp72_ = _tmp71_;
				_tmp66_ = g_strcmp0 (_tmp72_, "") != 0;
			} else {
				_tmp66_ = FALSE;
			}
			_tmp73_ = _tmp66_;
			if (_tmp73_) {
				ValaCodeContext* _tmp74_;
				const gchar* _tmp75_;
				const gchar* _tmp76_;
				gboolean _tmp77_ = FALSE;
				_tmp74_ = context;
				_tmp75_ = vala_code_context_get_output (_tmp74_);
				_tmp76_ = _tmp75_;
				_tmp77_ = g_path_is_absolute (_tmp76_);
				_tmp65_ = !_tmp77_;
			} else {
				_tmp65_ = FALSE;
			}
			_tmp78_ = _tmp65_;
			if (_tmp78_) {
				ValaCodeContext* _tmp79_;
				const gchar* _tmp80_;
				const gchar* _tmp81_;
				ValaCodeContext* _tmp82_;
				const gchar* _tmp83_;
				const gchar* _tmp84_;
				gchar* _tmp85_ = NULL;
				_tmp79_ = context;
				_tmp80_ = vala_code_context_get_directory (_tmp79_);
				_tmp81_ = _tmp80_;
				_tmp82_ = context;
				_tmp83_ = vala_code_context_get_output (_tmp82_);
				_tmp84_ = _tmp83_;
				_tmp85_ = g_strdup_printf ("%s%c%s", _tmp81_, (gint) G_DIR_SEPARATOR, _tmp84_);
				_g_free0 (output);
				output = _tmp85_;
			}
			_tmp86_ = cmdline;
			_tmp87_ = output;
			_tmp88_ = g_shell_quote (_tmp87_);
			_tmp89_ = _tmp88_;
			_tmp90_ = g_strconcat (" -o ", _tmp89_, NULL);
			_tmp91_ = _tmp90_;
			_tmp92_ = g_strconcat (_tmp86_, _tmp91_, NULL);
			_g_free0 (cmdline);
			cmdline = _tmp92_;
			_g_free0 (_tmp91_);
			_g_free0 (_tmp89_);
			_g_free0 (output);
		}
	}
	_tmp93_ = context;
	_tmp94_ = vala_code_context_get_source_files (_tmp93_);
	source_files = _tmp94_;
	{
		ValaList* _tmp95_;
		ValaList* _tmp96_;
		ValaList* _file_list;
		ValaList* _tmp97_;
		gint _tmp98_;
		gint _tmp99_;
		gint _file_size;
		gint _file_index;
		_tmp95_ = source_files;
		_tmp96_ = _vala_iterable_ref0 (_tmp95_);
		_file_list = _tmp96_;
		_tmp97_ = _file_list;
		_tmp98_ = vala_collection_get_size ((ValaCollection*) _tmp97_);
		_tmp99_ = _tmp98_;
		_file_size = _tmp99_;
		_file_index = -1;
		while (TRUE) {
			gint _tmp100_;
			gint _tmp101_;
			gint _tmp102_;
			ValaList* _tmp103_;
			gint _tmp104_;
			gpointer _tmp105_ = NULL;
			ValaSourceFile* file;
			ValaSourceFile* _tmp106_;
			ValaSourceFileType _tmp107_;
			ValaSourceFileType _tmp108_;
			_tmp100_ = _file_index;
			_file_index = _tmp100_ + 1;
			_tmp101_ = _file_index;
			_tmp102_ = _file_size;
			if (!(_tmp101_ < _tmp102_)) {
				break;
			}
			_tmp103_ = _file_list;
			_tmp104_ = _file_index;
			_tmp105_ = vala_list_get (_tmp103_, _tmp104_);
			file = (ValaSourceFile*) _tmp105_;
			_tmp106_ = file;
			_tmp107_ = vala_source_file_get_file_type (_tmp106_);
			_tmp108_ = _tmp107_;
			if (_tmp108_ == VALA_SOURCE_FILE_TYPE_SOURCE) {
				const gchar* _tmp109_;
				ValaSourceFile* _tmp110_;
				gchar* _tmp111_ = NULL;
				gchar* _tmp112_;
				gchar* _tmp113_ = NULL;
				gchar* _tmp114_;
				gchar* _tmp115_;
				gchar* _tmp116_;
				gchar* _tmp117_;
				_tmp109_ = cmdline;
				_tmp110_ = file;
				_tmp111_ = vala_source_file_get_csource_filename (_tmp110_);
				_tmp112_ = _tmp111_;
				_tmp113_ = g_shell_quote (_tmp112_);
				_tmp114_ = _tmp113_;
				_tmp115_ = g_strconcat (" ", _tmp114_, NULL);
				_tmp116_ = _tmp115_;
				_tmp117_ = g_strconcat (_tmp109_, _tmp116_, NULL);
				_g_free0 (cmdline);
				cmdline = _tmp117_;
				_g_free0 (_tmp116_);
				_g_free0 (_tmp114_);
				_g_free0 (_tmp112_);
			}
			_vala_source_file_unref0 (file);
		}
		_vala_iterable_unref0 (_file_list);
	}
	_tmp118_ = context;
	_tmp119_ = vala_code_context_get_c_source_files (_tmp118_);
	c_source_files = _tmp119_;
	{
		ValaList* _tmp120_;
		ValaList* _tmp121_;
		ValaList* _file_list;
		ValaList* _tmp122_;
		gint _tmp123_;
		gint _tmp124_;
		gint _file_size;
		gint _file_index;
		_tmp120_ = c_source_files;
		_tmp121_ = _vala_iterable_ref0 (_tmp120_);
		_file_list = _tmp121_;
		_tmp122_ = _file_list;
		_tmp123_ = vala_collection_get_size ((ValaCollection*) _tmp122_);
		_tmp124_ = _tmp123_;
		_file_size = _tmp124_;
		_file_index = -1;
		while (TRUE) {
			gint _tmp125_;
			gint _tmp126_;
			gint _tmp127_;
			ValaList* _tmp128_;
			gint _tmp129_;
			gpointer _tmp130_ = NULL;
			gchar* file;
			const gchar* _tmp131_;
			const gchar* _tmp132_;
			gchar* _tmp133_ = NULL;
			gchar* _tmp134_;
			gchar* _tmp135_;
			gchar* _tmp136_;
			gchar* _tmp137_;
			_tmp125_ = _file_index;
			_file_index = _tmp125_ + 1;
			_tmp126_ = _file_index;
			_tmp127_ = _file_size;
			if (!(_tmp126_ < _tmp127_)) {
				break;
			}
			_tmp128_ = _file_list;
			_tmp129_ = _file_index;
			_tmp130_ = vala_list_get (_tmp128_, _tmp129_);
			file = (gchar*) _tmp130_;
			_tmp131_ = cmdline;
			_tmp132_ = file;
			_tmp133_ = g_shell_quote (_tmp132_);
			_tmp134_ = _tmp133_;
			_tmp135_ = g_strconcat (" ", _tmp134_, NULL);
			_tmp136_ = _tmp135_;
			_tmp137_ = g_strconcat (_tmp131_, _tmp136_, NULL);
			_g_free0 (cmdline);
			cmdline = _tmp137_;
			_g_free0 (_tmp136_);
			_g_free0 (_tmp134_);
			_g_free0 (file);
		}
		_vala_iterable_unref0 (_file_list);
	}
	_tmp138_ = cmdline;
	_tmp139_ = pkgflags;
	_tmp140_ = string_strip (_tmp139_);
	_tmp141_ = _tmp140_;
	_tmp142_ = g_strconcat (" ", _tmp141_, NULL);
	_tmp143_ = _tmp142_;
	_tmp144_ = g_strconcat (_tmp138_, _tmp143_, NULL);
	_g_free0 (cmdline);
	cmdline = _tmp144_;
	_g_free0 (_tmp143_);
	_g_free0 (_tmp141_);
	_tmp145_ = cc_options;
	_tmp145__length1 = cc_options_length1;
	{
		gchar** cc_option_collection = NULL;
		gint cc_option_collection_length1 = 0;
		gint _cc_option_collection_size_ = 0;
		gint cc_option_it = 0;
		cc_option_collection = _tmp145_;
		cc_option_collection_length1 = _tmp145__length1;
		for (cc_option_it = 0; cc_option_it < _tmp145__length1; cc_option_it = cc_option_it + 1) {
			gchar* _tmp146_;
			gchar* cc_option = NULL;
			_tmp146_ = g_strdup (cc_option_collection[cc_option_it]);
			cc_option = _tmp146_;
			{
				const gchar* _tmp147_;
				const gchar* _tmp148_;
				gchar* _tmp149_ = NULL;
				gchar* _tmp150_;
				gchar* _tmp151_;
				gchar* _tmp152_;
				gchar* _tmp153_;
				_tmp147_ = cmdline;
				_tmp148_ = cc_option;
				_tmp149_ = g_shell_quote (_tmp148_);
				_tmp150_ = _tmp149_;
				_tmp151_ = g_strconcat (" ", _tmp150_, NULL);
				_tmp152_ = _tmp151_;
				_tmp153_ = g_strconcat (_tmp147_, _tmp152_, NULL);
				_g_free0 (cmdline);
				cmdline = _tmp153_;
				_g_free0 (_tmp152_);
				_g_free0 (_tmp150_);
				_g_free0 (cc_option);
			}
		}
	}
	_tmp154_ = context;
	_tmp155_ = vala_code_context_get_verbose_mode (_tmp154_);
	_tmp156_ = _tmp155_;
	if (_tmp156_) {
		FILE* _tmp157_;
		const gchar* _tmp158_;
		_tmp157_ = stdout;
		_tmp158_ = cmdline;
		fprintf (_tmp157_, "%s\n", _tmp158_);
	}
	{
		gint exit_status = 0;
		const gchar* _tmp159_;
		gint _tmp160_ = 0;
		gint _tmp161_;
		_tmp159_ = cmdline;
		g_spawn_command_line_sync (_tmp159_, NULL, NULL, &_tmp160_, &_inner_error_);
		exit_status = _tmp160_;
		if (_inner_error_ != NULL) {
			if (_inner_error_->domain == G_SPAWN_ERROR) {
				goto __catch3_g_spawn_error;
			}
			_vala_iterable_unref0 (c_source_files);
			_vala_iterable_unref0 (source_files);
			_g_free0 (cmdline);
			_g_free0 (pkgflags);
			_g_free0 (pc);
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
		_tmp161_ = exit_status;
		if (_tmp161_ != 0) {
			gint _tmp162_;
			gchar* _tmp163_ = NULL;
			gchar* _tmp164_;
			_tmp162_ = exit_status;
			_tmp163_ = g_strdup_printf ("cc exited with status %d", _tmp162_);
			_tmp164_ = _tmp163_;
			vala_report_error (NULL, _tmp164_);
			_g_free0 (_tmp164_);
		}
	}
	goto __finally3;
	__catch3_g_spawn_error:
	{
		GError* e = NULL;
		GError* _tmp165_;
		const gchar* _tmp166_;
		e = _inner_error_;
		_inner_error_ = NULL;
		_tmp165_ = e;
		_tmp166_ = _tmp165_->message;
		vala_report_error (NULL, _tmp166_);
		_g_error_free0 (e);
	}
	__finally3:
	if (_inner_error_ != NULL) {
		_vala_iterable_unref0 (c_source_files);
		_vala_iterable_unref0 (source_files);
		_g_free0 (cmdline);
		_g_free0 (pkgflags);
		_g_free0 (pc);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
	{
		ValaList* _tmp167_;
		ValaList* _tmp168_;
		ValaList* _file_list;
		ValaList* _tmp169_;
		gint _tmp170_;
		gint _tmp171_;
		gint _file_size;
		gint _file_index;
		_tmp167_ = source_files;
		_tmp168_ = _vala_iterable_ref0 (_tmp167_);
		_file_list = _tmp168_;
		_tmp169_ = _file_list;
		_tmp170_ = vala_collection_get_size ((ValaCollection*) _tmp169_);
		_tmp171_ = _tmp170_;
		_file_size = _tmp171_;
		_file_index = -1;
		while (TRUE) {
			gint _tmp172_;
			gint _tmp173_;
			gint _tmp174_;
			ValaList* _tmp175_;
			gint _tmp176_;
			gpointer _tmp177_ = NULL;
			ValaSourceFile* file;
			ValaSourceFile* _tmp178_;
			ValaSourceFileType _tmp179_;
			ValaSourceFileType _tmp180_;
			_tmp172_ = _file_index;
			_file_index = _tmp172_ + 1;
			_tmp173_ = _file_index;
			_tmp174_ = _file_size;
			if (!(_tmp173_ < _tmp174_)) {
				break;
			}
			_tmp175_ = _file_list;
			_tmp176_ = _file_index;
			_tmp177_ = vala_list_get (_tmp175_, _tmp176_);
			file = (ValaSourceFile*) _tmp177_;
			_tmp178_ = file;
			_tmp179_ = vala_source_file_get_file_type (_tmp178_);
			_tmp180_ = _tmp179_;
			if (_tmp180_ == VALA_SOURCE_FILE_TYPE_SOURCE) {
				ValaCodeContext* _tmp181_;
				gboolean _tmp182_;
				gboolean _tmp183_;
				_tmp181_ = context;
				_tmp182_ = vala_code_context_get_save_csources (_tmp181_);
				_tmp183_ = _tmp182_;
				if (!_tmp183_) {
					ValaSourceFile* _tmp184_;
					gchar* _tmp185_ = NULL;
					gchar* _tmp186_;
					_tmp184_ = file;
					_tmp185_ = vala_source_file_get_csource_filename (_tmp184_);
					_tmp186_ = _tmp185_;
					g_unlink (_tmp186_);
					_g_free0 (_tmp186_);
				}
			}
			_vala_source_file_unref0 (file);
		}
		_vala_iterable_unref0 (_file_list);
	}
	_vala_iterable_unref0 (c_source_files);
	_vala_iterable_unref0 (source_files);
	_g_free0 (cmdline);
	_g_free0 (pkgflags);
	_g_free0 (pc);
}
static ValaCCodeFragment* vala_class_register_function_real_get_type_interface_init_declaration (ValaTypeRegisterFunction* base) {
	ValaClassRegisterFunction * self;
	ValaCCodeFragment* result = NULL;
	ValaCCodeFragment* _tmp0_;
	ValaCCodeFragment* frag;
	self = (ValaClassRegisterFunction*) base;
	_tmp0_ = vala_ccode_fragment_new ();
	frag = _tmp0_;
	{
		ValaClass* _tmp1_;
		ValaList* _tmp2_ = NULL;
		ValaList* _base_type_list;
		ValaList* _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
		gint _base_type_size;
		gint _base_type_index;
		_tmp1_ = self->priv->_class_reference;
		_tmp2_ = vala_class_get_base_types (_tmp1_);
		_base_type_list = _tmp2_;
		_tmp3_ = _base_type_list;
		_tmp4_ = vala_collection_get_size ((ValaCollection*) _tmp3_);
		_tmp5_ = _tmp4_;
		_base_type_size = _tmp5_;
		_base_type_index = -1;
		while (TRUE) {
			gint _tmp6_;
			gint _tmp7_;
			gint _tmp8_;
			ValaList* _tmp9_;
			gint _tmp10_;
			gpointer _tmp11_ = NULL;
			ValaDataType* base_type;
			ValaDataType* _tmp12_;
			ValaTypeSymbol* _tmp13_;
			ValaTypeSymbol* _tmp14_;
			ValaDataType* _tmp15_;
			ValaTypeSymbol* _tmp16_;
			ValaTypeSymbol* _tmp17_;
			ValaInterface* _tmp18_;
			ValaInterface* iface;
			ValaInterface* _tmp19_;
			gchar* _tmp20_ = NULL;
			gchar* _tmp21_;
			gchar* _tmp22_ = NULL;
			gchar* _tmp23_;
			gchar* iface_info_name;
			ValaCCodeDeclaration* _tmp24_;
			ValaCCodeDeclaration* ctypedecl;
			ValaCCodeDeclaration* _tmp25_;
			ValaCCodeDeclaration* _tmp26_;
			const gchar* _tmp27_;
			ValaClass* _tmp28_;
			gchar* _tmp29_ = NULL;
			gchar* _tmp30_;
			ValaInterface* _tmp31_;
			gchar* _tmp32_ = NULL;
			gchar* _tmp33_;
			gchar* _tmp34_ = NULL;
			gchar* _tmp35_;
			ValaCCodeConstant* _tmp36_;
			ValaCCodeConstant* _tmp37_;
			ValaCCodeVariableDeclarator* _tmp38_;
			ValaCCodeVariableDeclarator* _tmp39_;
			ValaCCodeFragment* _tmp40_;
			ValaCCodeDeclaration* _tmp41_;
			_tmp6_ = _base_type_index;
			_base_type_index = _tmp6_ + 1;
			_tmp7_ = _base_type_index;
			_tmp8_ = _base_type_size;
			if (!(_tmp7_ < _tmp8_)) {
				break;
			}
			_tmp9_ = _base_type_list;
			_tmp10_ = _base_type_index;
			_tmp11_ = vala_list_get (_tmp9_, _tmp10_);
			base_type = (ValaDataType*) _tmp11_;
			_tmp12_ = base_type;
			_tmp13_ = vala_data_type_get_data_type (_tmp12_);
			_tmp14_ = _tmp13_;
			if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp14_, VALA_TYPE_INTERFACE)) {
				_vala_code_node_unref0 (base_type);
				continue;
			}
			_tmp15_ = base_type;
			_tmp16_ = vala_data_type_get_data_type (_tmp15_);
			_tmp17_ = _tmp16_;
			_tmp18_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, VALA_TYPE_INTERFACE, ValaInterface));
			iface = _tmp18_;
			_tmp19_ = iface;
			_tmp20_ = vala_ccode_base_module_get_ccode_lower_case_name ((ValaCodeNode*) _tmp19_, NULL);
			_tmp21_ = _tmp20_;
			_tmp22_ = g_strdup_printf ("%s_info", _tmp21_);
			_tmp23_ = _tmp22_;
			_g_free0 (_tmp21_);
			iface_info_name = _tmp23_;
			_tmp24_ = vala_ccode_declaration_new ("const GInterfaceInfo");
			ctypedecl = _tmp24_;
			_tmp25_ = ctypedecl;
			vala_ccode_declaration_set_modifiers (_tmp25_, VALA_CCODE_MODIFIERS_STATIC);
			_tmp26_ = ctypedecl;
			_tmp27_ = iface_info_name;
			_tmp28_ = self->priv->_class_reference;
			_tmp29_ = vala_ccode_base_module_get_ccode_lower_case_name ((ValaCodeNode*) _tmp28_, NULL);
			_tmp30_ = _tmp29_;
			_tmp31_ = iface;
			_tmp32_ = vala_ccode_base_module_get_ccode_lower_case_name ((ValaCodeNode*) _tmp31_, NULL);
			_tmp33_ = _tmp32_;
			_tmp34_ = g_strdup_printf ("{ (GInterfaceInitFunc) %s_%s_interface_init, (GInterfaceFinalizeFunc) " \
"NULL, NULL}", _tmp30_, _tmp33_);
			_tmp35_ = _tmp34_;
			_tmp36_ = vala_ccode_constant_new (_tmp35_);
			_tmp37_ = _tmp36_;
			_tmp38_ = vala_ccode_variable_declarator_new (_tmp27_, (ValaCCodeExpression*) _tmp37_, NULL);
			_tmp39_ = _tmp38_;
			vala_ccode_declaration_add_declarator (_tmp26_, (ValaCCodeDeclarator*) _tmp39_);
			_vala_ccode_node_unref0 (_tmp39_);
			_vala_ccode_node_unref0 (_tmp37_);
			_g_free0 (_tmp35_);
			_g_free0 (_tmp33_);
			_g_free0 (_tmp30_);
			_tmp40_ = frag;
			_tmp41_ = ctypedecl;
			vala_ccode_fragment_append (_tmp40_, (ValaCCodeNode*) _tmp41_);
			_vala_ccode_node_unref0 (ctypedecl);
			_g_free0 (iface_info_name);
			_vala_code_node_unref0 (iface);
			_vala_code_node_unref0 (base_type);
		}
		_vala_iterable_unref0 (_base_type_list);
	}
	result = frag;
	return result;
}
예제 #10
0
static gboolean vala_tuple_real_check (ValaCodeNode* base, ValaCodeContext* context) {
	ValaTuple * self;
	gboolean result = FALSE;
	gboolean _tmp0_;
	gboolean _tmp1_;
	ValaCodeContext* _tmp4_;
	ValaProfile _tmp5_;
	ValaProfile _tmp6_;
	ValaCodeContext* _tmp9_;
	ValaNamespace* _tmp10_;
	ValaNamespace* _tmp11_;
	ValaScope* _tmp12_;
	ValaScope* _tmp13_;
	ValaSymbol* _tmp14_ = NULL;
	ValaSymbol* _tmp15_;
	ValaScope* _tmp16_;
	ValaScope* _tmp17_;
	ValaSymbol* _tmp18_ = NULL;
	ValaClass* _tmp19_;
	ValaObjectType* _tmp20_;
	ValaObjectType* _tmp21_;
	ValaDataType* _tmp22_;
	ValaDataType* _tmp23_;
	gboolean _tmp45_;
	gboolean _tmp46_;
	self = (ValaTuple*) base;
	g_return_val_if_fail (context != NULL, FALSE);
	_tmp0_ = vala_code_node_get_checked ((ValaCodeNode*) self);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		gboolean _tmp2_;
		gboolean _tmp3_;
		_tmp2_ = vala_code_node_get_error ((ValaCodeNode*) self);
		_tmp3_ = _tmp2_;
		result = !_tmp3_;
		return result;
	}
	vala_code_node_set_checked ((ValaCodeNode*) self, TRUE);
	_tmp4_ = context;
	_tmp5_ = vala_code_context_get_profile (_tmp4_);
	_tmp6_ = _tmp5_;
	if (_tmp6_ != VALA_PROFILE_DOVA) {
		ValaSourceReference* _tmp7_;
		ValaSourceReference* _tmp8_;
		_tmp7_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
		_tmp8_ = _tmp7_;
		vala_report_error (_tmp8_, "tuples are not supported");
		vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
		result = FALSE;
		return result;
	}
	_tmp9_ = context;
	_tmp10_ = vala_code_context_get_root (_tmp9_);
	_tmp11_ = _tmp10_;
	_tmp12_ = vala_symbol_get_scope ((ValaSymbol*) _tmp11_);
	_tmp13_ = _tmp12_;
	_tmp14_ = vala_scope_lookup (_tmp13_, "Dova");
	_tmp15_ = _tmp14_;
	_tmp16_ = vala_symbol_get_scope (_tmp15_);
	_tmp17_ = _tmp16_;
	_tmp18_ = vala_scope_lookup (_tmp17_, "Tuple");
	_tmp19_ = VALA_CLASS (_tmp18_);
	_tmp20_ = vala_object_type_new ((ValaObjectTypeSymbol*) _tmp19_);
	_tmp21_ = _tmp20_;
	vala_expression_set_value_type ((ValaExpression*) self, (ValaDataType*) _tmp21_);
	_vala_code_node_unref0 (_tmp21_);
	_vala_code_node_unref0 (_tmp19_);
	_vala_code_node_unref0 (_tmp15_);
	_tmp22_ = vala_expression_get_value_type ((ValaExpression*) self);
	_tmp23_ = _tmp22_;
	vala_data_type_set_value_owned (_tmp23_, TRUE);
	{
		ValaList* _tmp24_;
		ValaList* _tmp25_;
		ValaList* _expr_list;
		ValaList* _tmp26_;
		gint _tmp27_;
		gint _tmp28_;
		gint _expr_size;
		gint _expr_index;
		_tmp24_ = self->priv->expression_list;
		_tmp25_ = _vala_iterable_ref0 (_tmp24_);
		_expr_list = _tmp25_;
		_tmp26_ = _expr_list;
		_tmp27_ = vala_collection_get_size ((ValaCollection*) _tmp26_);
		_tmp28_ = _tmp27_;
		_expr_size = _tmp28_;
		_expr_index = -1;
		while (TRUE) {
			gint _tmp29_;
			gint _tmp30_;
			gint _tmp31_;
			ValaList* _tmp32_;
			gint _tmp33_;
			gpointer _tmp34_ = NULL;
			ValaExpression* expr;
			ValaExpression* _tmp35_;
			ValaCodeContext* _tmp36_;
			gboolean _tmp37_ = FALSE;
			ValaDataType* _tmp38_;
			ValaDataType* _tmp39_;
			ValaExpression* _tmp40_;
			ValaDataType* _tmp41_;
			ValaDataType* _tmp42_;
			ValaDataType* _tmp43_ = NULL;
			ValaDataType* _tmp44_;
			_tmp29_ = _expr_index;
			_expr_index = _tmp29_ + 1;
			_tmp30_ = _expr_index;
			_tmp31_ = _expr_size;
			if (!(_tmp30_ < _tmp31_)) {
				break;
			}
			_tmp32_ = _expr_list;
			_tmp33_ = _expr_index;
			_tmp34_ = vala_list_get (_tmp32_, _tmp33_);
			expr = (ValaExpression*) _tmp34_;
			_tmp35_ = expr;
			_tmp36_ = context;
			_tmp37_ = vala_code_node_check ((ValaCodeNode*) _tmp35_, _tmp36_);
			if (!_tmp37_) {
				result = FALSE;
				_vala_code_node_unref0 (expr);
				_vala_iterable_unref0 (_expr_list);
				return result;
			}
			_tmp38_ = vala_expression_get_value_type ((ValaExpression*) self);
			_tmp39_ = _tmp38_;
			_tmp40_ = expr;
			_tmp41_ = vala_expression_get_value_type (_tmp40_);
			_tmp42_ = _tmp41_;
			_tmp43_ = vala_data_type_copy (_tmp42_);
			_tmp44_ = _tmp43_;
			vala_data_type_add_type_argument (_tmp39_, _tmp44_);
			_vala_code_node_unref0 (_tmp44_);
			_vala_code_node_unref0 (expr);
		}
		_vala_iterable_unref0 (_expr_list);
	}
	_tmp45_ = vala_code_node_get_error ((ValaCodeNode*) self);
	_tmp46_ = _tmp45_;
	result = !_tmp46_;
	return result;
}
예제 #11
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);
}
예제 #12
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);
	}
}
예제 #13
0
static void vala_ccode_block_finalize (ValaCCodeNode* obj) {
	ValaCCodeBlock * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALA_TYPE_CCODE_BLOCK, ValaCCodeBlock);
	_vala_iterable_unref0 (self->priv->statements);
	VALA_CCODE_NODE_CLASS (vala_ccode_block_parent_class)->finalize (obj);
}
예제 #14
0
static void vala_ccode_block_real_write (ValaCCodeNode* base, ValaCCodeWriter* writer) {
	ValaCCodeBlock * self;
	ValaCCodeNode* last_statement;
	ValaCCodeWriter* _tmp0_;
	ValaCCodeWriter* _tmp45_;
	gboolean _tmp46_;
	self = (ValaCCodeBlock*) base;
	g_return_if_fail (writer != NULL);
	last_statement = NULL;
	_tmp0_ = writer;
	vala_ccode_writer_write_begin_block (_tmp0_);
	{
		ValaList* _tmp1_;
		ValaList* _tmp2_;
		ValaList* _statement_list;
		ValaList* _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
		gint _statement_size;
		gint _statement_index;
		_tmp1_ = self->priv->statements;
		_tmp2_ = _vala_iterable_ref0 (_tmp1_);
		_statement_list = _tmp2_;
		_tmp3_ = _statement_list;
		_tmp4_ = vala_collection_get_size ((ValaCollection*) _tmp3_);
		_tmp5_ = _tmp4_;
		_statement_size = _tmp5_;
		_statement_index = -1;
		while (TRUE) {
			gint _tmp6_;
			gint _tmp7_;
			gint _tmp8_;
			ValaList* _tmp9_;
			gint _tmp10_;
			gpointer _tmp11_ = NULL;
			ValaCCodeNode* statement;
			ValaCCodeNode* _tmp12_;
			ValaCCodeWriter* _tmp13_;
			gboolean _tmp14_ = FALSE;
			ValaCCodeNode* _tmp15_;
			gboolean _tmp17_;
			_tmp6_ = _statement_index;
			_statement_index = _tmp6_ + 1;
			_tmp7_ = _statement_index;
			_tmp8_ = _statement_size;
			if (!(_tmp7_ < _tmp8_)) {
				break;
			}
			_tmp9_ = _statement_list;
			_tmp10_ = _statement_index;
			_tmp11_ = vala_list_get (_tmp9_, _tmp10_);
			statement = (ValaCCodeNode*) _tmp11_;
			_tmp12_ = statement;
			_tmp13_ = writer;
			vala_ccode_node_write_declaration (_tmp12_, _tmp13_);
			_tmp15_ = statement;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp15_, VALA_TYPE_CCODE_LABEL)) {
				_tmp14_ = TRUE;
			} else {
				ValaCCodeNode* _tmp16_;
				_tmp16_ = statement;
				_tmp14_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp16_, VALA_TYPE_CCODE_CASE_STATEMENT);
			}
			_tmp17_ = _tmp14_;
			if (_tmp17_) {
				_vala_ccode_node_unref0 (last_statement);
				last_statement = NULL;
			} else {
				gboolean _tmp18_ = FALSE;
				gboolean _tmp19_ = FALSE;
				gboolean _tmp20_ = FALSE;
				ValaCCodeNode* _tmp21_;
				gboolean _tmp23_;
				gboolean _tmp25_;
				gboolean _tmp27_;
				_tmp21_ = statement;
				if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp21_, VALA_TYPE_CCODE_RETURN_STATEMENT)) {
					_tmp20_ = TRUE;
				} else {
					ValaCCodeNode* _tmp22_;
					_tmp22_ = statement;
					_tmp20_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp22_, VALA_TYPE_CCODE_GOTO_STATEMENT);
				}
				_tmp23_ = _tmp20_;
				if (_tmp23_) {
					_tmp19_ = TRUE;
				} else {
					ValaCCodeNode* _tmp24_;
					_tmp24_ = statement;
					_tmp19_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp24_, VALA_TYPE_CCODE_CONTINUE_STATEMENT);
				}
				_tmp25_ = _tmp19_;
				if (_tmp25_) {
					_tmp18_ = TRUE;
				} else {
					ValaCCodeNode* _tmp26_;
					_tmp26_ = statement;
					_tmp18_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp26_, VALA_TYPE_CCODE_BREAK_STATEMENT);
				}
				_tmp27_ = _tmp18_;
				if (_tmp27_) {
					ValaCCodeNode* _tmp28_;
					ValaCCodeNode* _tmp29_;
					_tmp28_ = statement;
					_tmp29_ = _vala_ccode_node_ref0 (_tmp28_);
					_vala_ccode_node_unref0 (last_statement);
					last_statement = _tmp29_;
				}
			}
			_vala_ccode_node_unref0 (statement);
		}
		_vala_iterable_unref0 (_statement_list);
	}
	{
		ValaList* _tmp30_;
		ValaList* _tmp31_;
		ValaList* _statement_list;
		ValaList* _tmp32_;
		gint _tmp33_;
		gint _tmp34_;
		gint _statement_size;
		gint _statement_index;
		_tmp30_ = self->priv->statements;
		_tmp31_ = _vala_iterable_ref0 (_tmp30_);
		_statement_list = _tmp31_;
		_tmp32_ = _statement_list;
		_tmp33_ = vala_collection_get_size ((ValaCollection*) _tmp32_);
		_tmp34_ = _tmp33_;
		_statement_size = _tmp34_;
		_statement_index = -1;
		while (TRUE) {
			gint _tmp35_;
			gint _tmp36_;
			gint _tmp37_;
			ValaList* _tmp38_;
			gint _tmp39_;
			gpointer _tmp40_ = NULL;
			ValaCCodeNode* statement;
			ValaCCodeNode* _tmp41_;
			ValaCCodeWriter* _tmp42_;
			ValaCCodeNode* _tmp43_;
			ValaCCodeNode* _tmp44_;
			_tmp35_ = _statement_index;
			_statement_index = _tmp35_ + 1;
			_tmp36_ = _statement_index;
			_tmp37_ = _statement_size;
			if (!(_tmp36_ < _tmp37_)) {
				break;
			}
			_tmp38_ = _statement_list;
			_tmp39_ = _statement_index;
			_tmp40_ = vala_list_get (_tmp38_, _tmp39_);
			statement = (ValaCCodeNode*) _tmp40_;
			_tmp41_ = statement;
			_tmp42_ = writer;
			vala_ccode_node_write (_tmp41_, _tmp42_);
			_tmp43_ = statement;
			_tmp44_ = last_statement;
			if (_tmp43_ == _tmp44_) {
				_vala_ccode_node_unref0 (statement);
				break;
			}
			_vala_ccode_node_unref0 (statement);
		}
		_vala_iterable_unref0 (_statement_list);
	}
	_tmp45_ = writer;
	vala_ccode_writer_write_end_block (_tmp45_);
	_tmp46_ = self->priv->_suppress_newline;
	if (!_tmp46_) {
		ValaCCodeWriter* _tmp47_;
		_tmp47_ = writer;
		vala_ccode_writer_write_newline (_tmp47_);
	}
	_vala_ccode_node_unref0 (last_statement);
}
예제 #15
0
static gboolean vala_constructor_real_check (ValaCodeNode* base, ValaCodeContext* context) {
	ValaConstructor * self;
	gboolean result = FALSE;
	gboolean _tmp0_;
	gboolean _tmp1_;
	ValaCodeContext* _tmp4_;
	ValaSemanticAnalyzer* _tmp5_;
	ValaSemanticAnalyzer* _tmp6_;
	ValaClass* _tmp7_;
	ValaClass* _tmp8_;
	ValaObjectType* _tmp9_;
	ValaObjectType* _tmp10_;
	ValaParameter* _tmp11_;
	ValaParameter* _tmp12_;
	ValaScope* _tmp13_;
	ValaScope* _tmp14_;
	ValaParameter* _tmp15_;
	const gchar* _tmp16_;
	const gchar* _tmp17_;
	ValaParameter* _tmp18_;
	ValaCodeContext* _tmp19_;
	ValaSemanticAnalyzer* _tmp20_;
	ValaSemanticAnalyzer* _tmp21_;
	ValaSymbol* _tmp22_;
	ValaSymbol* _tmp23_;
	ValaScope* _tmp24_;
	ValaScope* _tmp25_;
	ValaCodeContext* _tmp26_;
	ValaSemanticAnalyzer* _tmp27_;
	ValaSemanticAnalyzer* _tmp28_;
	ValaBlock* _tmp29_;
	ValaBlock* _tmp30_;
	ValaCodeContext* _tmp57_;
	ValaSemanticAnalyzer* _tmp58_;
	ValaSemanticAnalyzer* _tmp59_;
	ValaCodeContext* _tmp60_;
	ValaSemanticAnalyzer* _tmp61_;
	ValaSemanticAnalyzer* _tmp62_;
	ValaSymbol* _tmp63_;
	ValaSymbol* _tmp64_;
	ValaSymbol* _tmp65_;
	ValaSymbol* _tmp66_;
	gboolean _tmp67_;
	gboolean _tmp68_;
	self = (ValaConstructor*) base;
	g_return_val_if_fail (context != NULL, FALSE);
	_tmp0_ = vala_code_node_get_checked ((ValaCodeNode*) self);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		gboolean _tmp2_;
		gboolean _tmp3_;
		_tmp2_ = vala_code_node_get_error ((ValaCodeNode*) self);
		_tmp3_ = _tmp2_;
		result = !_tmp3_;
		return result;
	}
	vala_code_node_set_checked ((ValaCodeNode*) self, TRUE);
	_tmp4_ = context;
	_tmp5_ = vala_code_context_get_analyzer (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = vala_semantic_analyzer_get_current_class (_tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = vala_object_type_new ((ValaObjectTypeSymbol*) _tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = vala_parameter_new ("this", (ValaDataType*) _tmp10_, NULL);
	_tmp12_ = _tmp11_;
	vala_constructor_set_this_parameter (self, _tmp12_);
	_vala_code_node_unref0 (_tmp12_);
	_vala_code_node_unref0 (_tmp10_);
	_tmp13_ = vala_symbol_get_scope ((ValaSymbol*) self);
	_tmp14_ = _tmp13_;
	_tmp15_ = self->priv->_this_parameter;
	_tmp16_ = vala_symbol_get_name ((ValaSymbol*) _tmp15_);
	_tmp17_ = _tmp16_;
	_tmp18_ = self->priv->_this_parameter;
	vala_scope_add (_tmp14_, _tmp17_, (ValaSymbol*) _tmp18_);
	_tmp19_ = context;
	_tmp20_ = vala_code_context_get_analyzer (_tmp19_);
	_tmp21_ = _tmp20_;
	_tmp22_ = vala_semantic_analyzer_get_current_symbol (_tmp21_);
	_tmp23_ = _tmp22_;
	_tmp24_ = vala_symbol_get_scope (_tmp23_);
	_tmp25_ = _tmp24_;
	vala_symbol_set_owner ((ValaSymbol*) self, _tmp25_);
	_tmp26_ = context;
	_tmp27_ = vala_code_context_get_analyzer (_tmp26_);
	_tmp28_ = _tmp27_;
	vala_semantic_analyzer_set_current_symbol (_tmp28_, (ValaSymbol*) self);
	_tmp29_ = vala_subroutine_get_body ((ValaSubroutine*) self);
	_tmp30_ = _tmp29_;
	if (_tmp30_ != NULL) {
		ValaBlock* _tmp31_;
		ValaBlock* _tmp32_;
		ValaCodeContext* _tmp33_;
		_tmp31_ = vala_subroutine_get_body ((ValaSubroutine*) self);
		_tmp32_ = _tmp31_;
		_tmp33_ = context;
		vala_code_node_check ((ValaCodeNode*) _tmp32_, _tmp33_);
	}
	{
		ValaBlock* _tmp34_;
		ValaBlock* _tmp35_;
		ValaList* _tmp36_ = NULL;
		ValaList* _body_error_type_list;
		ValaList* _tmp37_;
		gint _tmp38_;
		gint _tmp39_;
		gint _body_error_type_size;
		gint _body_error_type_index;
		_tmp34_ = vala_subroutine_get_body ((ValaSubroutine*) self);
		_tmp35_ = _tmp34_;
		_tmp36_ = vala_code_node_get_error_types ((ValaCodeNode*) _tmp35_);
		_body_error_type_list = _tmp36_;
		_tmp37_ = _body_error_type_list;
		_tmp38_ = vala_collection_get_size ((ValaCollection*) _tmp37_);
		_tmp39_ = _tmp38_;
		_body_error_type_size = _tmp39_;
		_body_error_type_index = -1;
		while (TRUE) {
			gint _tmp40_;
			gint _tmp41_;
			gint _tmp42_;
			ValaList* _tmp43_;
			gint _tmp44_;
			gpointer _tmp45_ = NULL;
			ValaDataType* body_error_type;
			ValaDataType* _tmp46_;
			gboolean _tmp47_;
			gboolean _tmp48_;
			_tmp40_ = _body_error_type_index;
			_body_error_type_index = _tmp40_ + 1;
			_tmp41_ = _body_error_type_index;
			_tmp42_ = _body_error_type_size;
			if (!(_tmp41_ < _tmp42_)) {
				break;
			}
			_tmp43_ = _body_error_type_list;
			_tmp44_ = _body_error_type_index;
			_tmp45_ = vala_list_get (_tmp43_, _tmp44_);
			body_error_type = (ValaDataType*) _tmp45_;
			_tmp46_ = body_error_type;
			_tmp47_ = vala_error_type_get_dynamic_error (VALA_ERROR_TYPE (_tmp46_));
			_tmp48_ = _tmp47_;
			if (!_tmp48_) {
				ValaDataType* _tmp49_;
				ValaSourceReference* _tmp50_;
				ValaSourceReference* _tmp51_;
				ValaDataType* _tmp52_;
				gchar* _tmp53_ = NULL;
				gchar* _tmp54_;
				gchar* _tmp55_ = NULL;
				gchar* _tmp56_;
				_tmp49_ = body_error_type;
				_tmp50_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp49_);
				_tmp51_ = _tmp50_;
				_tmp52_ = body_error_type;
				_tmp53_ = vala_code_node_to_string ((ValaCodeNode*) _tmp52_);
				_tmp54_ = _tmp53_;
				_tmp55_ = g_strdup_printf ("unhandled error `%s'", _tmp54_);
				_tmp56_ = _tmp55_;
				vala_report_warning (_tmp51_, _tmp56_);
				_g_free0 (_tmp56_);
				_g_free0 (_tmp54_);
			}
			_vala_code_node_unref0 (body_error_type);
		}
		_vala_iterable_unref0 (_body_error_type_list);
	}
	_tmp57_ = context;
	_tmp58_ = vala_code_context_get_analyzer (_tmp57_);
	_tmp59_ = _tmp58_;
	_tmp60_ = context;
	_tmp61_ = vala_code_context_get_analyzer (_tmp60_);
	_tmp62_ = _tmp61_;
	_tmp63_ = vala_semantic_analyzer_get_current_symbol (_tmp62_);
	_tmp64_ = _tmp63_;
	_tmp65_ = vala_symbol_get_parent_symbol (_tmp64_);
	_tmp66_ = _tmp65_;
	vala_semantic_analyzer_set_current_symbol (_tmp59_, _tmp66_);
	_tmp67_ = vala_code_node_get_error ((ValaCodeNode*) self);
	_tmp68_ = _tmp67_;
	result = !_tmp68_;
	return result;
}
예제 #16
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_);
}
예제 #17
0
static void vala_tuple_finalize (ValaCodeNode* obj) {
	ValaTuple * self;
	self = VALA_TUPLE (obj);
	_vala_iterable_unref0 (self->priv->expression_list);
	VALA_CODE_NODE_CLASS (vala_tuple_parent_class)->finalize (obj);
}
static void vala_class_register_function_real_get_type_interface_init_statements (ValaTypeRegisterFunction* base, ValaCCodeBlock* block, gboolean plugin) {
	ValaClassRegisterFunction * self;
	ValaCodeContext* _tmp83_;
	ValaCodeContext* _tmp84_;
	ValaCodeGenerator* _tmp85_;
	ValaCodeGenerator* _tmp86_;
	ValaCCodeBlock* _tmp87_;
	ValaClass* _tmp88_;
	self = (ValaClassRegisterFunction*) base;
	g_return_if_fail (block != NULL);
	{
		ValaClass* _tmp0_;
		ValaList* _tmp1_ = NULL;
		ValaList* _base_type_list;
		ValaList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _base_type_size;
		gint _base_type_index;
		_tmp0_ = self->priv->_class_reference;
		_tmp1_ = vala_class_get_base_types (_tmp0_);
		_base_type_list = _tmp1_;
		_tmp2_ = _base_type_list;
		_tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_base_type_size = _tmp4_;
		_base_type_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			ValaList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_ = NULL;
			ValaDataType* base_type;
			ValaDataType* _tmp11_;
			ValaTypeSymbol* _tmp12_;
			ValaTypeSymbol* _tmp13_;
			ValaDataType* _tmp14_;
			ValaTypeSymbol* _tmp15_;
			ValaTypeSymbol* _tmp16_;
			ValaInterface* _tmp17_;
			ValaInterface* iface;
			ValaInterface* _tmp18_;
			gchar* _tmp19_ = NULL;
			gchar* _tmp20_;
			gchar* _tmp21_ = NULL;
			gchar* _tmp22_;
			gchar* iface_info_name;
			gboolean _tmp23_;
			_tmp5_ = _base_type_index;
			_base_type_index = _tmp5_ + 1;
			_tmp6_ = _base_type_index;
			_tmp7_ = _base_type_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _base_type_list;
			_tmp9_ = _base_type_index;
			_tmp10_ = vala_list_get (_tmp8_, _tmp9_);
			base_type = (ValaDataType*) _tmp10_;
			_tmp11_ = base_type;
			_tmp12_ = vala_data_type_get_data_type (_tmp11_);
			_tmp13_ = _tmp12_;
			if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp13_, VALA_TYPE_INTERFACE)) {
				_vala_code_node_unref0 (base_type);
				continue;
			}
			_tmp14_ = base_type;
			_tmp15_ = vala_data_type_get_data_type (_tmp14_);
			_tmp16_ = _tmp15_;
			_tmp17_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, VALA_TYPE_INTERFACE, ValaInterface));
			iface = _tmp17_;
			_tmp18_ = iface;
			_tmp19_ = vala_ccode_base_module_get_ccode_lower_case_name ((ValaCodeNode*) _tmp18_, NULL);
			_tmp20_ = _tmp19_;
			_tmp21_ = g_strdup_printf ("%s_info", _tmp20_);
			_tmp22_ = _tmp21_;
			_g_free0 (_tmp20_);
			iface_info_name = _tmp22_;
			_tmp23_ = plugin;
			if (!_tmp23_) {
				ValaCCodeIdentifier* _tmp24_;
				ValaCCodeIdentifier* _tmp25_;
				ValaCCodeFunctionCall* _tmp26_;
				ValaCCodeFunctionCall* _tmp27_;
				ValaCCodeFunctionCall* reg_call;
				ValaCCodeFunctionCall* _tmp28_;
				ValaClass* _tmp29_;
				gchar* _tmp30_ = NULL;
				gchar* _tmp31_;
				gchar* _tmp32_ = NULL;
				gchar* _tmp33_;
				ValaCCodeIdentifier* _tmp34_;
				ValaCCodeIdentifier* _tmp35_;
				ValaCCodeFunctionCall* _tmp36_;
				ValaInterface* _tmp37_;
				gchar* _tmp38_ = NULL;
				gchar* _tmp39_;
				ValaCCodeIdentifier* _tmp40_;
				ValaCCodeIdentifier* _tmp41_;
				ValaCCodeFunctionCall* _tmp42_;
				const gchar* _tmp43_;
				gchar* _tmp44_ = NULL;
				gchar* _tmp45_;
				ValaCCodeIdentifier* _tmp46_;
				ValaCCodeIdentifier* _tmp47_;
				ValaCCodeBlock* _tmp48_;
				ValaCCodeFunctionCall* _tmp49_;
				ValaCCodeExpressionStatement* _tmp50_;
				ValaCCodeExpressionStatement* _tmp51_;
				_tmp24_ = vala_ccode_identifier_new ("g_type_add_interface_static");
				_tmp25_ = _tmp24_;
				_tmp26_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp25_);
				_tmp27_ = _tmp26_;
				_vala_ccode_node_unref0 (_tmp25_);
				reg_call = _tmp27_;
				_tmp28_ = reg_call;
				_tmp29_ = self->priv->_class_reference;
				_tmp30_ = vala_ccode_base_module_get_ccode_lower_case_name ((ValaCodeNode*) _tmp29_, NULL);
				_tmp31_ = _tmp30_;
				_tmp32_ = g_strdup_printf ("%s_type_id", _tmp31_);
				_tmp33_ = _tmp32_;
				_tmp34_ = vala_ccode_identifier_new (_tmp33_);
				_tmp35_ = _tmp34_;
				vala_ccode_function_call_add_argument (_tmp28_, (ValaCCodeExpression*) _tmp35_);
				_vala_ccode_node_unref0 (_tmp35_);
				_g_free0 (_tmp33_);
				_g_free0 (_tmp31_);
				_tmp36_ = reg_call;
				_tmp37_ = iface;
				_tmp38_ = vala_ccode_base_module_get_ccode_type_id ((ValaCodeNode*) _tmp37_);
				_tmp39_ = _tmp38_;
				_tmp40_ = vala_ccode_identifier_new (_tmp39_);
				_tmp41_ = _tmp40_;
				vala_ccode_function_call_add_argument (_tmp36_, (ValaCCodeExpression*) _tmp41_);
				_vala_ccode_node_unref0 (_tmp41_);
				_g_free0 (_tmp39_);
				_tmp42_ = reg_call;
				_tmp43_ = iface_info_name;
				_tmp44_ = g_strdup_printf ("&%s", _tmp43_);
				_tmp45_ = _tmp44_;
				_tmp46_ = vala_ccode_identifier_new (_tmp45_);
				_tmp47_ = _tmp46_;
				vala_ccode_function_call_add_argument (_tmp42_, (ValaCCodeExpression*) _tmp47_);
				_vala_ccode_node_unref0 (_tmp47_);
				_g_free0 (_tmp45_);
				_tmp48_ = block;
				_tmp49_ = reg_call;
				_tmp50_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) _tmp49_);
				_tmp51_ = _tmp50_;
				vala_ccode_block_add_statement (_tmp48_, (ValaCCodeNode*) _tmp51_);
				_vala_ccode_node_unref0 (_tmp51_);
				_vala_ccode_node_unref0 (reg_call);
			} else {
				ValaCCodeIdentifier* _tmp52_;
				ValaCCodeIdentifier* _tmp53_;
				ValaCCodeFunctionCall* _tmp54_;
				ValaCCodeFunctionCall* _tmp55_;
				ValaCCodeFunctionCall* reg_call;
				ValaCCodeFunctionCall* _tmp56_;
				ValaCCodeIdentifier* _tmp57_;
				ValaCCodeIdentifier* _tmp58_;
				ValaCCodeFunctionCall* _tmp59_;
				ValaClass* _tmp60_;
				gchar* _tmp61_ = NULL;
				gchar* _tmp62_;
				gchar* _tmp63_ = NULL;
				gchar* _tmp64_;
				ValaCCodeIdentifier* _tmp65_;
				ValaCCodeIdentifier* _tmp66_;
				ValaCCodeFunctionCall* _tmp67_;
				ValaInterface* _tmp68_;
				gchar* _tmp69_ = NULL;
				gchar* _tmp70_;
				ValaCCodeIdentifier* _tmp71_;
				ValaCCodeIdentifier* _tmp72_;
				ValaCCodeFunctionCall* _tmp73_;
				const gchar* _tmp74_;
				gchar* _tmp75_ = NULL;
				gchar* _tmp76_;
				ValaCCodeIdentifier* _tmp77_;
				ValaCCodeIdentifier* _tmp78_;
				ValaCCodeBlock* _tmp79_;
				ValaCCodeFunctionCall* _tmp80_;
				ValaCCodeExpressionStatement* _tmp81_;
				ValaCCodeExpressionStatement* _tmp82_;
				_tmp52_ = vala_ccode_identifier_new ("g_type_module_add_interface");
				_tmp53_ = _tmp52_;
				_tmp54_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp53_);
				_tmp55_ = _tmp54_;
				_vala_ccode_node_unref0 (_tmp53_);
				reg_call = _tmp55_;
				_tmp56_ = reg_call;
				_tmp57_ = vala_ccode_identifier_new ("module");
				_tmp58_ = _tmp57_;
				vala_ccode_function_call_add_argument (_tmp56_, (ValaCCodeExpression*) _tmp58_);
				_vala_ccode_node_unref0 (_tmp58_);
				_tmp59_ = reg_call;
				_tmp60_ = self->priv->_class_reference;
				_tmp61_ = vala_ccode_base_module_get_ccode_lower_case_name ((ValaCodeNode*) _tmp60_, NULL);
				_tmp62_ = _tmp61_;
				_tmp63_ = g_strdup_printf ("%s_type_id", _tmp62_);
				_tmp64_ = _tmp63_;
				_tmp65_ = vala_ccode_identifier_new (_tmp64_);
				_tmp66_ = _tmp65_;
				vala_ccode_function_call_add_argument (_tmp59_, (ValaCCodeExpression*) _tmp66_);
				_vala_ccode_node_unref0 (_tmp66_);
				_g_free0 (_tmp64_);
				_g_free0 (_tmp62_);
				_tmp67_ = reg_call;
				_tmp68_ = iface;
				_tmp69_ = vala_ccode_base_module_get_ccode_type_id ((ValaCodeNode*) _tmp68_);
				_tmp70_ = _tmp69_;
				_tmp71_ = vala_ccode_identifier_new (_tmp70_);
				_tmp72_ = _tmp71_;
				vala_ccode_function_call_add_argument (_tmp67_, (ValaCCodeExpression*) _tmp72_);
				_vala_ccode_node_unref0 (_tmp72_);
				_g_free0 (_tmp70_);
				_tmp73_ = reg_call;
				_tmp74_ = iface_info_name;
				_tmp75_ = g_strdup_printf ("&%s", _tmp74_);
				_tmp76_ = _tmp75_;
				_tmp77_ = vala_ccode_identifier_new (_tmp76_);
				_tmp78_ = _tmp77_;
				vala_ccode_function_call_add_argument (_tmp73_, (ValaCCodeExpression*) _tmp78_);
				_vala_ccode_node_unref0 (_tmp78_);
				_g_free0 (_tmp76_);
				_tmp79_ = block;
				_tmp80_ = reg_call;
				_tmp81_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) _tmp80_);
				_tmp82_ = _tmp81_;
				vala_ccode_block_add_statement (_tmp79_, (ValaCCodeNode*) _tmp82_);
				_vala_ccode_node_unref0 (_tmp82_);
				_vala_ccode_node_unref0 (reg_call);
			}
			_g_free0 (iface_info_name);
			_vala_code_node_unref0 (iface);
			_vala_code_node_unref0 (base_type);
		}
		_vala_iterable_unref0 (_base_type_list);
	}
	_tmp83_ = vala_typeregister_function_get_context ((ValaTypeRegisterFunction*) self);
	_tmp84_ = _tmp83_;
	_tmp85_ = vala_code_context_get_codegen (_tmp84_);
	_tmp86_ = _tmp85_;
	_tmp87_ = block;
	_tmp88_ = self->priv->_class_reference;
	vala_ccode_base_module_register_dbus_info (G_TYPE_CHECK_INSTANCE_CAST (_tmp86_, VALA_TYPE_CCODE_BASE_MODULE, ValaCCodeBaseModule), _tmp87_, (ValaObjectTypeSymbol*) _tmp88_);
}
예제 #19
0
gchar* vala_method_type_to_prototype_string (ValaMethodType* self, gboolean with_type_parameters) {
	gchar* result = NULL;
	ValaDataType* _tmp0_ = NULL;
	ValaDataType* _tmp1_;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_;
	gchar* _tmp4_ = NULL;
	gchar* _tmp5_;
	gchar* _tmp6_ = NULL;
	gchar* _tmp7_;
	gchar* proto;
	gint i;
	const gchar* _tmp73_;
	gchar* _tmp74_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = vala_data_type_get_return_type ((ValaDataType*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = vala_code_node_to_string ((ValaCodeNode*) _tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = vala_code_node_to_string ((ValaCodeNode*) self);
	_tmp5_ = _tmp4_;
	_tmp6_ = g_strdup_printf ("%s %s (", _tmp3_, _tmp5_);
	_tmp7_ = _tmp6_;
	_g_free0 (_tmp5_);
	_g_free0 (_tmp3_);
	_vala_code_node_unref0 (_tmp1_);
	proto = _tmp7_;
	i = 1;
	{
		ValaList* _tmp8_ = NULL;
		ValaList* _param_list;
		ValaList* _tmp9_;
		gint _tmp10_;
		gint _tmp11_;
		gint _param_size;
		gint _param_index;
		_tmp8_ = vala_data_type_get_parameters ((ValaDataType*) self);
		_param_list = _tmp8_;
		_tmp9_ = _param_list;
		_tmp10_ = vala_collection_get_size ((ValaCollection*) _tmp9_);
		_tmp11_ = _tmp10_;
		_param_size = _tmp11_;
		_param_index = -1;
		while (TRUE) {
			gint _tmp12_;
			gint _tmp13_;
			gint _tmp14_;
			ValaList* _tmp15_;
			gint _tmp16_;
			gpointer _tmp17_ = NULL;
			ValaParameter* param;
			gint _tmp18_;
			ValaParameter* _tmp21_;
			gboolean _tmp22_;
			gboolean _tmp23_;
			ValaParameter* _tmp26_;
			ValaParameterDirection _tmp27_;
			ValaParameterDirection _tmp28_;
			const gchar* _tmp52_;
			ValaParameter* _tmp53_;
			ValaDataType* _tmp54_;
			ValaDataType* _tmp55_;
			gchar* _tmp56_ = NULL;
			gchar* _tmp57_;
			ValaParameter* _tmp58_;
			const gchar* _tmp59_;
			const gchar* _tmp60_;
			gchar* _tmp61_ = NULL;
			ValaParameter* _tmp62_;
			ValaExpression* _tmp63_;
			ValaExpression* _tmp64_;
			gint _tmp72_;
			_tmp12_ = _param_index;
			_param_index = _tmp12_ + 1;
			_tmp13_ = _param_index;
			_tmp14_ = _param_size;
			if (!(_tmp13_ < _tmp14_)) {
				break;
			}
			_tmp15_ = _param_list;
			_tmp16_ = _param_index;
			_tmp17_ = vala_list_get (_tmp15_, _tmp16_);
			param = (ValaParameter*) _tmp17_;
			_tmp18_ = i;
			if (_tmp18_ > 1) {
				const gchar* _tmp19_;
				gchar* _tmp20_;
				_tmp19_ = proto;
				_tmp20_ = g_strconcat (_tmp19_, ", ", NULL);
				_g_free0 (proto);
				proto = _tmp20_;
			}
			_tmp21_ = param;
			_tmp22_ = vala_parameter_get_ellipsis (_tmp21_);
			_tmp23_ = _tmp22_;
			if (_tmp23_) {
				const gchar* _tmp24_;
				gchar* _tmp25_;
				_tmp24_ = proto;
				_tmp25_ = g_strconcat (_tmp24_, "...", NULL);
				_g_free0 (proto);
				proto = _tmp25_;
				_vala_code_node_unref0 (param);
				continue;
			}
			_tmp26_ = param;
			_tmp27_ = vala_parameter_get_direction (_tmp26_);
			_tmp28_ = _tmp27_;
			if (_tmp28_ == VALA_PARAMETER_DIRECTION_IN) {
				ValaParameter* _tmp29_;
				ValaDataType* _tmp30_;
				ValaDataType* _tmp31_;
				gboolean _tmp32_;
				gboolean _tmp33_;
				_tmp29_ = param;
				_tmp30_ = vala_variable_get_variable_type ((ValaVariable*) _tmp29_);
				_tmp31_ = _tmp30_;
				_tmp32_ = vala_data_type_get_value_owned (_tmp31_);
				_tmp33_ = _tmp32_;
				if (_tmp33_) {
					const gchar* _tmp34_;
					gchar* _tmp35_;
					_tmp34_ = proto;
					_tmp35_ = g_strconcat (_tmp34_, "owned ", NULL);
					_g_free0 (proto);
					proto = _tmp35_;
				}
			} else {
				ValaParameter* _tmp36_;
				ValaParameterDirection _tmp37_;
				ValaParameterDirection _tmp38_;
				ValaParameter* _tmp46_;
				ValaDataType* _tmp47_;
				ValaDataType* _tmp48_;
				gboolean _tmp49_ = FALSE;
				_tmp36_ = param;
				_tmp37_ = vala_parameter_get_direction (_tmp36_);
				_tmp38_ = _tmp37_;
				if (_tmp38_ == VALA_PARAMETER_DIRECTION_REF) {
					const gchar* _tmp39_;
					gchar* _tmp40_;
					_tmp39_ = proto;
					_tmp40_ = g_strconcat (_tmp39_, "ref ", NULL);
					_g_free0 (proto);
					proto = _tmp40_;
				} else {
					ValaParameter* _tmp41_;
					ValaParameterDirection _tmp42_;
					ValaParameterDirection _tmp43_;
					_tmp41_ = param;
					_tmp42_ = vala_parameter_get_direction (_tmp41_);
					_tmp43_ = _tmp42_;
					if (_tmp43_ == VALA_PARAMETER_DIRECTION_OUT) {
						const gchar* _tmp44_;
						gchar* _tmp45_;
						_tmp44_ = proto;
						_tmp45_ = g_strconcat (_tmp44_, "out ", NULL);
						_g_free0 (proto);
						proto = _tmp45_;
					}
				}
				_tmp46_ = param;
				_tmp47_ = vala_variable_get_variable_type ((ValaVariable*) _tmp46_);
				_tmp48_ = _tmp47_;
				_tmp49_ = vala_data_type_is_weak (_tmp48_);
				if (_tmp49_) {
					const gchar* _tmp50_;
					gchar* _tmp51_;
					_tmp50_ = proto;
					_tmp51_ = g_strconcat (_tmp50_, "unowned ", NULL);
					_g_free0 (proto);
					proto = _tmp51_;
				}
			}
			_tmp52_ = proto;
			_tmp53_ = param;
			_tmp54_ = vala_variable_get_variable_type ((ValaVariable*) _tmp53_);
			_tmp55_ = _tmp54_;
			_tmp56_ = vala_data_type_to_qualified_string (_tmp55_, NULL);
			_tmp57_ = _tmp56_;
			_tmp58_ = param;
			_tmp59_ = vala_symbol_get_name ((ValaSymbol*) _tmp58_);
			_tmp60_ = _tmp59_;
			_tmp61_ = g_strdup_printf ("%s%s %s", _tmp52_, _tmp57_, _tmp60_);
			_g_free0 (proto);
			proto = _tmp61_;
			_g_free0 (_tmp57_);
			_tmp62_ = param;
			_tmp63_ = vala_variable_get_initializer ((ValaVariable*) _tmp62_);
			_tmp64_ = _tmp63_;
			if (_tmp64_ != NULL) {
				const gchar* _tmp65_;
				ValaParameter* _tmp66_;
				ValaExpression* _tmp67_;
				ValaExpression* _tmp68_;
				gchar* _tmp69_ = NULL;
				gchar* _tmp70_;
				gchar* _tmp71_ = NULL;
				_tmp65_ = proto;
				_tmp66_ = param;
				_tmp67_ = vala_variable_get_initializer ((ValaVariable*) _tmp66_);
				_tmp68_ = _tmp67_;
				_tmp69_ = vala_code_node_to_string ((ValaCodeNode*) _tmp68_);
				_tmp70_ = _tmp69_;
				_tmp71_ = g_strdup_printf ("%s = %s", _tmp65_, _tmp70_);
				_g_free0 (proto);
				proto = _tmp71_;
				_g_free0 (_tmp70_);
			}
			_tmp72_ = i;
			i = _tmp72_ + 1;
			_vala_code_node_unref0 (param);
		}
		_vala_iterable_unref0 (_param_list);
	}
	_tmp73_ = proto;
	_tmp74_ = g_strconcat (_tmp73_, ")", NULL);
	result = _tmp74_;
	_g_free0 (proto);
	return result;
}