Exemple #1
0
static gboolean vala_method_type_real_compatible (ValaDataType* base, ValaDataType* target_type) {
	ValaMethodType * self;
	gboolean result = FALSE;
	ValaDataType* _tmp0_;
	ValaDelegateType* _tmp1_;
	ValaDelegateType* dt;
	ValaDelegateType* _tmp2_;
	ValaDelegateType* _tmp3_;
	ValaDelegate* _tmp4_;
	ValaDelegate* _tmp5_;
	ValaMethod* _tmp6_;
	ValaDelegateType* _tmp7_;
	gboolean _tmp8_ = FALSE;
	self = (ValaMethodType*) base;
	g_return_val_if_fail (target_type != NULL, FALSE);
	_tmp0_ = target_type;
	_tmp1_ = _vala_code_node_ref0 (VALA_IS_DELEGATE_TYPE (_tmp0_) ? ((ValaDelegateType*) _tmp0_) : NULL);
	dt = _tmp1_;
	_tmp2_ = dt;
	if (_tmp2_ == NULL) {
		result = FALSE;
		_vala_code_node_unref0 (dt);
		return result;
	}
	_tmp3_ = dt;
	_tmp4_ = vala_delegate_type_get_delegate_symbol (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = self->priv->_method_symbol;
	_tmp7_ = dt;
	_tmp8_ = vala_delegate_matches_method (_tmp5_, _tmp6_, (ValaDataType*) _tmp7_);
	result = _tmp8_;
	_vala_code_node_unref0 (dt);
	return result;
}
static void vala_slice_expression_finalize (ValaCodeNode* obj) {
	ValaSliceExpression * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALA_TYPE_SLICE_EXPRESSION, ValaSliceExpression);
	_vala_code_node_unref0 (self->priv->_container);
	_vala_code_node_unref0 (self->priv->_start);
	_vala_code_node_unref0 (self->priv->_stop);
	VALA_CODE_NODE_CLASS (vala_slice_expression_parent_class)->finalize (obj);
}
static void vala_named_argument_finalize (ValaCodeNode* obj) {
	ValaNamedArgument * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALA_TYPE_NAMED_ARGUMENT, ValaNamedArgument);
	_g_free0 (self->priv->_name);
	_vala_code_node_unref0 (self->priv->_inner);
	VALA_CODE_NODE_CLASS (vala_named_argument_parent_class)->finalize (obj);
}
static void vala_member_initializer_finalize (ValaCodeNode* obj) {
	ValaMemberInitializer * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALA_TYPE_MEMBER_INITIALIZER, ValaMemberInitializer);
	_g_free0 (self->priv->_name);
	_vala_code_node_unref0 (self->priv->_initializer);
	VALA_CODE_NODE_CLASS (vala_member_initializer_parent_class)->finalize (obj);
}
static ValaSymbol* vala_enum_value_type_real_get_member (ValaDataType* base, const gchar* member_name) {
	ValaEnumValueType * self;
	ValaSymbol* result = NULL;
	const gchar* _tmp0_;
	ValaSymbol* _tmp1_ = NULL;
	ValaSymbol* _result_;
	gboolean _tmp2_ = FALSE;
	ValaSymbol* _tmp3_;
	gboolean _tmp5_;
	self = (ValaEnumValueType*) base;
	g_return_val_if_fail (member_name != NULL, NULL);
	_tmp0_ = member_name;
	_tmp1_ = VALA_DATA_TYPE_CLASS (vala_enum_value_type_parent_class)->get_member ((ValaDataType*) G_TYPE_CHECK_INSTANCE_CAST (self, VALA_TYPE_VALUE_TYPE, ValaValueType), _tmp0_);
	_result_ = _tmp1_;
	_tmp3_ = _result_;
	if (_tmp3_ == NULL) {
		const gchar* _tmp4_;
		_tmp4_ = member_name;
		_tmp2_ = g_strcmp0 (_tmp4_, "to_string") == 0;
	} else {
		_tmp2_ = FALSE;
	}
	_tmp5_ = _tmp2_;
	if (_tmp5_) {
		ValaMethod* _tmp6_ = NULL;
		_tmp6_ = vala_enum_value_type_get_to_string_method (self);
		result = (ValaSymbol*) _tmp6_;
		_vala_code_node_unref0 (_result_);
		return result;
	}
	result = _result_;
	return result;
}
Exemple #6
0
static gboolean vala_null_literal_real_check (ValaCodeNode* base, ValaCodeContext* context) {
	ValaNullLiteral * self;
	gboolean result = FALSE;
	gboolean _tmp0_;
	gboolean _tmp1_;
	ValaSourceReference* _tmp4_;
	ValaSourceReference* _tmp5_;
	ValaNullType* _tmp6_;
	ValaNullType* _tmp7_;
	gboolean _tmp8_;
	gboolean _tmp9_;
	self = (ValaNullLiteral*) 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_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
	_tmp5_ = _tmp4_;
	_tmp6_ = vala_null_type_new (_tmp5_);
	_tmp7_ = _tmp6_;
	vala_expression_set_value_type ((ValaExpression*) self, (ValaDataType*) _tmp7_);
	_vala_code_node_unref0 (_tmp7_);
	_tmp8_ = vala_code_node_get_error ((ValaCodeNode*) self);
	_tmp9_ = _tmp8_;
	result = !_tmp9_;
	return result;
}
Exemple #7
0
void vala_constructor_set_this_parameter (ValaConstructor* self, ValaParameter* value) {
	ValaParameter* _tmp0_;
	ValaParameter* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = _vala_code_node_ref0 (_tmp0_);
	_vala_code_node_unref0 (self->priv->_this_parameter);
	self->priv->_this_parameter = _tmp1_;
}
Exemple #8
0
void vala_unlock_statement_set_resource (ValaUnlockStatement* self, ValaExpression* value) {
	ValaExpression* _tmp0_;
	ValaExpression* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = _vala_code_node_ref0 (_tmp0_);
	_vala_code_node_unref0 (self->priv->_resource);
	self->priv->_resource = _tmp1_;
}
Exemple #9
0
static void vala_tuple_real_replace_expression (ValaCodeNode* base, ValaExpression* old_node, ValaExpression* new_node) {
	ValaTuple * self;
	self = (ValaTuple*) base;
	g_return_if_fail (old_node != NULL);
	g_return_if_fail (new_node != NULL);
	{
		gint i;
		i = 0;
		{
			gboolean _tmp0_;
			_tmp0_ = TRUE;
			while (TRUE) {
				gboolean _tmp1_;
				gint _tmp3_;
				ValaList* _tmp4_;
				gint _tmp5_;
				gint _tmp6_;
				ValaList* _tmp7_;
				gint _tmp8_;
				gpointer _tmp9_ = NULL;
				ValaExpression* _tmp10_;
				ValaExpression* _tmp11_;
				gboolean _tmp12_;
				_tmp1_ = _tmp0_;
				if (!_tmp1_) {
					gint _tmp2_;
					_tmp2_ = i;
					i = _tmp2_ + 1;
				}
				_tmp0_ = FALSE;
				_tmp3_ = i;
				_tmp4_ = self->priv->expression_list;
				_tmp5_ = vala_collection_get_size ((ValaCollection*) _tmp4_);
				_tmp6_ = _tmp5_;
				if (!(_tmp3_ < _tmp6_)) {
					break;
				}
				_tmp7_ = self->priv->expression_list;
				_tmp8_ = i;
				_tmp9_ = vala_list_get (_tmp7_, _tmp8_);
				_tmp10_ = (ValaExpression*) _tmp9_;
				_tmp11_ = old_node;
				_tmp12_ = _tmp10_ == _tmp11_;
				_vala_code_node_unref0 (_tmp10_);
				if (_tmp12_) {
					ValaList* _tmp13_;
					gint _tmp14_;
					ValaExpression* _tmp15_;
					_tmp13_ = self->priv->expression_list;
					_tmp14_ = i;
					_tmp15_ = new_node;
					vala_list_set (_tmp13_, _tmp14_, _tmp15_);
				}
			}
		}
	}
}
Exemple #10
0
void vala_target_value_set_actual_value_type (ValaTargetValue* self, ValaDataType* value) {
	ValaDataType* _tmp0_;
	ValaDataType* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = _vala_code_node_ref0 (_tmp0_);
	_vala_code_node_unref0 (self->priv->_actual_value_type);
	self->priv->_actual_value_type = _tmp1_;
}
Exemple #11
0
void vala_field_prototype_set_field_symbol (ValaFieldPrototype* self, ValaField* value) {
	ValaField* _tmp0_;
	ValaField* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = _vala_code_node_ref0 (_tmp0_);
	_vala_code_node_unref0 (self->priv->_field_symbol);
	self->priv->_field_symbol = _tmp1_;
}
Exemple #12
0
void vala_method_type_set_method_symbol (ValaMethodType* self, ValaMethod* value) {
	ValaMethod* _tmp0_;
	ValaMethod* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = _vala_code_node_ref0 (_tmp0_);
	_vala_code_node_unref0 (self->priv->_method_symbol);
	self->priv->_method_symbol = _tmp1_;
}
Exemple #13
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);
}
void vala_member_initializer_set_initializer (ValaMemberInitializer* self, ValaExpression* value) {
	ValaExpression* _tmp0_;
	ValaExpression* _tmp1_;
	ValaExpression* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = _vala_code_node_ref0 (_tmp0_);
	_vala_code_node_unref0 (self->priv->_initializer);
	self->priv->_initializer = _tmp1_;
	_tmp2_ = self->priv->_initializer;
	vala_code_node_set_parent_node ((ValaCodeNode*) _tmp2_, (ValaCodeNode*) self);
}
static void vala_slice_expression_set_stop (ValaSliceExpression* self, ValaExpression* value) {
	ValaExpression* _tmp0_;
	ValaExpression* _tmp1_;
	ValaExpression* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = _vala_code_node_ref0 (_tmp0_);
	_vala_code_node_unref0 (self->priv->_stop);
	self->priv->_stop = _tmp1_;
	_tmp2_ = self->priv->_stop;
	vala_code_node_set_parent_node ((ValaCodeNode*) _tmp2_, (ValaCodeNode*) self);
}
void vala_addressof_expression_set_inner (ValaAddressofExpression* self, ValaExpression* value) {
	ValaExpression* _tmp0_;
	ValaExpression* _tmp1_;
	ValaExpression* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = _vala_code_node_ref0 (_tmp0_);
	_vala_code_node_unref0 (self->priv->_inner);
	self->priv->_inner = _tmp1_;
	_tmp2_ = self->priv->_inner;
	vala_code_node_set_parent_node ((ValaCodeNode*) _tmp2_, (ValaCodeNode*) self);
}
/**
 * Creates a new array length field.
 *
 * @return newly created field
 */
ValaArrayLengthField* vala_array_length_field_construct (GType object_type, ValaSourceReference* source_reference) {
	ValaArrayLengthField* self = NULL;
	ValaInvalidType* _tmp0_;
	ValaInvalidType* _tmp1_;
	ValaSourceReference* _tmp2_;
	g_return_val_if_fail (source_reference != NULL, NULL);
	_tmp0_ = vala_invalid_type_new ();
	_tmp1_ = _tmp0_;
	_tmp2_ = source_reference;
	self = (ValaArrayLengthField*) vala_field_construct (object_type, "length", (ValaDataType*) _tmp1_, NULL, _tmp2_, NULL);
	_vala_code_node_unref0 (_tmp1_);
	vala_symbol_set_external ((ValaSymbol*) self, TRUE);
	return self;
}
Exemple #18
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);
}
Exemple #19
0
static void vala_constructor_finalize (ValaCodeNode* obj) {
	ValaConstructor * self;
	self = VALA_CONSTRUCTOR (obj);
	_vala_code_node_unref0 (self->priv->_this_parameter);
	VALA_CODE_NODE_CLASS (vala_constructor_parent_class)->finalize (obj);
}
static void vala_addressof_expression_finalize (ValaCodeNode* obj) {
	ValaAddressofExpression * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALA_TYPE_ADDRESSOF_EXPRESSION, ValaAddressofExpression);
	_vala_code_node_unref0 (self->priv->_inner);
	VALA_CODE_NODE_CLASS (vala_addressof_expression_parent_class)->finalize (obj);
}
Exemple #21
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;
}
static gboolean vala_addressof_expression_real_check (ValaCodeNode* base, ValaCodeContext* context) {
	ValaAddressofExpression * self;
	gboolean result = FALSE;
	gboolean _tmp0_;
	gboolean _tmp1_;
	ValaExpression* _tmp4_;
	ValaExpression* _tmp5_;
	ValaExpression* _tmp6_;
	ValaExpression* _tmp7_;
	ValaCodeContext* _tmp8_;
	gboolean _tmp9_ = FALSE;
	ValaExpression* _tmp10_;
	ValaExpression* _tmp11_;
	ValaElementAccess* _tmp12_;
	ValaElementAccess* ea;
	gboolean _tmp13_ = FALSE;
	ValaExpression* _tmp14_;
	ValaExpression* _tmp15_;
	gboolean _tmp20_;
	ValaExpression* _tmp38_;
	ValaExpression* _tmp39_;
	ValaDataType* _tmp40_;
	ValaDataType* _tmp41_;
	gboolean _tmp42_ = FALSE;
	gboolean _tmp57_;
	gboolean _tmp58_;
	self = (ValaAddressofExpression*) 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_ = vala_addressof_expression_get_inner (self);
	_tmp5_ = _tmp4_;
	vala_expression_set_lvalue (_tmp5_, TRUE);
	_tmp6_ = vala_addressof_expression_get_inner (self);
	_tmp7_ = _tmp6_;
	_tmp8_ = context;
	_tmp9_ = vala_code_node_check ((ValaCodeNode*) _tmp7_, _tmp8_);
	if (!_tmp9_) {
		vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
		result = FALSE;
		return result;
	}
	_tmp10_ = vala_addressof_expression_get_inner (self);
	_tmp11_ = _tmp10_;
	_tmp12_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp11_, VALA_TYPE_ELEMENT_ACCESS) ? ((ValaElementAccess*) _tmp11_) : NULL);
	ea = _tmp12_;
	_tmp14_ = vala_addressof_expression_get_inner (self);
	_tmp15_ = _tmp14_;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp15_, VALA_TYPE_MEMBER_ACCESS)) {
		ValaExpression* _tmp16_;
		ValaExpression* _tmp17_;
		ValaSymbol* _tmp18_;
		ValaSymbol* _tmp19_;
		_tmp16_ = vala_addressof_expression_get_inner (self);
		_tmp17_ = _tmp16_;
		_tmp18_ = vala_expression_get_symbol_reference (_tmp17_);
		_tmp19_ = _tmp18_;
		_tmp13_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp19_, VALA_TYPE_VARIABLE);
	} else {
		_tmp13_ = FALSE;
	}
	_tmp20_ = _tmp13_;
	if (_tmp20_) {
	} else {
		gboolean _tmp21_ = FALSE;
		ValaElementAccess* _tmp22_;
		gboolean _tmp35_;
		_tmp22_ = ea;
		if (_tmp22_ != NULL) {
			gboolean _tmp23_ = FALSE;
			ValaElementAccess* _tmp24_;
			ValaExpression* _tmp25_;
			ValaExpression* _tmp26_;
			ValaDataType* _tmp27_;
			ValaDataType* _tmp28_;
			gboolean _tmp34_;
			_tmp24_ = ea;
			_tmp25_ = vala_element_access_get_container (_tmp24_);
			_tmp26_ = _tmp25_;
			_tmp27_ = vala_expression_get_value_type (_tmp26_);
			_tmp28_ = _tmp27_;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp28_, VALA_TYPE_ARRAY_TYPE)) {
				_tmp23_ = TRUE;
			} else {
				ValaElementAccess* _tmp29_;
				ValaExpression* _tmp30_;
				ValaExpression* _tmp31_;
				ValaDataType* _tmp32_;
				ValaDataType* _tmp33_;
				_tmp29_ = ea;
				_tmp30_ = vala_element_access_get_container (_tmp29_);
				_tmp31_ = _tmp30_;
				_tmp32_ = vala_expression_get_value_type (_tmp31_);
				_tmp33_ = _tmp32_;
				_tmp23_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp33_, VALA_TYPE_POINTER_TYPE);
			}
			_tmp34_ = _tmp23_;
			_tmp21_ = _tmp34_;
		} else {
			_tmp21_ = FALSE;
		}
		_tmp35_ = _tmp21_;
		if (_tmp35_) {
		} else {
			ValaSourceReference* _tmp36_;
			ValaSourceReference* _tmp37_;
			vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
			_tmp36_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
			_tmp37_ = _tmp36_;
			vala_report_error (_tmp37_, "Address-of operator not supported for this expression");
			result = FALSE;
			_vala_code_node_unref0 (ea);
			return result;
		}
	}
	_tmp38_ = vala_addressof_expression_get_inner (self);
	_tmp39_ = _tmp38_;
	_tmp40_ = vala_expression_get_value_type (_tmp39_);
	_tmp41_ = _tmp40_;
	_tmp42_ = vala_data_type_is_reference_type_or_type_parameter (_tmp41_);
	if (_tmp42_) {
		ValaExpression* _tmp43_;
		ValaExpression* _tmp44_;
		ValaDataType* _tmp45_;
		ValaDataType* _tmp46_;
		ValaPointerType* _tmp47_;
		ValaPointerType* _tmp48_;
		ValaPointerType* _tmp49_;
		ValaPointerType* _tmp50_;
		_tmp43_ = vala_addressof_expression_get_inner (self);
		_tmp44_ = _tmp43_;
		_tmp45_ = vala_expression_get_value_type (_tmp44_);
		_tmp46_ = _tmp45_;
		_tmp47_ = vala_pointer_type_new (_tmp46_, NULL);
		_tmp48_ = _tmp47_;
		_tmp49_ = vala_pointer_type_new ((ValaDataType*) _tmp48_, NULL);
		_tmp50_ = _tmp49_;
		vala_expression_set_value_type ((ValaExpression*) self, (ValaDataType*) _tmp50_);
		_vala_code_node_unref0 (_tmp50_);
		_vala_code_node_unref0 (_tmp48_);
	} else {
		ValaExpression* _tmp51_;
		ValaExpression* _tmp52_;
		ValaDataType* _tmp53_;
		ValaDataType* _tmp54_;
		ValaPointerType* _tmp55_;
		ValaPointerType* _tmp56_;
		_tmp51_ = vala_addressof_expression_get_inner (self);
		_tmp52_ = _tmp51_;
		_tmp53_ = vala_expression_get_value_type (_tmp52_);
		_tmp54_ = _tmp53_;
		_tmp55_ = vala_pointer_type_new (_tmp54_, NULL);
		_tmp56_ = _tmp55_;
		vala_expression_set_value_type ((ValaExpression*) self, (ValaDataType*) _tmp56_);
		_vala_code_node_unref0 (_tmp56_);
	}
	_tmp57_ = vala_code_node_get_error ((ValaCodeNode*) self);
	_tmp58_ = _tmp57_;
	result = !_tmp58_;
	_vala_code_node_unref0 (ea);
	return result;
}
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_);
}
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;
}
Exemple #25
0
static void vala_target_value_finalize (ValaTargetValue* obj) {
	ValaTargetValue * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALA_TYPE_TARGET_VALUE, ValaTargetValue);
	_vala_code_node_unref0 (self->priv->_value_type);
	_vala_code_node_unref0 (self->priv->_actual_value_type);
}
Exemple #26
0
static gboolean vala_integer_type_real_compatible (ValaDataType* base, ValaDataType* target_type) {
	ValaIntegerType * self;
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	ValaDataType* _tmp1_;
	ValaTypeSymbol* _tmp2_;
	ValaTypeSymbol* _tmp3_;
	gboolean _tmp5_;
	ValaDataType* _tmp41_;
	gboolean _tmp42_ = FALSE;
	self = (ValaIntegerType*) base;
	g_return_val_if_fail (target_type != NULL, FALSE);
	_tmp1_ = target_type;
	_tmp2_ = vala_data_type_get_data_type (_tmp1_);
	_tmp3_ = _tmp2_;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, VALA_TYPE_STRUCT)) {
		const gchar* _tmp4_;
		_tmp4_ = self->priv->literal_type_name;
		_tmp0_ = g_strcmp0 (_tmp4_, "int") == 0;
	} else {
		_tmp0_ = FALSE;
	}
	_tmp5_ = _tmp0_;
	if (_tmp5_) {
		ValaDataType* _tmp6_;
		ValaTypeSymbol* _tmp7_;
		ValaTypeSymbol* _tmp8_;
		ValaStruct* _tmp9_;
		ValaStruct* target_st;
		ValaStruct* _tmp10_;
		gboolean _tmp11_ = FALSE;
		_tmp6_ = target_type;
		_tmp7_ = vala_data_type_get_data_type (_tmp6_);
		_tmp8_ = _tmp7_;
		_tmp9_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, VALA_TYPE_STRUCT, ValaStruct));
		target_st = _tmp9_;
		_tmp10_ = target_st;
		_tmp11_ = vala_struct_is_integer_type (_tmp10_);
		if (_tmp11_) {
			ValaStruct* _tmp12_;
			ValaAttribute* _tmp13_ = NULL;
			ValaAttribute* int_attr;
			gboolean _tmp14_ = FALSE;
			gboolean _tmp15_ = FALSE;
			ValaAttribute* _tmp16_;
			gboolean _tmp19_;
			gboolean _tmp22_;
			_tmp12_ = target_st;
			_tmp13_ = vala_code_node_get_attribute ((ValaCodeNode*) _tmp12_, "IntegerType");
			int_attr = _tmp13_;
			_tmp16_ = int_attr;
			if (_tmp16_ != NULL) {
				ValaAttribute* _tmp17_;
				gboolean _tmp18_ = FALSE;
				_tmp17_ = int_attr;
				_tmp18_ = vala_attribute_has_argument (_tmp17_, "min");
				_tmp15_ = _tmp18_;
			} else {
				_tmp15_ = FALSE;
			}
			_tmp19_ = _tmp15_;
			if (_tmp19_) {
				ValaAttribute* _tmp20_;
				gboolean _tmp21_ = FALSE;
				_tmp20_ = int_attr;
				_tmp21_ = vala_attribute_has_argument (_tmp20_, "max");
				_tmp14_ = _tmp21_;
			} else {
				_tmp14_ = FALSE;
			}
			_tmp22_ = _tmp14_;
			if (_tmp22_) {
				const gchar* _tmp23_;
				gint _tmp24_ = 0;
				gint val;
				gboolean _tmp25_ = FALSE;
				gint _tmp26_;
				ValaAttribute* _tmp27_;
				gint _tmp28_ = 0;
				gboolean _tmp32_;
				_tmp23_ = self->priv->literal_value;
				_tmp24_ = atoi (_tmp23_);
				val = _tmp24_;
				_tmp26_ = val;
				_tmp27_ = int_attr;
				_tmp28_ = vala_attribute_get_integer (_tmp27_, "min", 0);
				if (_tmp26_ >= _tmp28_) {
					gint _tmp29_;
					ValaAttribute* _tmp30_;
					gint _tmp31_ = 0;
					_tmp29_ = val;
					_tmp30_ = int_attr;
					_tmp31_ = vala_attribute_get_integer (_tmp30_, "max", 0);
					_tmp25_ = _tmp29_ <= _tmp31_;
				} else {
					_tmp25_ = FALSE;
				}
				_tmp32_ = _tmp25_;
				result = _tmp32_;
				_vala_code_node_unref0 (int_attr);
				_vala_code_node_unref0 (target_st);
				return result;
			} else {
				result = TRUE;
				_vala_code_node_unref0 (int_attr);
				_vala_code_node_unref0 (target_st);
				return result;
			}
			_vala_code_node_unref0 (int_attr);
		}
		_vala_code_node_unref0 (target_st);
	} else {
		gboolean _tmp33_ = FALSE;
		ValaDataType* _tmp34_;
		ValaTypeSymbol* _tmp35_;
		ValaTypeSymbol* _tmp36_;
		gboolean _tmp38_;
		_tmp34_ = target_type;
		_tmp35_ = vala_data_type_get_data_type (_tmp34_);
		_tmp36_ = _tmp35_;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp36_, VALA_TYPE_ENUM)) {
			const gchar* _tmp37_;
			_tmp37_ = self->priv->literal_type_name;
			_tmp33_ = g_strcmp0 (_tmp37_, "int") == 0;
		} else {
			_tmp33_ = FALSE;
		}
		_tmp38_ = _tmp33_;
		if (_tmp38_) {
			const gchar* _tmp39_;
			gint _tmp40_ = 0;
			_tmp39_ = self->priv->literal_value;
			_tmp40_ = atoi (_tmp39_);
			if (_tmp40_ == 0) {
				result = TRUE;
				return result;
			}
		}
	}
	_tmp41_ = target_type;
	_tmp42_ = VALA_DATA_TYPE_CLASS (vala_integer_type_parent_class)->compatible ((ValaDataType*) G_TYPE_CHECK_INSTANCE_CAST (self, VALA_TYPE_VALUE_TYPE, ValaValueType), _tmp41_);
	result = _tmp42_;
	return result;
}
static gboolean vala_slice_expression_real_check (ValaCodeNode* base, ValaCodeContext* context) {
	ValaSliceExpression * self;
	gboolean result = FALSE;
	gboolean _tmp0_;
	gboolean _tmp1_;
	ValaExpression* _tmp4_;
	ValaExpression* _tmp5_;
	ValaCodeContext* _tmp6_;
	gboolean _tmp7_ = FALSE;
	ValaExpression* _tmp8_;
	ValaExpression* _tmp9_;
	ValaCodeContext* _tmp10_;
	gboolean _tmp11_ = FALSE;
	ValaExpression* _tmp12_;
	ValaExpression* _tmp13_;
	ValaCodeContext* _tmp14_;
	gboolean _tmp15_ = FALSE;
	ValaExpression* _tmp16_;
	ValaExpression* _tmp17_;
	ValaDataType* _tmp18_;
	ValaDataType* _tmp19_;
	gboolean _tmp24_;
	gboolean _tmp25_;
	ValaExpression* _tmp30_;
	ValaExpression* _tmp31_;
	ValaDataType* _tmp32_;
	ValaDataType* _tmp33_;
	gboolean _tmp107_;
	gboolean _tmp108_;
	self = (ValaSliceExpression*) 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_ = vala_slice_expression_get_container (self);
	_tmp5_ = _tmp4_;
	_tmp6_ = context;
	_tmp7_ = vala_code_node_check ((ValaCodeNode*) _tmp5_, _tmp6_);
	if (!_tmp7_) {
		vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
		result = FALSE;
		return result;
	}
	_tmp8_ = vala_slice_expression_get_start (self);
	_tmp9_ = _tmp8_;
	_tmp10_ = context;
	_tmp11_ = vala_code_node_check ((ValaCodeNode*) _tmp9_, _tmp10_);
	if (!_tmp11_) {
		vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
		result = FALSE;
		return result;
	}
	_tmp12_ = vala_slice_expression_get_stop (self);
	_tmp13_ = _tmp12_;
	_tmp14_ = context;
	_tmp15_ = vala_code_node_check ((ValaCodeNode*) _tmp13_, _tmp14_);
	if (!_tmp15_) {
		vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
		result = FALSE;
		return result;
	}
	_tmp16_ = vala_slice_expression_get_container (self);
	_tmp17_ = _tmp16_;
	_tmp18_ = vala_expression_get_value_type (_tmp17_);
	_tmp19_ = _tmp18_;
	if (_tmp19_ == NULL) {
		ValaExpression* _tmp20_;
		ValaExpression* _tmp21_;
		ValaSourceReference* _tmp22_;
		ValaSourceReference* _tmp23_;
		vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
		_tmp20_ = vala_slice_expression_get_container (self);
		_tmp21_ = _tmp20_;
		_tmp22_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp21_);
		_tmp23_ = _tmp22_;
		vala_report_error (_tmp23_, "Invalid container expression");
		result = FALSE;
		return result;
	}
	_tmp24_ = vala_expression_get_lvalue ((ValaExpression*) self);
	_tmp25_ = _tmp24_;
	if (_tmp25_) {
		ValaExpression* _tmp26_;
		ValaExpression* _tmp27_;
		ValaSourceReference* _tmp28_;
		ValaSourceReference* _tmp29_;
		vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
		_tmp26_ = vala_slice_expression_get_container (self);
		_tmp27_ = _tmp26_;
		_tmp28_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp27_);
		_tmp29_ = _tmp28_;
		vala_report_error (_tmp29_, "Slice expressions cannot be used as lvalue");
		result = FALSE;
		return result;
	}
	_tmp30_ = vala_slice_expression_get_container (self);
	_tmp31_ = _tmp30_;
	_tmp32_ = vala_expression_get_value_type (_tmp31_);
	_tmp33_ = _tmp32_;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp33_, VALA_TYPE_ARRAY_TYPE)) {
		ValaExpression* _tmp34_;
		ValaExpression* _tmp35_;
		ValaDataType* _tmp36_;
		ValaDataType* _tmp37_;
		ValaDataType* _tmp38_ = NULL;
		ValaDataType* _tmp39_;
		ValaDataType* _tmp40_;
		ValaDataType* _tmp41_;
		gboolean _tmp42_ = FALSE;
		ValaExpression* _tmp43_;
		ValaExpression* _tmp44_;
		ValaDataType* _tmp45_;
		ValaDataType* _tmp46_;
		gboolean _tmp51_;
		gboolean _tmp56_ = FALSE;
		ValaExpression* _tmp57_;
		ValaExpression* _tmp58_;
		ValaDataType* _tmp59_;
		ValaDataType* _tmp60_;
		gboolean _tmp65_;
		_tmp34_ = vala_slice_expression_get_container (self);
		_tmp35_ = _tmp34_;
		_tmp36_ = vala_expression_get_value_type (_tmp35_);
		_tmp37_ = _tmp36_;
		_tmp38_ = vala_data_type_copy (_tmp37_);
		_tmp39_ = _tmp38_;
		vala_expression_set_value_type ((ValaExpression*) self, _tmp39_);
		_vala_code_node_unref0 (_tmp39_);
		_tmp40_ = vala_expression_get_value_type ((ValaExpression*) self);
		_tmp41_ = _tmp40_;
		vala_data_type_set_value_owned (_tmp41_, FALSE);
		_tmp43_ = vala_slice_expression_get_start (self);
		_tmp44_ = _tmp43_;
		_tmp45_ = vala_expression_get_value_type (_tmp44_);
		_tmp46_ = _tmp45_;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp46_, VALA_TYPE_INTEGER_TYPE)) {
			_tmp42_ = TRUE;
		} else {
			ValaExpression* _tmp47_;
			ValaExpression* _tmp48_;
			ValaDataType* _tmp49_;
			ValaDataType* _tmp50_;
			_tmp47_ = vala_slice_expression_get_start (self);
			_tmp48_ = _tmp47_;
			_tmp49_ = vala_expression_get_value_type (_tmp48_);
			_tmp50_ = _tmp49_;
			_tmp42_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp50_, VALA_TYPE_ENUM_VALUE_TYPE);
		}
		_tmp51_ = _tmp42_;
		if (!_tmp51_) {
			ValaExpression* _tmp52_;
			ValaExpression* _tmp53_;
			ValaSourceReference* _tmp54_;
			ValaSourceReference* _tmp55_;
			vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
			_tmp52_ = vala_slice_expression_get_start (self);
			_tmp53_ = _tmp52_;
			_tmp54_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp53_);
			_tmp55_ = _tmp54_;
			vala_report_error (_tmp55_, "Expression of integer type expected");
		}
		_tmp57_ = vala_slice_expression_get_stop (self);
		_tmp58_ = _tmp57_;
		_tmp59_ = vala_expression_get_value_type (_tmp58_);
		_tmp60_ = _tmp59_;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp60_, VALA_TYPE_INTEGER_TYPE)) {
			_tmp56_ = TRUE;
		} else {
			ValaExpression* _tmp61_;
			ValaExpression* _tmp62_;
			ValaDataType* _tmp63_;
			ValaDataType* _tmp64_;
			_tmp61_ = vala_slice_expression_get_stop (self);
			_tmp62_ = _tmp61_;
			_tmp63_ = vala_expression_get_value_type (_tmp62_);
			_tmp64_ = _tmp63_;
			_tmp56_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp64_, VALA_TYPE_ENUM_VALUE_TYPE);
		}
		_tmp65_ = _tmp56_;
		if (!_tmp65_) {
			ValaExpression* _tmp66_;
			ValaExpression* _tmp67_;
			ValaSourceReference* _tmp68_;
			ValaSourceReference* _tmp69_;
			vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
			_tmp66_ = vala_slice_expression_get_stop (self);
			_tmp67_ = _tmp66_;
			_tmp68_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp67_);
			_tmp69_ = _tmp68_;
			vala_report_error (_tmp69_, "Expression of integer type expected");
		}
	} else {
		ValaExpression* _tmp70_;
		ValaExpression* _tmp71_;
		ValaDataType* _tmp72_;
		ValaDataType* _tmp73_;
		ValaSymbol* _tmp74_ = NULL;
		ValaMethod* slice_method;
		ValaMethod* _tmp75_;
		ValaSourceReference* _tmp97_;
		ValaSourceReference* _tmp98_;
		ValaExpression* _tmp99_;
		ValaExpression* _tmp100_;
		ValaDataType* _tmp101_;
		ValaDataType* _tmp102_;
		gchar* _tmp103_ = NULL;
		gchar* _tmp104_;
		gchar* _tmp105_ = NULL;
		gchar* _tmp106_;
		_tmp70_ = vala_slice_expression_get_container (self);
		_tmp71_ = _tmp70_;
		_tmp72_ = vala_expression_get_value_type (_tmp71_);
		_tmp73_ = _tmp72_;
		_tmp74_ = vala_data_type_get_member (_tmp73_, "slice");
		slice_method = G_TYPE_CHECK_INSTANCE_TYPE (_tmp74_, VALA_TYPE_METHOD) ? ((ValaMethod*) _tmp74_) : NULL;
		_tmp75_ = slice_method;
		if (_tmp75_ != NULL) {
			ValaExpression* _tmp76_;
			ValaExpression* _tmp77_;
			ValaMemberAccess* _tmp78_;
			ValaMemberAccess* _tmp79_;
			ValaMethodCall* _tmp80_;
			ValaMethodCall* _tmp81_;
			ValaMethodCall* slice_call;
			ValaMethodCall* _tmp82_;
			ValaExpression* _tmp83_;
			ValaExpression* _tmp84_;
			ValaMethodCall* _tmp85_;
			ValaExpression* _tmp86_;
			ValaExpression* _tmp87_;
			ValaMethodCall* _tmp88_;
			ValaDataType* _tmp89_;
			ValaDataType* _tmp90_;
			ValaCodeNode* _tmp91_;
			ValaCodeNode* _tmp92_;
			ValaMethodCall* _tmp93_;
			ValaMethodCall* _tmp94_;
			ValaCodeContext* _tmp95_;
			gboolean _tmp96_ = FALSE;
			_tmp76_ = vala_slice_expression_get_container (self);
			_tmp77_ = _tmp76_;
			_tmp78_ = vala_member_access_new (_tmp77_, "slice", NULL);
			_tmp79_ = _tmp78_;
			_tmp80_ = vala_method_call_new ((ValaExpression*) _tmp79_, NULL);
			_tmp81_ = _tmp80_;
			_vala_code_node_unref0 (_tmp79_);
			slice_call = _tmp81_;
			_tmp82_ = slice_call;
			_tmp83_ = vala_slice_expression_get_start (self);
			_tmp84_ = _tmp83_;
			vala_method_call_add_argument (_tmp82_, _tmp84_);
			_tmp85_ = slice_call;
			_tmp86_ = vala_slice_expression_get_stop (self);
			_tmp87_ = _tmp86_;
			vala_method_call_add_argument (_tmp85_, _tmp87_);
			_tmp88_ = slice_call;
			_tmp89_ = vala_expression_get_target_type ((ValaExpression*) self);
			_tmp90_ = _tmp89_;
			vala_expression_set_target_type ((ValaExpression*) _tmp88_, _tmp90_);
			_tmp91_ = vala_code_node_get_parent_node ((ValaCodeNode*) self);
			_tmp92_ = _tmp91_;
			_tmp93_ = slice_call;
			vala_code_node_replace_expression (_tmp92_, (ValaExpression*) self, (ValaExpression*) _tmp93_);
			_tmp94_ = slice_call;
			_tmp95_ = context;
			_tmp96_ = vala_code_node_check ((ValaCodeNode*) _tmp94_, _tmp95_);
			result = _tmp96_;
			_vala_code_node_unref0 (slice_call);
			_vala_code_node_unref0 (slice_method);
			return result;
		}
		vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
		_tmp97_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
		_tmp98_ = _tmp97_;
		_tmp99_ = vala_slice_expression_get_container (self);
		_tmp100_ = _tmp99_;
		_tmp101_ = vala_expression_get_value_type (_tmp100_);
		_tmp102_ = _tmp101_;
		_tmp103_ = vala_code_node_to_string ((ValaCodeNode*) _tmp102_);
		_tmp104_ = _tmp103_;
		_tmp105_ = g_strdup_printf ("The expression `%s' does not denote an array", _tmp104_);
		_tmp106_ = _tmp105_;
		vala_report_error (_tmp98_, _tmp106_);
		_g_free0 (_tmp106_);
		_g_free0 (_tmp104_);
		_vala_code_node_unref0 (slice_method);
	}
	_tmp107_ = vala_code_node_get_error ((ValaCodeNode*) self);
	_tmp108_ = _tmp107_;
	result = !_tmp108_;
	return result;
}
Exemple #28
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;
}
Exemple #29
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_);
}
Exemple #30
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);
}