1 /* valaobjectcreationexpression.c generated by valac, the Vala compiler
2 * generated from valaobjectcreationexpression.vala, do not modify */
3
4 /* valaobjectcreationexpression.vala
5 *
6 * Copyright (C) 2006-2012 Jürg Billeter
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 *
22 * Author:
23 * Jürg Billeter <j@bitron.ch>
24 */
25
26 #include "vala.h"
27 #include <glib.h>
28 #include <valagee.h>
29 #include <glib-object.h>
30 #include <stdlib.h>
31 #include <string.h>
32
33 #define _vala_code_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_node_unref (var), NULL)))
34 #define _vala_iterable_unref0(var) ((var == NULL) ? NULL : (var = (vala_iterable_unref (var), NULL)))
35 #define _g_free0(var) (var = (g_free (var), NULL))
36 #define _vala_iterator_unref0(var) ((var == NULL) ? NULL : (var = (vala_iterator_unref (var), NULL)))
37
38 struct _ValaObjectCreationExpressionPrivate {
39 gboolean _is_yield_expression;
40 gboolean _struct_creation;
41 ValaList* argument_list;
42 ValaList* object_initializer;
43 ValaDataType* _data_type;
44 ValaMemberAccess* _member_name;
45 };
46
47 static gint ValaObjectCreationExpression_private_offset;
48 static gpointer vala_object_creation_expression_parent_class = NULL;
49
50 static void vala_object_creation_expression_real_accept (ValaCodeNode* base,
51 ValaCodeVisitor* visitor);
52 static void vala_object_creation_expression_real_accept_children (ValaCodeNode* base,
53 ValaCodeVisitor* visitor);
54 static void vala_object_creation_expression_real_replace_expression (ValaCodeNode* base,
55 ValaExpression* old_node,
56 ValaExpression* new_node);
57 static gboolean vala_object_creation_expression_real_is_pure (ValaExpression* base);
58 static gboolean vala_object_creation_expression_real_is_accessible (ValaExpression* base,
59 ValaSymbol* sym);
60 static void vala_object_creation_expression_real_replace_type (ValaCodeNode* base,
61 ValaDataType* old_type,
62 ValaDataType* new_type);
63 static gboolean vala_object_creation_expression_real_check (ValaCodeNode* base,
64 ValaCodeContext* context);
65 static void vala_object_creation_expression_real_get_error_types (ValaCodeNode* base,
66 ValaCollection* collection,
67 ValaSourceReference* source_reference);
68 static void vala_object_creation_expression_real_emit (ValaCodeNode* base,
69 ValaCodeGenerator* codegen);
70 static void vala_object_creation_expression_real_get_defined_variables (ValaCodeNode* base,
71 ValaCollection* collection);
72 static void vala_object_creation_expression_real_get_used_variables (ValaCodeNode* base,
73 ValaCollection* collection);
74 static void vala_object_creation_expression_finalize (ValaCodeNode * obj);
75 static GType vala_object_creation_expression_get_type_once (void);
76
77 static inline gpointer
vala_object_creation_expression_get_instance_private(ValaObjectCreationExpression * self)78 vala_object_creation_expression_get_instance_private (ValaObjectCreationExpression* self)
79 {
80 return G_STRUCT_MEMBER_P (self, ValaObjectCreationExpression_private_offset);
81 }
82
83 ValaDataType*
vala_object_creation_expression_get_type_reference(ValaObjectCreationExpression * self)84 vala_object_creation_expression_get_type_reference (ValaObjectCreationExpression* self)
85 {
86 ValaDataType* result;
87 ValaDataType* _tmp0_;
88 g_return_val_if_fail (self != NULL, NULL);
89 _tmp0_ = self->priv->_data_type;
90 result = _tmp0_;
91 return result;
92 }
93
94 static gpointer
_vala_code_node_ref0(gpointer self)95 _vala_code_node_ref0 (gpointer self)
96 {
97 return self ? vala_code_node_ref (self) : NULL;
98 }
99
100 void
vala_object_creation_expression_set_type_reference(ValaObjectCreationExpression * self,ValaDataType * value)101 vala_object_creation_expression_set_type_reference (ValaObjectCreationExpression* self,
102 ValaDataType* value)
103 {
104 ValaDataType* _tmp0_;
105 ValaDataType* _tmp1_;
106 g_return_if_fail (self != NULL);
107 _tmp0_ = _vala_code_node_ref0 (value);
108 _vala_code_node_unref0 (self->priv->_data_type);
109 self->priv->_data_type = _tmp0_;
110 _tmp1_ = self->priv->_data_type;
111 vala_code_node_set_parent_node ((ValaCodeNode*) _tmp1_, (ValaCodeNode*) self);
112 }
113
114 ValaMemberAccess*
vala_object_creation_expression_get_member_name(ValaObjectCreationExpression * self)115 vala_object_creation_expression_get_member_name (ValaObjectCreationExpression* self)
116 {
117 ValaMemberAccess* result;
118 ValaMemberAccess* _tmp0_;
119 g_return_val_if_fail (self != NULL, NULL);
120 _tmp0_ = self->priv->_member_name;
121 result = _tmp0_;
122 return result;
123 }
124
125 void
vala_object_creation_expression_set_member_name(ValaObjectCreationExpression * self,ValaMemberAccess * value)126 vala_object_creation_expression_set_member_name (ValaObjectCreationExpression* self,
127 ValaMemberAccess* value)
128 {
129 ValaMemberAccess* _tmp0_;
130 ValaMemberAccess* _tmp1_;
131 g_return_if_fail (self != NULL);
132 _tmp0_ = _vala_code_node_ref0 (value);
133 _vala_code_node_unref0 (self->priv->_member_name);
134 self->priv->_member_name = _tmp0_;
135 _tmp1_ = self->priv->_member_name;
136 if (_tmp1_ != NULL) {
137 ValaMemberAccess* _tmp2_;
138 _tmp2_ = self->priv->_member_name;
139 vala_code_node_set_parent_node ((ValaCodeNode*) _tmp2_, (ValaCodeNode*) self);
140 }
141 }
142
143 gboolean
vala_object_creation_expression_get_is_yield_expression(ValaObjectCreationExpression * self)144 vala_object_creation_expression_get_is_yield_expression (ValaObjectCreationExpression* self)
145 {
146 gboolean result;
147 g_return_val_if_fail (self != NULL, FALSE);
148 result = self->priv->_is_yield_expression;
149 return result;
150 }
151
152 void
vala_object_creation_expression_set_is_yield_expression(ValaObjectCreationExpression * self,gboolean value)153 vala_object_creation_expression_set_is_yield_expression (ValaObjectCreationExpression* self,
154 gboolean value)
155 {
156 g_return_if_fail (self != NULL);
157 self->priv->_is_yield_expression = value;
158 }
159
160 gboolean
vala_object_creation_expression_get_struct_creation(ValaObjectCreationExpression * self)161 vala_object_creation_expression_get_struct_creation (ValaObjectCreationExpression* self)
162 {
163 gboolean result;
164 g_return_val_if_fail (self != NULL, FALSE);
165 result = self->priv->_struct_creation;
166 return result;
167 }
168
169 void
vala_object_creation_expression_set_struct_creation(ValaObjectCreationExpression * self,gboolean value)170 vala_object_creation_expression_set_struct_creation (ValaObjectCreationExpression* self,
171 gboolean value)
172 {
173 g_return_if_fail (self != NULL);
174 self->priv->_struct_creation = value;
175 }
176
177 /**
178 * Creates a new object creation expression.
179 *
180 * @param member_name object type to create
181 * @param source_reference reference to source code
182 * @return newly created object creation expression
183 */
184 ValaObjectCreationExpression*
vala_object_creation_expression_construct(GType object_type,ValaMemberAccess * member_name,ValaSourceReference * source_reference)185 vala_object_creation_expression_construct (GType object_type,
186 ValaMemberAccess* member_name,
187 ValaSourceReference* source_reference)
188 {
189 ValaObjectCreationExpression* self = NULL;
190 self = (ValaObjectCreationExpression*) vala_expression_construct (object_type);
191 vala_code_node_set_source_reference ((ValaCodeNode*) self, source_reference);
192 vala_object_creation_expression_set_member_name (self, member_name);
193 return self;
194 }
195
196 ValaObjectCreationExpression*
vala_object_creation_expression_new(ValaMemberAccess * member_name,ValaSourceReference * source_reference)197 vala_object_creation_expression_new (ValaMemberAccess* member_name,
198 ValaSourceReference* source_reference)
199 {
200 return vala_object_creation_expression_construct (VALA_TYPE_OBJECT_CREATION_EXPRESSION, member_name, source_reference);
201 }
202
203 /**
204 * Appends the specified expression to the list of arguments.
205 *
206 * @param arg an argument
207 */
208 void
vala_object_creation_expression_add_argument(ValaObjectCreationExpression * self,ValaExpression * arg)209 vala_object_creation_expression_add_argument (ValaObjectCreationExpression* self,
210 ValaExpression* arg)
211 {
212 ValaList* _tmp0_;
213 g_return_if_fail (self != NULL);
214 g_return_if_fail (arg != NULL);
215 _tmp0_ = self->priv->argument_list;
216 vala_collection_add ((ValaCollection*) _tmp0_, arg);
217 vala_code_node_set_parent_node ((ValaCodeNode*) arg, (ValaCodeNode*) self);
218 }
219
220 /**
221 * Returns the argument list.
222 *
223 * @return argument list
224 */
225 ValaList*
vala_object_creation_expression_get_argument_list(ValaObjectCreationExpression * self)226 vala_object_creation_expression_get_argument_list (ValaObjectCreationExpression* self)
227 {
228 ValaList* _tmp0_;
229 ValaList* result = NULL;
230 g_return_val_if_fail (self != NULL, NULL);
231 _tmp0_ = self->priv->argument_list;
232 result = _tmp0_;
233 return result;
234 }
235
236 /**
237 * Appends the specified member initializer to the object initializer.
238 *
239 * @param init a member initializer
240 */
241 void
vala_object_creation_expression_add_member_initializer(ValaObjectCreationExpression * self,ValaMemberInitializer * init)242 vala_object_creation_expression_add_member_initializer (ValaObjectCreationExpression* self,
243 ValaMemberInitializer* init)
244 {
245 ValaList* _tmp0_;
246 g_return_if_fail (self != NULL);
247 g_return_if_fail (init != NULL);
248 _tmp0_ = self->priv->object_initializer;
249 vala_collection_add ((ValaCollection*) _tmp0_, init);
250 vala_code_node_set_parent_node ((ValaCodeNode*) init, (ValaCodeNode*) self);
251 }
252
253 /**
254 * Returns the object initializer.
255 *
256 * @return member initializer list
257 */
258 ValaList*
vala_object_creation_expression_get_object_initializer(ValaObjectCreationExpression * self)259 vala_object_creation_expression_get_object_initializer (ValaObjectCreationExpression* self)
260 {
261 ValaList* _tmp0_;
262 ValaList* result = NULL;
263 g_return_val_if_fail (self != NULL, NULL);
264 _tmp0_ = self->priv->object_initializer;
265 result = _tmp0_;
266 return result;
267 }
268
269 static void
vala_object_creation_expression_real_accept(ValaCodeNode * base,ValaCodeVisitor * visitor)270 vala_object_creation_expression_real_accept (ValaCodeNode* base,
271 ValaCodeVisitor* visitor)
272 {
273 ValaObjectCreationExpression * self;
274 self = (ValaObjectCreationExpression*) base;
275 g_return_if_fail (visitor != NULL);
276 vala_code_visitor_visit_object_creation_expression (visitor, self);
277 vala_code_visitor_visit_expression (visitor, (ValaExpression*) self);
278 }
279
280 static gpointer
_vala_iterable_ref0(gpointer self)281 _vala_iterable_ref0 (gpointer self)
282 {
283 return self ? vala_iterable_ref (self) : NULL;
284 }
285
286 static void
vala_object_creation_expression_real_accept_children(ValaCodeNode * base,ValaCodeVisitor * visitor)287 vala_object_creation_expression_real_accept_children (ValaCodeNode* base,
288 ValaCodeVisitor* visitor)
289 {
290 ValaObjectCreationExpression * self;
291 ValaDataType* _tmp0_;
292 ValaDataType* _tmp1_;
293 ValaMemberAccess* _tmp4_;
294 ValaMemberAccess* _tmp5_;
295 self = (ValaObjectCreationExpression*) base;
296 g_return_if_fail (visitor != NULL);
297 _tmp0_ = vala_object_creation_expression_get_type_reference (self);
298 _tmp1_ = _tmp0_;
299 if (_tmp1_ != NULL) {
300 ValaDataType* _tmp2_;
301 ValaDataType* _tmp3_;
302 _tmp2_ = vala_object_creation_expression_get_type_reference (self);
303 _tmp3_ = _tmp2_;
304 vala_code_node_accept ((ValaCodeNode*) _tmp3_, visitor);
305 }
306 _tmp4_ = vala_object_creation_expression_get_member_name (self);
307 _tmp5_ = _tmp4_;
308 if (_tmp5_ != NULL) {
309 ValaMemberAccess* _tmp6_;
310 ValaMemberAccess* _tmp7_;
311 _tmp6_ = vala_object_creation_expression_get_member_name (self);
312 _tmp7_ = _tmp6_;
313 vala_code_node_accept ((ValaCodeNode*) _tmp7_, visitor);
314 }
315 {
316 ValaList* _arg_list = NULL;
317 ValaList* _tmp8_;
318 ValaList* _tmp9_;
319 gint _arg_size = 0;
320 ValaList* _tmp10_;
321 gint _tmp11_;
322 gint _tmp12_;
323 gint _arg_index = 0;
324 _tmp8_ = self->priv->argument_list;
325 _tmp9_ = _vala_iterable_ref0 (_tmp8_);
326 _arg_list = _tmp9_;
327 _tmp10_ = _arg_list;
328 _tmp11_ = vala_collection_get_size ((ValaCollection*) _tmp10_);
329 _tmp12_ = _tmp11_;
330 _arg_size = _tmp12_;
331 _arg_index = -1;
332 while (TRUE) {
333 gint _tmp13_;
334 gint _tmp14_;
335 ValaExpression* arg = NULL;
336 ValaList* _tmp15_;
337 gpointer _tmp16_;
338 ValaExpression* _tmp17_;
339 _arg_index = _arg_index + 1;
340 _tmp13_ = _arg_index;
341 _tmp14_ = _arg_size;
342 if (!(_tmp13_ < _tmp14_)) {
343 break;
344 }
345 _tmp15_ = _arg_list;
346 _tmp16_ = vala_list_get (_tmp15_, _arg_index);
347 arg = (ValaExpression*) _tmp16_;
348 _tmp17_ = arg;
349 vala_code_node_accept ((ValaCodeNode*) _tmp17_, visitor);
350 _vala_code_node_unref0 (arg);
351 }
352 _vala_iterable_unref0 (_arg_list);
353 }
354 {
355 ValaList* _init_list = NULL;
356 ValaList* _tmp18_;
357 ValaList* _tmp19_;
358 gint _init_size = 0;
359 ValaList* _tmp20_;
360 gint _tmp21_;
361 gint _tmp22_;
362 gint _init_index = 0;
363 _tmp18_ = self->priv->object_initializer;
364 _tmp19_ = _vala_iterable_ref0 (_tmp18_);
365 _init_list = _tmp19_;
366 _tmp20_ = _init_list;
367 _tmp21_ = vala_collection_get_size ((ValaCollection*) _tmp20_);
368 _tmp22_ = _tmp21_;
369 _init_size = _tmp22_;
370 _init_index = -1;
371 while (TRUE) {
372 gint _tmp23_;
373 gint _tmp24_;
374 ValaMemberInitializer* init = NULL;
375 ValaList* _tmp25_;
376 gpointer _tmp26_;
377 ValaMemberInitializer* _tmp27_;
378 _init_index = _init_index + 1;
379 _tmp23_ = _init_index;
380 _tmp24_ = _init_size;
381 if (!(_tmp23_ < _tmp24_)) {
382 break;
383 }
384 _tmp25_ = _init_list;
385 _tmp26_ = vala_list_get (_tmp25_, _init_index);
386 init = (ValaMemberInitializer*) _tmp26_;
387 _tmp27_ = init;
388 vala_code_node_accept ((ValaCodeNode*) _tmp27_, visitor);
389 _vala_code_node_unref0 (init);
390 }
391 _vala_iterable_unref0 (_init_list);
392 }
393 }
394
395 static void
vala_object_creation_expression_real_replace_expression(ValaCodeNode * base,ValaExpression * old_node,ValaExpression * new_node)396 vala_object_creation_expression_real_replace_expression (ValaCodeNode* base,
397 ValaExpression* old_node,
398 ValaExpression* new_node)
399 {
400 ValaObjectCreationExpression * self;
401 gint index = 0;
402 ValaList* _tmp0_;
403 self = (ValaObjectCreationExpression*) base;
404 g_return_if_fail (old_node != NULL);
405 g_return_if_fail (new_node != NULL);
406 _tmp0_ = self->priv->argument_list;
407 index = vala_list_index_of (_tmp0_, old_node);
408 if (index >= 0) {
409 ValaList* _tmp1_;
410 _tmp1_ = self->priv->argument_list;
411 vala_list_set (_tmp1_, index, new_node);
412 vala_code_node_set_parent_node ((ValaCodeNode*) new_node, (ValaCodeNode*) self);
413 }
414 }
415
416 static gboolean
vala_object_creation_expression_real_is_pure(ValaExpression * base)417 vala_object_creation_expression_real_is_pure (ValaExpression* base)
418 {
419 ValaObjectCreationExpression * self;
420 gboolean result = FALSE;
421 self = (ValaObjectCreationExpression*) base;
422 result = FALSE;
423 return result;
424 }
425
426 static gboolean
vala_object_creation_expression_real_is_accessible(ValaExpression * base,ValaSymbol * sym)427 vala_object_creation_expression_real_is_accessible (ValaExpression* base,
428 ValaSymbol* sym)
429 {
430 ValaObjectCreationExpression * self;
431 gboolean _tmp0_ = FALSE;
432 ValaMemberAccess* _tmp1_;
433 ValaMemberAccess* _tmp2_;
434 gboolean result = FALSE;
435 self = (ValaObjectCreationExpression*) base;
436 g_return_val_if_fail (sym != NULL, FALSE);
437 _tmp1_ = vala_object_creation_expression_get_member_name (self);
438 _tmp2_ = _tmp1_;
439 if (_tmp2_ != NULL) {
440 ValaMemberAccess* _tmp3_;
441 ValaMemberAccess* _tmp4_;
442 _tmp3_ = vala_object_creation_expression_get_member_name (self);
443 _tmp4_ = _tmp3_;
444 _tmp0_ = !vala_expression_is_accessible ((ValaExpression*) _tmp4_, sym);
445 } else {
446 _tmp0_ = FALSE;
447 }
448 if (_tmp0_) {
449 result = FALSE;
450 return result;
451 }
452 {
453 ValaList* _arg_list = NULL;
454 ValaList* _tmp5_;
455 ValaList* _tmp6_;
456 gint _arg_size = 0;
457 ValaList* _tmp7_;
458 gint _tmp8_;
459 gint _tmp9_;
460 gint _arg_index = 0;
461 _tmp5_ = self->priv->argument_list;
462 _tmp6_ = _vala_iterable_ref0 (_tmp5_);
463 _arg_list = _tmp6_;
464 _tmp7_ = _arg_list;
465 _tmp8_ = vala_collection_get_size ((ValaCollection*) _tmp7_);
466 _tmp9_ = _tmp8_;
467 _arg_size = _tmp9_;
468 _arg_index = -1;
469 while (TRUE) {
470 gint _tmp10_;
471 gint _tmp11_;
472 ValaExpression* arg = NULL;
473 ValaList* _tmp12_;
474 gpointer _tmp13_;
475 ValaExpression* _tmp14_;
476 _arg_index = _arg_index + 1;
477 _tmp10_ = _arg_index;
478 _tmp11_ = _arg_size;
479 if (!(_tmp10_ < _tmp11_)) {
480 break;
481 }
482 _tmp12_ = _arg_list;
483 _tmp13_ = vala_list_get (_tmp12_, _arg_index);
484 arg = (ValaExpression*) _tmp13_;
485 _tmp14_ = arg;
486 if (!vala_expression_is_accessible (_tmp14_, sym)) {
487 result = FALSE;
488 _vala_code_node_unref0 (arg);
489 _vala_iterable_unref0 (_arg_list);
490 return result;
491 }
492 _vala_code_node_unref0 (arg);
493 }
494 _vala_iterable_unref0 (_arg_list);
495 }
496 {
497 ValaList* _init_list = NULL;
498 ValaList* _tmp15_;
499 ValaList* _tmp16_;
500 gint _init_size = 0;
501 ValaList* _tmp17_;
502 gint _tmp18_;
503 gint _tmp19_;
504 gint _init_index = 0;
505 _tmp15_ = self->priv->object_initializer;
506 _tmp16_ = _vala_iterable_ref0 (_tmp15_);
507 _init_list = _tmp16_;
508 _tmp17_ = _init_list;
509 _tmp18_ = vala_collection_get_size ((ValaCollection*) _tmp17_);
510 _tmp19_ = _tmp18_;
511 _init_size = _tmp19_;
512 _init_index = -1;
513 while (TRUE) {
514 gint _tmp20_;
515 gint _tmp21_;
516 ValaMemberInitializer* init = NULL;
517 ValaList* _tmp22_;
518 gpointer _tmp23_;
519 ValaMemberInitializer* _tmp24_;
520 ValaExpression* _tmp25_;
521 ValaExpression* _tmp26_;
522 _init_index = _init_index + 1;
523 _tmp20_ = _init_index;
524 _tmp21_ = _init_size;
525 if (!(_tmp20_ < _tmp21_)) {
526 break;
527 }
528 _tmp22_ = _init_list;
529 _tmp23_ = vala_list_get (_tmp22_, _init_index);
530 init = (ValaMemberInitializer*) _tmp23_;
531 _tmp24_ = init;
532 _tmp25_ = vala_member_initializer_get_initializer (_tmp24_);
533 _tmp26_ = _tmp25_;
534 if (!vala_expression_is_accessible (_tmp26_, sym)) {
535 result = FALSE;
536 _vala_code_node_unref0 (init);
537 _vala_iterable_unref0 (_init_list);
538 return result;
539 }
540 _vala_code_node_unref0 (init);
541 }
542 _vala_iterable_unref0 (_init_list);
543 }
544 result = TRUE;
545 return result;
546 }
547
548 static void
vala_object_creation_expression_real_replace_type(ValaCodeNode * base,ValaDataType * old_type,ValaDataType * new_type)549 vala_object_creation_expression_real_replace_type (ValaCodeNode* base,
550 ValaDataType* old_type,
551 ValaDataType* new_type)
552 {
553 ValaObjectCreationExpression * self;
554 ValaDataType* _tmp0_;
555 ValaDataType* _tmp1_;
556 self = (ValaObjectCreationExpression*) base;
557 g_return_if_fail (old_type != NULL);
558 g_return_if_fail (new_type != NULL);
559 _tmp0_ = vala_object_creation_expression_get_type_reference (self);
560 _tmp1_ = _tmp0_;
561 if (_tmp1_ == old_type) {
562 vala_object_creation_expression_set_type_reference (self, new_type);
563 }
564 }
565
566 static gboolean
vala_object_creation_expression_real_check(ValaCodeNode * base,ValaCodeContext * context)567 vala_object_creation_expression_real_check (ValaCodeNode* base,
568 ValaCodeContext* context)
569 {
570 ValaObjectCreationExpression * self;
571 gboolean _tmp0_;
572 gboolean _tmp1_;
573 ValaMemberAccess* _tmp4_;
574 ValaMemberAccess* _tmp5_;
575 ValaTypeSymbol* type = NULL;
576 ValaDataType* _tmp8_;
577 ValaDataType* _tmp9_;
578 ValaDataType* _tmp111_;
579 ValaDataType* _tmp112_;
580 ValaDataType* _tmp113_;
581 ValaDataType* _tmp114_;
582 ValaDataType* _tmp115_;
583 ValaDataType* _tmp116_;
584 ValaTypeSymbol* _tmp117_;
585 ValaDataType* _tmp231_;
586 ValaDataType* _tmp232_;
587 gboolean _tmp233_ = FALSE;
588 ValaSymbol* _tmp234_;
589 ValaSymbol* _tmp235_;
590 ValaSymbol* _tmp246_;
591 ValaSymbol* _tmp247_;
592 ValaTypeSymbol* _tmp505_;
593 gboolean _tmp506_;
594 gboolean _tmp507_;
595 gboolean _tmp526_;
596 gboolean _tmp527_;
597 gboolean _tmp583_;
598 gboolean _tmp584_;
599 gboolean result = FALSE;
600 self = (ValaObjectCreationExpression*) base;
601 g_return_val_if_fail (context != NULL, FALSE);
602 _tmp0_ = vala_code_node_get_checked ((ValaCodeNode*) self);
603 _tmp1_ = _tmp0_;
604 if (_tmp1_) {
605 gboolean _tmp2_;
606 gboolean _tmp3_;
607 _tmp2_ = vala_code_node_get_error ((ValaCodeNode*) self);
608 _tmp3_ = _tmp2_;
609 result = !_tmp3_;
610 return result;
611 }
612 vala_code_node_set_checked ((ValaCodeNode*) self, TRUE);
613 _tmp4_ = vala_object_creation_expression_get_member_name (self);
614 _tmp5_ = _tmp4_;
615 if (_tmp5_ != NULL) {
616 ValaMemberAccess* _tmp6_;
617 ValaMemberAccess* _tmp7_;
618 _tmp6_ = vala_object_creation_expression_get_member_name (self);
619 _tmp7_ = _tmp6_;
620 if (!vala_code_node_check ((ValaCodeNode*) _tmp7_, context)) {
621 vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
622 result = FALSE;
623 return result;
624 }
625 }
626 _tmp8_ = vala_object_creation_expression_get_type_reference (self);
627 _tmp9_ = _tmp8_;
628 if (_tmp9_ == NULL) {
629 ValaMemberAccess* _tmp10_;
630 ValaMemberAccess* _tmp11_;
631 ValaMemberAccess* _tmp14_;
632 ValaMemberAccess* _tmp15_;
633 ValaSymbol* _tmp16_;
634 ValaSymbol* _tmp17_;
635 ValaSymbol* constructor_sym = NULL;
636 ValaMemberAccess* _tmp18_;
637 ValaMemberAccess* _tmp19_;
638 ValaSymbol* _tmp20_;
639 ValaSymbol* _tmp21_;
640 ValaSymbol* _tmp22_;
641 ValaSymbol* type_sym = NULL;
642 ValaMemberAccess* _tmp23_;
643 ValaMemberAccess* _tmp24_;
644 ValaSymbol* _tmp25_;
645 ValaSymbol* _tmp26_;
646 ValaSymbol* _tmp27_;
647 ValaList* type_args = NULL;
648 ValaMemberAccess* _tmp28_;
649 ValaMemberAccess* _tmp29_;
650 ValaList* _tmp30_;
651 ValaList* _tmp31_;
652 ValaSymbol* _tmp32_;
653 ValaSymbol* _tmp56_;
654 _tmp10_ = vala_object_creation_expression_get_member_name (self);
655 _tmp11_ = _tmp10_;
656 if (_tmp11_ == NULL) {
657 ValaSourceReference* _tmp12_;
658 ValaSourceReference* _tmp13_;
659 vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
660 _tmp12_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
661 _tmp13_ = _tmp12_;
662 vala_report_error (_tmp13_, "Incomplete object creation expression");
663 result = FALSE;
664 _vala_code_node_unref0 (type);
665 return result;
666 }
667 _tmp14_ = vala_object_creation_expression_get_member_name (self);
668 _tmp15_ = _tmp14_;
669 _tmp16_ = vala_expression_get_symbol_reference ((ValaExpression*) _tmp15_);
670 _tmp17_ = _tmp16_;
671 if (_tmp17_ == NULL) {
672 vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
673 result = FALSE;
674 _vala_code_node_unref0 (type);
675 return result;
676 }
677 _tmp18_ = vala_object_creation_expression_get_member_name (self);
678 _tmp19_ = _tmp18_;
679 _tmp20_ = vala_expression_get_symbol_reference ((ValaExpression*) _tmp19_);
680 _tmp21_ = _tmp20_;
681 _tmp22_ = _vala_code_node_ref0 (_tmp21_);
682 constructor_sym = _tmp22_;
683 _tmp23_ = vala_object_creation_expression_get_member_name (self);
684 _tmp24_ = _tmp23_;
685 _tmp25_ = vala_expression_get_symbol_reference ((ValaExpression*) _tmp24_);
686 _tmp26_ = _tmp25_;
687 _tmp27_ = _vala_code_node_ref0 (_tmp26_);
688 type_sym = _tmp27_;
689 _tmp28_ = vala_object_creation_expression_get_member_name (self);
690 _tmp29_ = _tmp28_;
691 _tmp30_ = vala_member_access_get_type_arguments (_tmp29_);
692 _tmp31_ = _vala_iterable_ref0 (_tmp30_);
693 type_args = _tmp31_;
694 _tmp32_ = constructor_sym;
695 if (VALA_IS_METHOD (_tmp32_)) {
696 ValaSymbol* _tmp33_;
697 ValaSymbol* _tmp34_;
698 ValaSymbol* _tmp35_;
699 ValaSymbol* _tmp36_;
700 ValaMethod* constructor = NULL;
701 ValaSymbol* _tmp37_;
702 ValaMethod* _tmp38_;
703 ValaSymbol* _tmp39_;
704 ValaMethod* _tmp47_;
705 ValaMemberAccess* ma = NULL;
706 ValaMemberAccess* _tmp48_;
707 ValaMemberAccess* _tmp49_;
708 ValaExpression* _tmp50_;
709 ValaExpression* _tmp51_;
710 ValaMemberAccess* _tmp52_;
711 _tmp33_ = constructor_sym;
712 _tmp34_ = vala_symbol_get_parent_symbol (_tmp33_);
713 _tmp35_ = _tmp34_;
714 _tmp36_ = _vala_code_node_ref0 (_tmp35_);
715 _vala_code_node_unref0 (type_sym);
716 type_sym = _tmp36_;
717 _tmp37_ = constructor_sym;
718 _tmp38_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp37_, VALA_TYPE_METHOD, ValaMethod));
719 constructor = _tmp38_;
720 _tmp39_ = constructor_sym;
721 if (!VALA_IS_CREATION_METHOD (_tmp39_)) {
722 ValaSourceReference* _tmp40_;
723 ValaSourceReference* _tmp41_;
724 ValaMethod* _tmp42_;
725 gchar* _tmp43_;
726 gchar* _tmp44_;
727 gchar* _tmp45_;
728 gchar* _tmp46_;
729 vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
730 _tmp40_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
731 _tmp41_ = _tmp40_;
732 _tmp42_ = constructor;
733 _tmp43_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp42_);
734 _tmp44_ = _tmp43_;
735 _tmp45_ = g_strdup_printf ("`%s' is not a creation method", _tmp44_);
736 _tmp46_ = _tmp45_;
737 vala_report_error (_tmp41_, _tmp46_);
738 _g_free0 (_tmp46_);
739 _g_free0 (_tmp44_);
740 result = FALSE;
741 _vala_code_node_unref0 (constructor);
742 _vala_iterable_unref0 (type_args);
743 _vala_code_node_unref0 (type_sym);
744 _vala_code_node_unref0 (constructor_sym);
745 _vala_code_node_unref0 (type);
746 return result;
747 }
748 _tmp47_ = constructor;
749 vala_expression_set_symbol_reference ((ValaExpression*) self, (ValaSymbol*) _tmp47_);
750 _tmp48_ = vala_object_creation_expression_get_member_name (self);
751 _tmp49_ = _tmp48_;
752 _tmp50_ = vala_member_access_get_inner (_tmp49_);
753 _tmp51_ = _tmp50_;
754 ma = VALA_IS_MEMBER_ACCESS (_tmp51_) ? ((ValaMemberAccess*) _tmp51_) : NULL;
755 _tmp52_ = ma;
756 if (_tmp52_ != NULL) {
757 ValaMemberAccess* _tmp53_;
758 ValaList* _tmp54_;
759 ValaList* _tmp55_;
760 _tmp53_ = ma;
761 _tmp54_ = vala_member_access_get_type_arguments (_tmp53_);
762 _tmp55_ = _vala_iterable_ref0 (_tmp54_);
763 _vala_iterable_unref0 (type_args);
764 type_args = _tmp55_;
765 }
766 _vala_code_node_unref0 (constructor);
767 }
768 _tmp56_ = type_sym;
769 if (VALA_IS_CLASS (_tmp56_)) {
770 ValaSymbol* _tmp57_;
771 ValaTypeSymbol* _tmp58_;
772 ValaTypeSymbol* _tmp59_;
773 gboolean _tmp60_;
774 gboolean _tmp61_;
775 _tmp57_ = type_sym;
776 _tmp58_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp57_, VALA_TYPE_TYPESYMBOL, ValaTypeSymbol));
777 _vala_code_node_unref0 (type);
778 type = _tmp58_;
779 _tmp59_ = type;
780 _tmp60_ = vala_class_get_is_error_base (G_TYPE_CHECK_INSTANCE_CAST (_tmp59_, VALA_TYPE_CLASS, ValaClass));
781 _tmp61_ = _tmp60_;
782 if (_tmp61_) {
783 ValaSourceReference* _tmp62_;
784 ValaSourceReference* _tmp63_;
785 ValaErrorType* _tmp64_;
786 ValaErrorType* _tmp65_;
787 _tmp62_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
788 _tmp63_ = _tmp62_;
789 _tmp64_ = vala_error_type_new (NULL, NULL, _tmp63_);
790 _tmp65_ = _tmp64_;
791 vala_object_creation_expression_set_type_reference (self, (ValaDataType*) _tmp65_);
792 _vala_code_node_unref0 (_tmp65_);
793 } else {
794 ValaTypeSymbol* _tmp66_;
795 ValaObjectType* _tmp67_;
796 ValaObjectType* _tmp68_;
797 _tmp66_ = type;
798 _tmp67_ = vala_object_type_new ((ValaObjectTypeSymbol*) G_TYPE_CHECK_INSTANCE_CAST (_tmp66_, VALA_TYPE_CLASS, ValaClass));
799 _tmp68_ = _tmp67_;
800 vala_object_creation_expression_set_type_reference (self, (ValaDataType*) _tmp68_);
801 _vala_code_node_unref0 (_tmp68_);
802 }
803 } else {
804 ValaSymbol* _tmp69_;
805 _tmp69_ = type_sym;
806 if (VALA_IS_STRUCT (_tmp69_)) {
807 ValaSymbol* _tmp70_;
808 ValaTypeSymbol* _tmp71_;
809 ValaTypeSymbol* _tmp72_;
810 ValaStructValueType* _tmp73_;
811 ValaStructValueType* _tmp74_;
812 _tmp70_ = type_sym;
813 _tmp71_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp70_, VALA_TYPE_TYPESYMBOL, ValaTypeSymbol));
814 _vala_code_node_unref0 (type);
815 type = _tmp71_;
816 _tmp72_ = type;
817 _tmp73_ = vala_struct_value_type_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp72_, VALA_TYPE_STRUCT, ValaStruct));
818 _tmp74_ = _tmp73_;
819 vala_object_creation_expression_set_type_reference (self, (ValaDataType*) _tmp74_);
820 _vala_code_node_unref0 (_tmp74_);
821 } else {
822 ValaSymbol* _tmp75_;
823 _tmp75_ = type_sym;
824 if (VALA_IS_ERROR_CODE (_tmp75_)) {
825 ValaSymbol* _tmp76_;
826 ValaTypeSymbol* _tmp77_;
827 ValaSymbol* _tmp78_;
828 ValaSymbol* _tmp79_;
829 ValaSymbol* _tmp80_;
830 ValaSymbol* _tmp81_;
831 ValaSourceReference* _tmp82_;
832 ValaSourceReference* _tmp83_;
833 ValaErrorType* _tmp84_;
834 ValaErrorType* _tmp85_;
835 ValaSymbol* _tmp86_;
836 _tmp76_ = type_sym;
837 _tmp77_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp76_, VALA_TYPE_TYPESYMBOL, ValaTypeSymbol));
838 _vala_code_node_unref0 (type);
839 type = _tmp77_;
840 _tmp78_ = type_sym;
841 _tmp79_ = vala_symbol_get_parent_symbol (_tmp78_);
842 _tmp80_ = _tmp79_;
843 _tmp81_ = type_sym;
844 _tmp82_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
845 _tmp83_ = _tmp82_;
846 _tmp84_ = vala_error_type_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp80_, VALA_TYPE_ERROR_DOMAIN, ValaErrorDomain), G_TYPE_CHECK_INSTANCE_CAST (_tmp81_, VALA_TYPE_ERROR_CODE, ValaErrorCode), _tmp83_);
847 _tmp85_ = _tmp84_;
848 vala_object_creation_expression_set_type_reference (self, (ValaDataType*) _tmp85_);
849 _vala_code_node_unref0 (_tmp85_);
850 _tmp86_ = type_sym;
851 vala_expression_set_symbol_reference ((ValaExpression*) self, _tmp86_);
852 } else {
853 ValaSourceReference* _tmp87_;
854 ValaSourceReference* _tmp88_;
855 ValaSymbol* _tmp89_;
856 gchar* _tmp90_;
857 gchar* _tmp91_;
858 gchar* _tmp92_;
859 gchar* _tmp93_;
860 vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
861 _tmp87_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
862 _tmp88_ = _tmp87_;
863 _tmp89_ = type_sym;
864 _tmp90_ = vala_symbol_get_full_name (_tmp89_);
865 _tmp91_ = _tmp90_;
866 _tmp92_ = g_strdup_printf ("`%s' is not a class, struct, or error code", _tmp91_);
867 _tmp93_ = _tmp92_;
868 vala_report_error (_tmp88_, _tmp93_);
869 _g_free0 (_tmp93_);
870 _g_free0 (_tmp91_);
871 result = FALSE;
872 _vala_iterable_unref0 (type_args);
873 _vala_code_node_unref0 (type_sym);
874 _vala_code_node_unref0 (constructor_sym);
875 _vala_code_node_unref0 (type);
876 return result;
877 }
878 }
879 }
880 {
881 ValaList* _type_arg_list = NULL;
882 ValaList* _tmp94_;
883 ValaList* _tmp95_;
884 gint _type_arg_size = 0;
885 ValaList* _tmp96_;
886 gint _tmp97_;
887 gint _tmp98_;
888 gint _type_arg_index = 0;
889 _tmp94_ = type_args;
890 _tmp95_ = _vala_iterable_ref0 (_tmp94_);
891 _type_arg_list = _tmp95_;
892 _tmp96_ = _type_arg_list;
893 _tmp97_ = vala_collection_get_size ((ValaCollection*) _tmp96_);
894 _tmp98_ = _tmp97_;
895 _type_arg_size = _tmp98_;
896 _type_arg_index = -1;
897 while (TRUE) {
898 gint _tmp99_;
899 gint _tmp100_;
900 ValaDataType* type_arg = NULL;
901 ValaList* _tmp101_;
902 gpointer _tmp102_;
903 ValaDataType* _tmp103_;
904 ValaDataType* _tmp104_;
905 ValaDataType* _tmp105_;
906 _type_arg_index = _type_arg_index + 1;
907 _tmp99_ = _type_arg_index;
908 _tmp100_ = _type_arg_size;
909 if (!(_tmp99_ < _tmp100_)) {
910 break;
911 }
912 _tmp101_ = _type_arg_list;
913 _tmp102_ = vala_list_get (_tmp101_, _type_arg_index);
914 type_arg = (ValaDataType*) _tmp102_;
915 _tmp103_ = vala_object_creation_expression_get_type_reference (self);
916 _tmp104_ = _tmp103_;
917 _tmp105_ = type_arg;
918 vala_data_type_add_type_argument (_tmp104_, _tmp105_);
919 _vala_code_node_unref0 (type_arg);
920 }
921 _vala_iterable_unref0 (_type_arg_list);
922 }
923 _vala_iterable_unref0 (type_args);
924 _vala_code_node_unref0 (type_sym);
925 _vala_code_node_unref0 (constructor_sym);
926 } else {
927 ValaDataType* _tmp106_;
928 ValaDataType* _tmp107_;
929 ValaTypeSymbol* _tmp108_;
930 ValaTypeSymbol* _tmp109_;
931 ValaTypeSymbol* _tmp110_;
932 _tmp106_ = vala_object_creation_expression_get_type_reference (self);
933 _tmp107_ = _tmp106_;
934 _tmp108_ = vala_data_type_get_type_symbol (_tmp107_);
935 _tmp109_ = _tmp108_;
936 _tmp110_ = _vala_code_node_ref0 (_tmp109_);
937 _vala_code_node_unref0 (type);
938 type = _tmp110_;
939 }
940 _tmp111_ = vala_object_creation_expression_get_type_reference (self);
941 _tmp112_ = _tmp111_;
942 _tmp113_ = vala_data_type_copy (_tmp112_);
943 _tmp114_ = _tmp113_;
944 vala_expression_set_value_type ((ValaExpression*) self, _tmp114_);
945 _vala_code_node_unref0 (_tmp114_);
946 _tmp115_ = vala_expression_get_value_type ((ValaExpression*) self);
947 _tmp116_ = _tmp115_;
948 vala_data_type_set_value_owned (_tmp116_, TRUE);
949 _tmp117_ = type;
950 if (VALA_IS_CLASS (_tmp117_)) {
951 ValaClass* cl = NULL;
952 ValaTypeSymbol* _tmp118_;
953 ValaClass* _tmp119_;
954 gboolean _tmp120_;
955 ValaClass* _tmp123_;
956 gboolean _tmp124_;
957 gboolean _tmp125_;
958 ValaSymbol* _tmp133_;
959 ValaSymbol* _tmp134_;
960 gboolean _tmp155_ = FALSE;
961 ValaSymbol* _tmp156_;
962 ValaSymbol* _tmp157_;
963 _tmp118_ = type;
964 _tmp119_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp118_, VALA_TYPE_CLASS, ValaClass));
965 cl = _tmp119_;
966 _tmp120_ = self->priv->_struct_creation;
967 if (_tmp120_) {
968 ValaSourceReference* _tmp121_;
969 ValaSourceReference* _tmp122_;
970 vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
971 _tmp121_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
972 _tmp122_ = _tmp121_;
973 vala_report_error (_tmp122_, "syntax error, use `new' to create new objects");
974 result = FALSE;
975 _vala_code_node_unref0 (cl);
976 _vala_code_node_unref0 (type);
977 return result;
978 }
979 _tmp123_ = cl;
980 _tmp124_ = vala_class_get_is_abstract (_tmp123_);
981 _tmp125_ = _tmp124_;
982 if (_tmp125_) {
983 ValaSourceReference* _tmp126_;
984 ValaSourceReference* _tmp127_;
985 ValaClass* _tmp128_;
986 gchar* _tmp129_;
987 gchar* _tmp130_;
988 gchar* _tmp131_;
989 gchar* _tmp132_;
990 vala_expression_set_value_type ((ValaExpression*) self, NULL);
991 vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
992 _tmp126_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
993 _tmp127_ = _tmp126_;
994 _tmp128_ = cl;
995 _tmp129_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp128_);
996 _tmp130_ = _tmp129_;
997 _tmp131_ = g_strdup_printf ("Can't create instance of abstract class `%s'", _tmp130_);
998 _tmp132_ = _tmp131_;
999 vala_report_error (_tmp127_, _tmp132_);
1000 _g_free0 (_tmp132_);
1001 _g_free0 (_tmp130_);
1002 result = FALSE;
1003 _vala_code_node_unref0 (cl);
1004 _vala_code_node_unref0 (type);
1005 return result;
1006 }
1007 _tmp133_ = vala_expression_get_symbol_reference ((ValaExpression*) self);
1008 _tmp134_ = _tmp133_;
1009 if (_tmp134_ == NULL) {
1010 ValaClass* _tmp135_;
1011 ValaCreationMethod* _tmp136_;
1012 ValaCreationMethod* _tmp137_;
1013 ValaSymbol* _tmp138_;
1014 ValaSymbol* _tmp139_;
1015 ValaSymbol* _tmp147_;
1016 ValaSymbol* _tmp148_;
1017 ValaSymbol* _tmp149_;
1018 ValaSymbol* _tmp150_;
1019 ValaVersionAttribute* _tmp151_;
1020 ValaVersionAttribute* _tmp152_;
1021 ValaSourceReference* _tmp153_;
1022 ValaSourceReference* _tmp154_;
1023 _tmp135_ = cl;
1024 _tmp136_ = vala_class_get_default_construction_method (_tmp135_);
1025 _tmp137_ = _tmp136_;
1026 vala_expression_set_symbol_reference ((ValaExpression*) self, (ValaSymbol*) _tmp137_);
1027 _tmp138_ = vala_expression_get_symbol_reference ((ValaExpression*) self);
1028 _tmp139_ = _tmp138_;
1029 if (_tmp139_ == NULL) {
1030 ValaSourceReference* _tmp140_;
1031 ValaSourceReference* _tmp141_;
1032 ValaClass* _tmp142_;
1033 gchar* _tmp143_;
1034 gchar* _tmp144_;
1035 gchar* _tmp145_;
1036 gchar* _tmp146_;
1037 vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
1038 _tmp140_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
1039 _tmp141_ = _tmp140_;
1040 _tmp142_ = cl;
1041 _tmp143_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp142_);
1042 _tmp144_ = _tmp143_;
1043 _tmp145_ = g_strdup_printf ("`%s' does not have a default constructor", _tmp144_);
1044 _tmp146_ = _tmp145_;
1045 vala_report_error (_tmp141_, _tmp146_);
1046 _g_free0 (_tmp146_);
1047 _g_free0 (_tmp144_);
1048 result = FALSE;
1049 _vala_code_node_unref0 (cl);
1050 _vala_code_node_unref0 (type);
1051 return result;
1052 }
1053 _tmp147_ = vala_expression_get_symbol_reference ((ValaExpression*) self);
1054 _tmp148_ = _tmp147_;
1055 vala_symbol_set_used (_tmp148_, TRUE);
1056 _tmp149_ = vala_expression_get_symbol_reference ((ValaExpression*) self);
1057 _tmp150_ = _tmp149_;
1058 _tmp151_ = vala_symbol_get_version (_tmp150_);
1059 _tmp152_ = _tmp151_;
1060 _tmp153_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
1061 _tmp154_ = _tmp153_;
1062 vala_version_attribute_check (_tmp152_, _tmp154_);
1063 }
1064 _tmp156_ = vala_expression_get_symbol_reference ((ValaExpression*) self);
1065 _tmp157_ = _tmp156_;
1066 if (_tmp157_ != NULL) {
1067 gboolean _tmp158_ = FALSE;
1068 ValaSymbol* _tmp159_;
1069 ValaSymbol* _tmp160_;
1070 ValaSymbolAccessibility _tmp161_;
1071 ValaSymbolAccessibility _tmp162_;
1072 _tmp159_ = vala_expression_get_symbol_reference ((ValaExpression*) self);
1073 _tmp160_ = _tmp159_;
1074 _tmp161_ = vala_symbol_get_access (_tmp160_);
1075 _tmp162_ = _tmp161_;
1076 if (_tmp162_ == VALA_SYMBOL_ACCESSIBILITY_PRIVATE) {
1077 _tmp158_ = TRUE;
1078 } else {
1079 ValaSymbol* _tmp163_;
1080 ValaSymbol* _tmp164_;
1081 ValaSymbolAccessibility _tmp165_;
1082 ValaSymbolAccessibility _tmp166_;
1083 _tmp163_ = vala_expression_get_symbol_reference ((ValaExpression*) self);
1084 _tmp164_ = _tmp163_;
1085 _tmp165_ = vala_symbol_get_access (_tmp164_);
1086 _tmp166_ = _tmp165_;
1087 _tmp158_ = _tmp166_ == VALA_SYMBOL_ACCESSIBILITY_PROTECTED;
1088 }
1089 _tmp155_ = _tmp158_;
1090 } else {
1091 _tmp155_ = FALSE;
1092 }
1093 if (_tmp155_) {
1094 gboolean in_target_type = FALSE;
1095 in_target_type = FALSE;
1096 {
1097 ValaSymbol* this_symbol = NULL;
1098 ValaSemanticAnalyzer* _tmp167_;
1099 ValaSemanticAnalyzer* _tmp168_;
1100 ValaSymbol* _tmp169_;
1101 ValaSymbol* _tmp170_;
1102 ValaSymbol* _tmp171_;
1103 _tmp167_ = vala_code_context_get_analyzer (context);
1104 _tmp168_ = _tmp167_;
1105 _tmp169_ = vala_semantic_analyzer_get_current_symbol (_tmp168_);
1106 _tmp170_ = _tmp169_;
1107 _tmp171_ = _vala_code_node_ref0 (_tmp170_);
1108 this_symbol = _tmp171_;
1109 {
1110 gboolean _tmp172_ = FALSE;
1111 _tmp172_ = TRUE;
1112 while (TRUE) {
1113 ValaSymbol* _tmp177_;
1114 ValaSymbol* _tmp178_;
1115 ValaClass* _tmp179_;
1116 if (!_tmp172_) {
1117 ValaSymbol* _tmp173_;
1118 ValaSymbol* _tmp174_;
1119 ValaSymbol* _tmp175_;
1120 ValaSymbol* _tmp176_;
1121 _tmp173_ = this_symbol;
1122 _tmp174_ = vala_symbol_get_parent_symbol (_tmp173_);
1123 _tmp175_ = _tmp174_;
1124 _tmp176_ = _vala_code_node_ref0 (_tmp175_);
1125 _vala_code_node_unref0 (this_symbol);
1126 this_symbol = _tmp176_;
1127 }
1128 _tmp172_ = FALSE;
1129 _tmp177_ = this_symbol;
1130 if (!(_tmp177_ != NULL)) {
1131 break;
1132 }
1133 _tmp178_ = this_symbol;
1134 _tmp179_ = cl;
1135 if (_tmp178_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp179_, VALA_TYPE_SYMBOL, ValaSymbol)) {
1136 in_target_type = TRUE;
1137 break;
1138 }
1139 }
1140 }
1141 _vala_code_node_unref0 (this_symbol);
1142 }
1143 if (!in_target_type) {
1144 ValaSourceReference* _tmp180_;
1145 ValaSourceReference* _tmp181_;
1146 ValaSymbol* _tmp182_;
1147 ValaSymbol* _tmp183_;
1148 gchar* _tmp184_;
1149 gchar* _tmp185_;
1150 gchar* _tmp186_;
1151 gchar* _tmp187_;
1152 vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
1153 _tmp180_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
1154 _tmp181_ = _tmp180_;
1155 _tmp182_ = vala_expression_get_symbol_reference ((ValaExpression*) self);
1156 _tmp183_ = _tmp182_;
1157 _tmp184_ = vala_symbol_get_full_name (_tmp183_);
1158 _tmp185_ = _tmp184_;
1159 _tmp186_ = g_strdup_printf ("Access to non-public constructor `%s' denied", _tmp185_);
1160 _tmp187_ = _tmp186_;
1161 vala_report_error (_tmp181_, _tmp187_);
1162 _g_free0 (_tmp187_);
1163 _g_free0 (_tmp185_);
1164 result = FALSE;
1165 _vala_code_node_unref0 (cl);
1166 _vala_code_node_unref0 (type);
1167 return result;
1168 }
1169 }
1170 while (TRUE) {
1171 ValaClass* _tmp188_;
1172 ValaClass* _tmp189_;
1173 gchar* _tmp190_;
1174 gchar* _tmp191_;
1175 gboolean _tmp192_;
1176 ValaClass* _tmp195_;
1177 ValaClass* _tmp196_;
1178 ValaClass* _tmp197_;
1179 ValaClass* _tmp198_;
1180 _tmp188_ = cl;
1181 if (!(_tmp188_ != NULL)) {
1182 break;
1183 }
1184 _tmp189_ = cl;
1185 _tmp190_ = vala_code_node_get_attribute_string ((ValaCodeNode*) _tmp189_, "CCode", "ref_sink_function", NULL);
1186 _tmp191_ = _tmp190_;
1187 _tmp192_ = _tmp191_ != NULL;
1188 _g_free0 (_tmp191_);
1189 if (_tmp192_) {
1190 ValaDataType* _tmp193_;
1191 ValaDataType* _tmp194_;
1192 _tmp193_ = vala_expression_get_value_type ((ValaExpression*) self);
1193 _tmp194_ = _tmp193_;
1194 vala_data_type_set_floating_reference (_tmp194_, TRUE);
1195 break;
1196 }
1197 _tmp195_ = cl;
1198 _tmp196_ = vala_class_get_base_class (_tmp195_);
1199 _tmp197_ = _tmp196_;
1200 _tmp198_ = _vala_code_node_ref0 (_tmp197_);
1201 _vala_code_node_unref0 (cl);
1202 cl = _tmp198_;
1203 }
1204 _vala_code_node_unref0 (cl);
1205 } else {
1206 ValaTypeSymbol* _tmp199_;
1207 _tmp199_ = type;
1208 if (VALA_IS_STRUCT (_tmp199_)) {
1209 ValaStruct* st = NULL;
1210 ValaTypeSymbol* _tmp200_;
1211 ValaStruct* _tmp201_;
1212 gboolean _tmp202_ = FALSE;
1213 gboolean _tmp203_;
1214 ValaSymbol* _tmp208_;
1215 ValaSymbol* _tmp209_;
1216 gboolean _tmp213_ = FALSE;
1217 gboolean _tmp214_ = FALSE;
1218 gboolean _tmp215_ = FALSE;
1219 ValaProfile _tmp216_;
1220 ValaProfile _tmp217_;
1221 _tmp200_ = type;
1222 _tmp201_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp200_, VALA_TYPE_STRUCT, ValaStruct));
1223 st = _tmp201_;
1224 _tmp203_ = self->priv->_struct_creation;
1225 if (!_tmp203_) {
1226 gboolean _tmp204_;
1227 gboolean _tmp205_;
1228 _tmp204_ = vala_code_context_get_deprecated (context);
1229 _tmp205_ = _tmp204_;
1230 _tmp202_ = !_tmp205_;
1231 } else {
1232 _tmp202_ = FALSE;
1233 }
1234 if (_tmp202_) {
1235 ValaSourceReference* _tmp206_;
1236 ValaSourceReference* _tmp207_;
1237 _tmp206_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
1238 _tmp207_ = _tmp206_;
1239 vala_report_warning (_tmp207_, "deprecated syntax, don't use `new' to initialize structs");
1240 }
1241 _tmp208_ = vala_expression_get_symbol_reference ((ValaExpression*) self);
1242 _tmp209_ = _tmp208_;
1243 if (_tmp209_ == NULL) {
1244 ValaStruct* _tmp210_;
1245 ValaCreationMethod* _tmp211_;
1246 ValaCreationMethod* _tmp212_;
1247 _tmp210_ = st;
1248 _tmp211_ = vala_struct_get_default_construction_method (_tmp210_);
1249 _tmp212_ = _tmp211_;
1250 vala_expression_set_symbol_reference ((ValaExpression*) self, (ValaSymbol*) _tmp212_);
1251 }
1252 _tmp216_ = vala_code_context_get_profile (context);
1253 _tmp217_ = _tmp216_;
1254 if (_tmp217_ == VALA_PROFILE_GOBJECT) {
1255 ValaStruct* _tmp218_;
1256 _tmp218_ = st;
1257 _tmp215_ = vala_struct_is_simple_type (_tmp218_);
1258 } else {
1259 _tmp215_ = FALSE;
1260 }
1261 if (_tmp215_) {
1262 ValaSymbol* _tmp219_;
1263 ValaSymbol* _tmp220_;
1264 _tmp219_ = vala_expression_get_symbol_reference ((ValaExpression*) self);
1265 _tmp220_ = _tmp219_;
1266 _tmp214_ = _tmp220_ == NULL;
1267 } else {
1268 _tmp214_ = FALSE;
1269 }
1270 if (_tmp214_) {
1271 ValaList* _tmp221_;
1272 gint _tmp222_;
1273 gint _tmp223_;
1274 _tmp221_ = self->priv->object_initializer;
1275 _tmp222_ = vala_collection_get_size ((ValaCollection*) _tmp221_);
1276 _tmp223_ = _tmp222_;
1277 _tmp213_ = _tmp223_ == 0;
1278 } else {
1279 _tmp213_ = FALSE;
1280 }
1281 if (_tmp213_) {
1282 ValaSourceReference* _tmp224_;
1283 ValaSourceReference* _tmp225_;
1284 ValaStruct* _tmp226_;
1285 gchar* _tmp227_;
1286 gchar* _tmp228_;
1287 gchar* _tmp229_;
1288 gchar* _tmp230_;
1289 vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
1290 _tmp224_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
1291 _tmp225_ = _tmp224_;
1292 _tmp226_ = st;
1293 _tmp227_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp226_);
1294 _tmp228_ = _tmp227_;
1295 _tmp229_ = g_strdup_printf ("`%s' does not have a default constructor", _tmp228_);
1296 _tmp230_ = _tmp229_;
1297 vala_report_error (_tmp225_, _tmp230_);
1298 _g_free0 (_tmp230_);
1299 _g_free0 (_tmp228_);
1300 result = FALSE;
1301 _vala_code_node_unref0 (st);
1302 _vala_code_node_unref0 (type);
1303 return result;
1304 }
1305 _vala_code_node_unref0 (st);
1306 }
1307 }
1308 _tmp231_ = vala_object_creation_expression_get_type_reference (self);
1309 _tmp232_ = _tmp231_;
1310 if (!vala_data_type_check_type_arguments (_tmp232_, context, FALSE)) {
1311 vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
1312 result = FALSE;
1313 _vala_code_node_unref0 (type);
1314 return result;
1315 }
1316 _tmp234_ = vala_expression_get_symbol_reference ((ValaExpression*) self);
1317 _tmp235_ = _tmp234_;
1318 if (_tmp235_ == NULL) {
1319 ValaList* _tmp236_;
1320 gint _tmp237_;
1321 gint _tmp238_;
1322 _tmp236_ = self->priv->argument_list;
1323 _tmp237_ = vala_collection_get_size ((ValaCollection*) _tmp236_);
1324 _tmp238_ = _tmp237_;
1325 _tmp233_ = _tmp238_ != 0;
1326 } else {
1327 _tmp233_ = FALSE;
1328 }
1329 if (_tmp233_) {
1330 ValaSourceReference* _tmp239_;
1331 ValaSourceReference* _tmp240_;
1332 ValaTypeSymbol* _tmp241_;
1333 gchar* _tmp242_;
1334 gchar* _tmp243_;
1335 gchar* _tmp244_;
1336 gchar* _tmp245_;
1337 vala_expression_set_value_type ((ValaExpression*) self, NULL);
1338 vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
1339 _tmp239_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
1340 _tmp240_ = _tmp239_;
1341 _tmp241_ = type;
1342 _tmp242_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp241_);
1343 _tmp243_ = _tmp242_;
1344 _tmp244_ = g_strdup_printf ("No arguments allowed when constructing type `%s'", _tmp243_);
1345 _tmp245_ = _tmp244_;
1346 vala_report_error (_tmp240_, _tmp245_);
1347 _g_free0 (_tmp245_);
1348 _g_free0 (_tmp243_);
1349 result = FALSE;
1350 _vala_code_node_unref0 (type);
1351 return result;
1352 }
1353 _tmp246_ = vala_expression_get_symbol_reference ((ValaExpression*) self);
1354 _tmp247_ = _tmp246_;
1355 if (VALA_IS_METHOD (_tmp247_)) {
1356 ValaMethod* m = NULL;
1357 ValaSymbol* _tmp248_;
1358 ValaSymbol* _tmp249_;
1359 ValaMethod* _tmp250_;
1360 gboolean _tmp251_;
1361 ValaExpression* last_arg = NULL;
1362 ValaIterator* arg_it = NULL;
1363 ValaList* _tmp276_;
1364 ValaIterator* _tmp277_;
1365 ValaMethod* _tmp329_;
1366 gboolean _tmp330_;
1367 gboolean _tmp331_;
1368 ValaSemanticAnalyzer* _tmp396_;
1369 ValaSemanticAnalyzer* _tmp397_;
1370 ValaMethod* _tmp398_;
1371 ValaMethodType* _tmp399_;
1372 ValaMethodType* _tmp400_;
1373 ValaMethod* _tmp401_;
1374 ValaList* _tmp402_;
1375 ValaList* _tmp403_;
1376 _tmp248_ = vala_expression_get_symbol_reference ((ValaExpression*) self);
1377 _tmp249_ = _tmp248_;
1378 _tmp250_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp249_, VALA_TYPE_METHOD, ValaMethod));
1379 m = _tmp250_;
1380 _tmp251_ = self->priv->_is_yield_expression;
1381 if (_tmp251_) {
1382 ValaMethod* _tmp252_;
1383 gboolean _tmp253_;
1384 gboolean _tmp254_;
1385 gboolean _tmp257_ = FALSE;
1386 ValaSemanticAnalyzer* _tmp258_;
1387 ValaSemanticAnalyzer* _tmp259_;
1388 ValaMethod* _tmp260_;
1389 ValaMethod* _tmp261_;
1390 _tmp252_ = m;
1391 _tmp253_ = vala_method_get_coroutine (_tmp252_);
1392 _tmp254_ = _tmp253_;
1393 if (!_tmp254_) {
1394 ValaSourceReference* _tmp255_;
1395 ValaSourceReference* _tmp256_;
1396 vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
1397 _tmp255_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
1398 _tmp256_ = _tmp255_;
1399 vala_report_error (_tmp256_, "yield expression requires async method");
1400 }
1401 _tmp258_ = vala_code_context_get_analyzer (context);
1402 _tmp259_ = _tmp258_;
1403 _tmp260_ = vala_semantic_analyzer_get_current_method (_tmp259_);
1404 _tmp261_ = _tmp260_;
1405 if (_tmp261_ == NULL) {
1406 _tmp257_ = TRUE;
1407 } else {
1408 ValaSemanticAnalyzer* _tmp262_;
1409 ValaSemanticAnalyzer* _tmp263_;
1410 ValaMethod* _tmp264_;
1411 ValaMethod* _tmp265_;
1412 gboolean _tmp266_;
1413 gboolean _tmp267_;
1414 _tmp262_ = vala_code_context_get_analyzer (context);
1415 _tmp263_ = _tmp262_;
1416 _tmp264_ = vala_semantic_analyzer_get_current_method (_tmp263_);
1417 _tmp265_ = _tmp264_;
1418 _tmp266_ = vala_method_get_coroutine (_tmp265_);
1419 _tmp267_ = _tmp266_;
1420 _tmp257_ = !_tmp267_;
1421 }
1422 if (_tmp257_) {
1423 ValaSourceReference* _tmp268_;
1424 ValaSourceReference* _tmp269_;
1425 vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
1426 _tmp268_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
1427 _tmp269_ = _tmp268_;
1428 vala_report_error (_tmp269_, "yield expression not available outside async method");
1429 }
1430 } else {
1431 ValaMethod* _tmp270_;
1432 _tmp270_ = m;
1433 if (VALA_IS_CREATION_METHOD (_tmp270_)) {
1434 ValaMethod* _tmp271_;
1435 gboolean _tmp272_;
1436 gboolean _tmp273_;
1437 _tmp271_ = m;
1438 _tmp272_ = vala_method_get_coroutine (_tmp271_);
1439 _tmp273_ = _tmp272_;
1440 if (_tmp273_) {
1441 ValaSourceReference* _tmp274_;
1442 ValaSourceReference* _tmp275_;
1443 vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
1444 _tmp274_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
1445 _tmp275_ = _tmp274_;
1446 vala_report_error (_tmp275_, "missing `yield' before async creation expression");
1447 }
1448 }
1449 }
1450 last_arg = NULL;
1451 _tmp276_ = self->priv->argument_list;
1452 _tmp277_ = vala_iterable_iterator ((ValaIterable*) _tmp276_);
1453 arg_it = _tmp277_;
1454 {
1455 ValaList* _param_list = NULL;
1456 ValaMethod* _tmp278_;
1457 ValaList* _tmp279_;
1458 ValaList* _tmp280_;
1459 gint _param_size = 0;
1460 ValaList* _tmp281_;
1461 gint _tmp282_;
1462 gint _tmp283_;
1463 gint _param_index = 0;
1464 _tmp278_ = m;
1465 _tmp279_ = vala_callable_get_parameters ((ValaCallable*) _tmp278_);
1466 _tmp280_ = _vala_iterable_ref0 (_tmp279_);
1467 _param_list = _tmp280_;
1468 _tmp281_ = _param_list;
1469 _tmp282_ = vala_collection_get_size ((ValaCollection*) _tmp281_);
1470 _tmp283_ = _tmp282_;
1471 _param_size = _tmp283_;
1472 _param_index = -1;
1473 while (TRUE) {
1474 gint _tmp284_;
1475 gint _tmp285_;
1476 ValaParameter* param = NULL;
1477 ValaList* _tmp286_;
1478 gpointer _tmp287_;
1479 ValaParameter* _tmp288_;
1480 ValaParameter* _tmp289_;
1481 gboolean _tmp290_;
1482 gboolean _tmp291_;
1483 ValaParameter* _tmp292_;
1484 gboolean _tmp293_;
1485 gboolean _tmp294_;
1486 ValaIterator* _tmp312_;
1487 _param_index = _param_index + 1;
1488 _tmp284_ = _param_index;
1489 _tmp285_ = _param_size;
1490 if (!(_tmp284_ < _tmp285_)) {
1491 break;
1492 }
1493 _tmp286_ = _param_list;
1494 _tmp287_ = vala_list_get (_tmp286_, _param_index);
1495 param = (ValaParameter*) _tmp287_;
1496 _tmp288_ = param;
1497 if (!vala_code_node_check ((ValaCodeNode*) _tmp288_, context)) {
1498 vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
1499 }
1500 _tmp289_ = param;
1501 _tmp290_ = vala_parameter_get_ellipsis (_tmp289_);
1502 _tmp291_ = _tmp290_;
1503 if (_tmp291_) {
1504 _vala_code_node_unref0 (param);
1505 break;
1506 }
1507 _tmp292_ = param;
1508 _tmp293_ = vala_parameter_get_params_array (_tmp292_);
1509 _tmp294_ = _tmp293_;
1510 if (_tmp294_) {
1511 ValaArrayType* array_type = NULL;
1512 ValaParameter* _tmp295_;
1513 ValaDataType* _tmp296_;
1514 ValaDataType* _tmp297_;
1515 ValaArrayType* _tmp298_;
1516 _tmp295_ = param;
1517 _tmp296_ = vala_variable_get_variable_type ((ValaVariable*) _tmp295_);
1518 _tmp297_ = _tmp296_;
1519 _tmp298_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp297_, VALA_TYPE_ARRAY_TYPE, ValaArrayType));
1520 array_type = _tmp298_;
1521 while (TRUE) {
1522 ValaIterator* _tmp299_;
1523 ValaExpression* arg = NULL;
1524 ValaIterator* _tmp300_;
1525 gpointer _tmp301_;
1526 ValaExpression* _tmp302_;
1527 ValaArrayType* _tmp303_;
1528 ValaDataType* _tmp304_;
1529 ValaDataType* _tmp305_;
1530 ValaExpression* _tmp306_;
1531 ValaDataType* _tmp307_;
1532 ValaDataType* _tmp308_;
1533 ValaArrayType* _tmp309_;
1534 gboolean _tmp310_;
1535 gboolean _tmp311_;
1536 _tmp299_ = arg_it;
1537 if (!vala_iterator_next (_tmp299_)) {
1538 break;
1539 }
1540 _tmp300_ = arg_it;
1541 _tmp301_ = vala_iterator_get (_tmp300_);
1542 arg = (ValaExpression*) _tmp301_;
1543 _tmp302_ = arg;
1544 _tmp303_ = array_type;
1545 _tmp304_ = vala_array_type_get_element_type (_tmp303_);
1546 _tmp305_ = _tmp304_;
1547 vala_expression_set_target_type (_tmp302_, _tmp305_);
1548 _tmp306_ = arg;
1549 _tmp307_ = vala_expression_get_target_type (_tmp306_);
1550 _tmp308_ = _tmp307_;
1551 _tmp309_ = array_type;
1552 _tmp310_ = vala_data_type_get_value_owned ((ValaDataType*) _tmp309_);
1553 _tmp311_ = _tmp310_;
1554 vala_data_type_set_value_owned (_tmp308_, _tmp311_);
1555 _vala_code_node_unref0 (arg);
1556 }
1557 _vala_code_node_unref0 (array_type);
1558 _vala_code_node_unref0 (param);
1559 break;
1560 }
1561 _tmp312_ = arg_it;
1562 if (vala_iterator_next (_tmp312_)) {
1563 ValaExpression* arg = NULL;
1564 ValaIterator* _tmp313_;
1565 gpointer _tmp314_;
1566 ValaExpression* _tmp315_;
1567 ValaParameter* _tmp316_;
1568 ValaDataType* _tmp317_;
1569 ValaDataType* _tmp318_;
1570 ValaExpression* _tmp319_;
1571 ValaExpression* _tmp320_;
1572 ValaDataType* _tmp321_;
1573 ValaDataType* _tmp322_;
1574 ValaDataType* _tmp323_;
1575 ValaDataType* _tmp324_;
1576 ValaDataType* _tmp325_;
1577 ValaDataType* _tmp326_;
1578 ValaExpression* _tmp327_;
1579 ValaExpression* _tmp328_;
1580 _tmp313_ = arg_it;
1581 _tmp314_ = vala_iterator_get (_tmp313_);
1582 arg = (ValaExpression*) _tmp314_;
1583 _tmp315_ = arg;
1584 _tmp316_ = param;
1585 _tmp317_ = vala_variable_get_variable_type ((ValaVariable*) _tmp316_);
1586 _tmp318_ = _tmp317_;
1587 vala_expression_set_formal_target_type (_tmp315_, _tmp318_);
1588 _tmp319_ = arg;
1589 _tmp320_ = arg;
1590 _tmp321_ = vala_expression_get_formal_target_type (_tmp320_);
1591 _tmp322_ = _tmp321_;
1592 _tmp323_ = vala_expression_get_value_type ((ValaExpression*) self);
1593 _tmp324_ = _tmp323_;
1594 _tmp325_ = vala_data_type_get_actual_type (_tmp322_, _tmp324_, NULL, (ValaCodeNode*) self);
1595 _tmp326_ = _tmp325_;
1596 vala_expression_set_target_type (_tmp319_, _tmp326_);
1597 _vala_code_node_unref0 (_tmp326_);
1598 _tmp327_ = arg;
1599 _tmp328_ = _vala_code_node_ref0 (_tmp327_);
1600 _vala_code_node_unref0 (last_arg);
1601 last_arg = _tmp328_;
1602 _vala_code_node_unref0 (arg);
1603 }
1604 _vala_code_node_unref0 (param);
1605 }
1606 _vala_iterable_unref0 (_param_list);
1607 }
1608 _tmp329_ = m;
1609 _tmp330_ = vala_method_get_printf_format (_tmp329_);
1610 _tmp331_ = _tmp330_;
1611 if (_tmp331_) {
1612 ValaStringLiteral* format_literal = NULL;
1613 ValaExpression* _tmp332_;
1614 ValaStringLiteral* _tmp377_;
1615 format_literal = NULL;
1616 _tmp332_ = last_arg;
1617 if (VALA_IS_NULL_LITERAL (_tmp332_)) {
1618 } else {
1619 ValaExpression* _tmp333_;
1620 _tmp333_ = last_arg;
1621 if (_tmp333_ != NULL) {
1622 ValaExpression* _tmp334_;
1623 ValaStringLiteral* _tmp335_;
1624 gboolean _tmp336_ = FALSE;
1625 ValaStringLiteral* _tmp337_;
1626 _tmp334_ = last_arg;
1627 _tmp335_ = vala_string_literal_get_format_literal (_tmp334_);
1628 _vala_code_node_unref0 (format_literal);
1629 format_literal = _tmp335_;
1630 _tmp337_ = format_literal;
1631 if (_tmp337_ == NULL) {
1632 ValaList* _tmp338_;
1633 gint _tmp339_;
1634 gint _tmp340_;
1635 ValaMethod* _tmp341_;
1636 ValaList* _tmp342_;
1637 gint _tmp343_;
1638 gint _tmp344_;
1639 _tmp338_ = self->priv->argument_list;
1640 _tmp339_ = vala_collection_get_size ((ValaCollection*) _tmp338_);
1641 _tmp340_ = _tmp339_;
1642 _tmp341_ = m;
1643 _tmp342_ = vala_callable_get_parameters ((ValaCallable*) _tmp341_);
1644 _tmp343_ = vala_collection_get_size ((ValaCollection*) _tmp342_);
1645 _tmp344_ = _tmp343_;
1646 _tmp336_ = _tmp340_ == (_tmp344_ - 1);
1647 } else {
1648 _tmp336_ = FALSE;
1649 }
1650 if (_tmp336_) {
1651 ValaStringLiteral* _tmp345_;
1652 ValaStringLiteral* _tmp346_;
1653 ValaSemanticAnalyzer* _tmp347_;
1654 ValaSemanticAnalyzer* _tmp348_;
1655 ValaDataType* _tmp349_;
1656 ValaDataType* _tmp350_;
1657 ValaDataType* _tmp351_;
1658 ValaList* _tmp352_;
1659 ValaList* _tmp353_;
1660 gint _tmp354_;
1661 gint _tmp355_;
1662 ValaStringLiteral* _tmp356_;
1663 ValaList* _tmp357_;
1664 ValaIterator* _tmp358_;
1665 _tmp345_ = vala_string_literal_new ("\"%s\"", NULL);
1666 _vala_code_node_unref0 (format_literal);
1667 format_literal = _tmp345_;
1668 _tmp346_ = format_literal;
1669 _tmp347_ = vala_code_context_get_analyzer (context);
1670 _tmp348_ = _tmp347_;
1671 _tmp349_ = _tmp348_->string_type;
1672 _tmp350_ = vala_data_type_copy (_tmp349_);
1673 _tmp351_ = _tmp350_;
1674 vala_expression_set_target_type ((ValaExpression*) _tmp346_, _tmp351_);
1675 _vala_code_node_unref0 (_tmp351_);
1676 _tmp352_ = self->priv->argument_list;
1677 _tmp353_ = self->priv->argument_list;
1678 _tmp354_ = vala_collection_get_size ((ValaCollection*) _tmp353_);
1679 _tmp355_ = _tmp354_;
1680 _tmp356_ = format_literal;
1681 vala_list_insert (_tmp352_, _tmp355_ - 1, (ValaExpression*) _tmp356_);
1682 _tmp357_ = self->priv->argument_list;
1683 _tmp358_ = vala_iterable_iterator ((ValaIterable*) _tmp357_);
1684 _vala_iterator_unref0 (arg_it);
1685 arg_it = _tmp358_;
1686 {
1687 ValaList* _param_list = NULL;
1688 ValaMethod* _tmp359_;
1689 ValaList* _tmp360_;
1690 ValaList* _tmp361_;
1691 gint _param_size = 0;
1692 ValaList* _tmp362_;
1693 gint _tmp363_;
1694 gint _tmp364_;
1695 gint _param_index = 0;
1696 _tmp359_ = m;
1697 _tmp360_ = vala_callable_get_parameters ((ValaCallable*) _tmp359_);
1698 _tmp361_ = _vala_iterable_ref0 (_tmp360_);
1699 _param_list = _tmp361_;
1700 _tmp362_ = _param_list;
1701 _tmp363_ = vala_collection_get_size ((ValaCollection*) _tmp362_);
1702 _tmp364_ = _tmp363_;
1703 _param_size = _tmp364_;
1704 _param_index = -1;
1705 while (TRUE) {
1706 gint _tmp365_;
1707 gint _tmp366_;
1708 ValaParameter* param = NULL;
1709 ValaList* _tmp367_;
1710 gpointer _tmp368_;
1711 gboolean _tmp369_ = FALSE;
1712 ValaParameter* _tmp370_;
1713 gboolean _tmp371_;
1714 gboolean _tmp372_;
1715 ValaIterator* _tmp376_;
1716 _param_index = _param_index + 1;
1717 _tmp365_ = _param_index;
1718 _tmp366_ = _param_size;
1719 if (!(_tmp365_ < _tmp366_)) {
1720 break;
1721 }
1722 _tmp367_ = _param_list;
1723 _tmp368_ = vala_list_get (_tmp367_, _param_index);
1724 param = (ValaParameter*) _tmp368_;
1725 _tmp370_ = param;
1726 _tmp371_ = vala_parameter_get_ellipsis (_tmp370_);
1727 _tmp372_ = _tmp371_;
1728 if (_tmp372_) {
1729 _tmp369_ = TRUE;
1730 } else {
1731 ValaParameter* _tmp373_;
1732 gboolean _tmp374_;
1733 gboolean _tmp375_;
1734 _tmp373_ = param;
1735 _tmp374_ = vala_parameter_get_params_array (_tmp373_);
1736 _tmp375_ = _tmp374_;
1737 _tmp369_ = _tmp375_;
1738 }
1739 if (_tmp369_) {
1740 _vala_code_node_unref0 (param);
1741 break;
1742 }
1743 _tmp376_ = arg_it;
1744 vala_iterator_next (_tmp376_);
1745 _vala_code_node_unref0 (param);
1746 }
1747 _vala_iterable_unref0 (_param_list);
1748 }
1749 }
1750 }
1751 }
1752 _tmp377_ = format_literal;
1753 if (_tmp377_ != NULL) {
1754 gchar* format = NULL;
1755 ValaStringLiteral* _tmp378_;
1756 gchar* _tmp379_;
1757 ValaSemanticAnalyzer* _tmp380_;
1758 ValaSemanticAnalyzer* _tmp381_;
1759 const gchar* _tmp382_;
1760 ValaIterator* _tmp383_;
1761 ValaSourceReference* _tmp384_;
1762 ValaSourceReference* _tmp385_;
1763 _tmp378_ = format_literal;
1764 _tmp379_ = vala_string_literal_eval (_tmp378_);
1765 format = _tmp379_;
1766 _tmp380_ = vala_code_context_get_analyzer (context);
1767 _tmp381_ = _tmp380_;
1768 _tmp382_ = format;
1769 _tmp383_ = arg_it;
1770 _tmp384_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
1771 _tmp385_ = _tmp384_;
1772 if (!vala_semantic_analyzer_check_print_format (_tmp381_, _tmp382_, _tmp383_, _tmp385_)) {
1773 result = FALSE;
1774 _g_free0 (format);
1775 _vala_code_node_unref0 (format_literal);
1776 _vala_iterator_unref0 (arg_it);
1777 _vala_code_node_unref0 (last_arg);
1778 _vala_code_node_unref0 (m);
1779 _vala_code_node_unref0 (type);
1780 return result;
1781 }
1782 _g_free0 (format);
1783 }
1784 _vala_code_node_unref0 (format_literal);
1785 }
1786 {
1787 ValaList* _arg_list = NULL;
1788 ValaList* _tmp386_;
1789 ValaList* _tmp387_;
1790 gint _arg_size = 0;
1791 ValaList* _tmp388_;
1792 gint _tmp389_;
1793 gint _tmp390_;
1794 gint _arg_index = 0;
1795 _tmp386_ = self->priv->argument_list;
1796 _tmp387_ = _vala_iterable_ref0 (_tmp386_);
1797 _arg_list = _tmp387_;
1798 _tmp388_ = _arg_list;
1799 _tmp389_ = vala_collection_get_size ((ValaCollection*) _tmp388_);
1800 _tmp390_ = _tmp389_;
1801 _arg_size = _tmp390_;
1802 _arg_index = -1;
1803 while (TRUE) {
1804 gint _tmp391_;
1805 gint _tmp392_;
1806 ValaExpression* arg = NULL;
1807 ValaList* _tmp393_;
1808 gpointer _tmp394_;
1809 ValaExpression* _tmp395_;
1810 _arg_index = _arg_index + 1;
1811 _tmp391_ = _arg_index;
1812 _tmp392_ = _arg_size;
1813 if (!(_tmp391_ < _tmp392_)) {
1814 break;
1815 }
1816 _tmp393_ = _arg_list;
1817 _tmp394_ = vala_list_get (_tmp393_, _arg_index);
1818 arg = (ValaExpression*) _tmp394_;
1819 _tmp395_ = arg;
1820 vala_code_node_check ((ValaCodeNode*) _tmp395_, context);
1821 _vala_code_node_unref0 (arg);
1822 }
1823 _vala_iterable_unref0 (_arg_list);
1824 }
1825 _tmp396_ = vala_code_context_get_analyzer (context);
1826 _tmp397_ = _tmp396_;
1827 _tmp398_ = m;
1828 _tmp399_ = vala_method_type_new (_tmp398_);
1829 _tmp400_ = _tmp399_;
1830 _tmp401_ = m;
1831 _tmp402_ = vala_callable_get_parameters ((ValaCallable*) _tmp401_);
1832 _tmp403_ = self->priv->argument_list;
1833 vala_semantic_analyzer_check_arguments (_tmp397_, (ValaExpression*) self, (ValaDataType*) _tmp400_, _tmp402_, _tmp403_);
1834 _vala_code_node_unref0 (_tmp400_);
1835 _vala_iterator_unref0 (arg_it);
1836 _vala_code_node_unref0 (last_arg);
1837 _vala_code_node_unref0 (m);
1838 } else {
1839 ValaDataType* _tmp404_;
1840 ValaDataType* _tmp405_;
1841 _tmp404_ = vala_object_creation_expression_get_type_reference (self);
1842 _tmp405_ = _tmp404_;
1843 if (VALA_IS_ERROR_TYPE (_tmp405_)) {
1844 ValaDataType* _tmp406_;
1845 ValaDataType* _tmp407_;
1846 ValaMemberAccess* _tmp410_;
1847 ValaMemberAccess* _tmp411_;
1848 ValaList* _tmp434_;
1849 gint _tmp435_;
1850 gint _tmp436_;
1851 _tmp406_ = vala_object_creation_expression_get_type_reference (self);
1852 _tmp407_ = _tmp406_;
1853 if (_tmp407_ != NULL) {
1854 ValaDataType* _tmp408_;
1855 ValaDataType* _tmp409_;
1856 _tmp408_ = vala_object_creation_expression_get_type_reference (self);
1857 _tmp409_ = _tmp408_;
1858 vala_code_node_check ((ValaCodeNode*) _tmp409_, context);
1859 }
1860 _tmp410_ = vala_object_creation_expression_get_member_name (self);
1861 _tmp411_ = _tmp410_;
1862 if (_tmp411_ != NULL) {
1863 ValaMemberAccess* _tmp412_;
1864 ValaMemberAccess* _tmp413_;
1865 _tmp412_ = vala_object_creation_expression_get_member_name (self);
1866 _tmp413_ = _tmp412_;
1867 vala_code_node_check ((ValaCodeNode*) _tmp413_, context);
1868 }
1869 {
1870 ValaList* _arg_list = NULL;
1871 ValaList* _tmp414_;
1872 ValaList* _tmp415_;
1873 gint _arg_size = 0;
1874 ValaList* _tmp416_;
1875 gint _tmp417_;
1876 gint _tmp418_;
1877 gint _arg_index = 0;
1878 _tmp414_ = self->priv->argument_list;
1879 _tmp415_ = _vala_iterable_ref0 (_tmp414_);
1880 _arg_list = _tmp415_;
1881 _tmp416_ = _arg_list;
1882 _tmp417_ = vala_collection_get_size ((ValaCollection*) _tmp416_);
1883 _tmp418_ = _tmp417_;
1884 _arg_size = _tmp418_;
1885 _arg_index = -1;
1886 while (TRUE) {
1887 gint _tmp419_;
1888 gint _tmp420_;
1889 ValaExpression* arg = NULL;
1890 ValaList* _tmp421_;
1891 gpointer _tmp422_;
1892 ValaExpression* _tmp423_;
1893 _arg_index = _arg_index + 1;
1894 _tmp419_ = _arg_index;
1895 _tmp420_ = _arg_size;
1896 if (!(_tmp419_ < _tmp420_)) {
1897 break;
1898 }
1899 _tmp421_ = _arg_list;
1900 _tmp422_ = vala_list_get (_tmp421_, _arg_index);
1901 arg = (ValaExpression*) _tmp422_;
1902 _tmp423_ = arg;
1903 vala_code_node_check ((ValaCodeNode*) _tmp423_, context);
1904 _vala_code_node_unref0 (arg);
1905 }
1906 _vala_iterable_unref0 (_arg_list);
1907 }
1908 {
1909 ValaList* _init_list = NULL;
1910 ValaList* _tmp424_;
1911 ValaList* _tmp425_;
1912 gint _init_size = 0;
1913 ValaList* _tmp426_;
1914 gint _tmp427_;
1915 gint _tmp428_;
1916 gint _init_index = 0;
1917 _tmp424_ = self->priv->object_initializer;
1918 _tmp425_ = _vala_iterable_ref0 (_tmp424_);
1919 _init_list = _tmp425_;
1920 _tmp426_ = _init_list;
1921 _tmp427_ = vala_collection_get_size ((ValaCollection*) _tmp426_);
1922 _tmp428_ = _tmp427_;
1923 _init_size = _tmp428_;
1924 _init_index = -1;
1925 while (TRUE) {
1926 gint _tmp429_;
1927 gint _tmp430_;
1928 ValaMemberInitializer* init = NULL;
1929 ValaList* _tmp431_;
1930 gpointer _tmp432_;
1931 ValaMemberInitializer* _tmp433_;
1932 _init_index = _init_index + 1;
1933 _tmp429_ = _init_index;
1934 _tmp430_ = _init_size;
1935 if (!(_tmp429_ < _tmp430_)) {
1936 break;
1937 }
1938 _tmp431_ = _init_list;
1939 _tmp432_ = vala_list_get (_tmp431_, _init_index);
1940 init = (ValaMemberInitializer*) _tmp432_;
1941 _tmp433_ = init;
1942 vala_code_node_check ((ValaCodeNode*) _tmp433_, context);
1943 _vala_code_node_unref0 (init);
1944 }
1945 _vala_iterable_unref0 (_init_list);
1946 }
1947 _tmp434_ = self->priv->argument_list;
1948 _tmp435_ = vala_collection_get_size ((ValaCollection*) _tmp434_);
1949 _tmp436_ = _tmp435_;
1950 if (_tmp436_ == 0) {
1951 ValaSourceReference* _tmp437_;
1952 ValaSourceReference* _tmp438_;
1953 vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
1954 _tmp437_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
1955 _tmp438_ = _tmp437_;
1956 vala_report_error (_tmp438_, "Too few arguments, errors need at least 1 argument");
1957 } else {
1958 ValaIterator* arg_it = NULL;
1959 ValaList* _tmp439_;
1960 ValaIterator* _tmp440_;
1961 ValaIterator* _tmp441_;
1962 ValaExpression* ex = NULL;
1963 ValaIterator* _tmp442_;
1964 gpointer _tmp443_;
1965 gboolean _tmp444_ = FALSE;
1966 ValaExpression* _tmp445_;
1967 ValaDataType* _tmp446_;
1968 ValaDataType* _tmp447_;
1969 ValaStringLiteral* format_literal = NULL;
1970 ValaExpression* _tmp456_;
1971 ValaStringLiteral* _tmp457_;
1972 ValaStringLiteral* _tmp458_;
1973 ValaList* _tmp467_;
1974 ValaIterator* _tmp468_;
1975 ValaIterator* _tmp469_;
1976 ValaSemanticAnalyzer* _tmp470_;
1977 ValaSemanticAnalyzer* _tmp471_;
1978 ValaIterator* _tmp472_;
1979 ValaSourceReference* _tmp473_;
1980 ValaSourceReference* _tmp474_;
1981 _tmp439_ = self->priv->argument_list;
1982 _tmp440_ = vala_iterable_iterator ((ValaIterable*) _tmp439_);
1983 arg_it = _tmp440_;
1984 _tmp441_ = arg_it;
1985 vala_iterator_next (_tmp441_);
1986 _tmp442_ = arg_it;
1987 _tmp443_ = vala_iterator_get (_tmp442_);
1988 ex = (ValaExpression*) _tmp443_;
1989 _tmp445_ = ex;
1990 _tmp446_ = vala_expression_get_value_type (_tmp445_);
1991 _tmp447_ = _tmp446_;
1992 if (_tmp447_ == NULL) {
1993 _tmp444_ = TRUE;
1994 } else {
1995 ValaExpression* _tmp448_;
1996 ValaDataType* _tmp449_;
1997 ValaDataType* _tmp450_;
1998 ValaSemanticAnalyzer* _tmp451_;
1999 ValaSemanticAnalyzer* _tmp452_;
2000 ValaDataType* _tmp453_;
2001 _tmp448_ = ex;
2002 _tmp449_ = vala_expression_get_value_type (_tmp448_);
2003 _tmp450_ = _tmp449_;
2004 _tmp451_ = vala_code_context_get_analyzer (context);
2005 _tmp452_ = _tmp451_;
2006 _tmp453_ = _tmp452_->string_type;
2007 _tmp444_ = !vala_data_type_compatible (_tmp450_, _tmp453_);
2008 }
2009 if (_tmp444_) {
2010 ValaSourceReference* _tmp454_;
2011 ValaSourceReference* _tmp455_;
2012 vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
2013 _tmp454_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2014 _tmp455_ = _tmp454_;
2015 vala_report_error (_tmp455_, "Invalid type for argument 1");
2016 }
2017 _tmp456_ = ex;
2018 _tmp457_ = vala_string_literal_get_format_literal (_tmp456_);
2019 format_literal = _tmp457_;
2020 _tmp458_ = format_literal;
2021 if (_tmp458_ != NULL) {
2022 gchar* format = NULL;
2023 ValaStringLiteral* _tmp459_;
2024 gchar* _tmp460_;
2025 ValaSemanticAnalyzer* _tmp461_;
2026 ValaSemanticAnalyzer* _tmp462_;
2027 const gchar* _tmp463_;
2028 ValaIterator* _tmp464_;
2029 ValaSourceReference* _tmp465_;
2030 ValaSourceReference* _tmp466_;
2031 _tmp459_ = format_literal;
2032 _tmp460_ = vala_string_literal_eval (_tmp459_);
2033 format = _tmp460_;
2034 _tmp461_ = vala_code_context_get_analyzer (context);
2035 _tmp462_ = _tmp461_;
2036 _tmp463_ = format;
2037 _tmp464_ = arg_it;
2038 _tmp465_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2039 _tmp466_ = _tmp465_;
2040 if (!vala_semantic_analyzer_check_print_format (_tmp462_, _tmp463_, _tmp464_, _tmp466_)) {
2041 vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
2042 result = FALSE;
2043 _g_free0 (format);
2044 _vala_code_node_unref0 (format_literal);
2045 _vala_code_node_unref0 (ex);
2046 _vala_iterator_unref0 (arg_it);
2047 _vala_code_node_unref0 (type);
2048 return result;
2049 }
2050 _g_free0 (format);
2051 }
2052 _tmp467_ = self->priv->argument_list;
2053 _tmp468_ = vala_iterable_iterator ((ValaIterable*) _tmp467_);
2054 _vala_iterator_unref0 (arg_it);
2055 arg_it = _tmp468_;
2056 _tmp469_ = arg_it;
2057 vala_iterator_next (_tmp469_);
2058 _tmp470_ = vala_code_context_get_analyzer (context);
2059 _tmp471_ = _tmp470_;
2060 _tmp472_ = arg_it;
2061 _tmp473_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2062 _tmp474_ = _tmp473_;
2063 if (!vala_semantic_analyzer_check_variadic_arguments (_tmp471_, _tmp472_, 1, _tmp474_)) {
2064 vala_code_node_set_error ((ValaCodeNode*) self, TRUE);
2065 result = FALSE;
2066 _vala_code_node_unref0 (format_literal);
2067 _vala_code_node_unref0 (ex);
2068 _vala_iterator_unref0 (arg_it);
2069 _vala_code_node_unref0 (type);
2070 return result;
2071 }
2072 _vala_code_node_unref0 (format_literal);
2073 _vala_code_node_unref0 (ex);
2074 _vala_iterator_unref0 (arg_it);
2075 }
2076 }
2077 }
2078 {
2079 ValaList* _arg_list = NULL;
2080 ValaList* _tmp475_;
2081 ValaList* _tmp476_;
2082 gint _arg_size = 0;
2083 ValaList* _tmp477_;
2084 gint _tmp478_;
2085 gint _tmp479_;
2086 gint _arg_index = 0;
2087 _tmp475_ = self->priv->argument_list;
2088 _tmp476_ = _vala_iterable_ref0 (_tmp475_);
2089 _arg_list = _tmp476_;
2090 _tmp477_ = _arg_list;
2091 _tmp478_ = vala_collection_get_size ((ValaCollection*) _tmp477_);
2092 _tmp479_ = _tmp478_;
2093 _arg_size = _tmp479_;
2094 _arg_index = -1;
2095 while (TRUE) {
2096 gint _tmp480_;
2097 gint _tmp481_;
2098 ValaExpression* arg = NULL;
2099 ValaList* _tmp482_;
2100 gpointer _tmp483_;
2101 ValaSizeofExpression* sizeof_expr = NULL;
2102 ValaExpression* _tmp484_;
2103 gboolean _tmp485_ = FALSE;
2104 ValaSizeofExpression* _tmp486_;
2105 _arg_index = _arg_index + 1;
2106 _tmp480_ = _arg_index;
2107 _tmp481_ = _arg_size;
2108 if (!(_tmp480_ < _tmp481_)) {
2109 break;
2110 }
2111 _tmp482_ = _arg_list;
2112 _tmp483_ = vala_list_get (_tmp482_, _arg_index);
2113 arg = (ValaExpression*) _tmp483_;
2114 _tmp484_ = arg;
2115 sizeof_expr = VALA_IS_SIZEOF_EXPRESSION (_tmp484_) ? ((ValaSizeofExpression*) _tmp484_) : NULL;
2116 _tmp486_ = sizeof_expr;
2117 if (_tmp486_ != NULL) {
2118 ValaSizeofExpression* _tmp487_;
2119 ValaDataType* _tmp488_;
2120 ValaDataType* _tmp489_;
2121 _tmp487_ = sizeof_expr;
2122 _tmp488_ = vala_sizeof_expression_get_type_reference (_tmp487_);
2123 _tmp489_ = _tmp488_;
2124 _tmp485_ = VALA_IS_GENERIC_TYPE (_tmp489_);
2125 } else {
2126 _tmp485_ = FALSE;
2127 }
2128 if (_tmp485_) {
2129 ValaDataType* sizeof_type = NULL;
2130 ValaSizeofExpression* _tmp490_;
2131 ValaDataType* _tmp491_;
2132 ValaDataType* _tmp492_;
2133 ValaDataType* _tmp493_;
2134 ValaDataType* _tmp494_;
2135 ValaDataType* _tmp495_;
2136 ValaDataType* _tmp496_;
2137 ValaList* _tmp497_;
2138 ValaDataType* _tmp498_;
2139 ValaExpression* _tmp499_;
2140 ValaDataType* _tmp500_;
2141 ValaSourceReference* _tmp501_;
2142 ValaSourceReference* _tmp502_;
2143 ValaSizeofExpression* _tmp503_;
2144 ValaSizeofExpression* _tmp504_;
2145 _tmp490_ = sizeof_expr;
2146 _tmp491_ = vala_sizeof_expression_get_type_reference (_tmp490_);
2147 _tmp492_ = _tmp491_;
2148 _tmp493_ = vala_object_creation_expression_get_type_reference (self);
2149 _tmp494_ = _tmp493_;
2150 _tmp495_ = vala_object_creation_expression_get_type_reference (self);
2151 _tmp496_ = _tmp495_;
2152 _tmp497_ = vala_data_type_get_type_arguments (_tmp496_);
2153 _tmp498_ = vala_data_type_get_actual_type (_tmp492_, _tmp494_, _tmp497_, (ValaCodeNode*) self);
2154 sizeof_type = _tmp498_;
2155 _tmp499_ = arg;
2156 _tmp500_ = sizeof_type;
2157 _tmp501_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2158 _tmp502_ = _tmp501_;
2159 _tmp503_ = vala_sizeof_expression_new (_tmp500_, _tmp502_);
2160 _tmp504_ = _tmp503_;
2161 vala_code_node_replace_expression ((ValaCodeNode*) self, _tmp499_, (ValaExpression*) _tmp504_);
2162 _vala_code_node_unref0 (_tmp504_);
2163 _vala_code_node_unref0 (sizeof_type);
2164 }
2165 _vala_code_node_unref0 (arg);
2166 }
2167 _vala_iterable_unref0 (_arg_list);
2168 }
2169 _tmp505_ = type;
2170 _tmp506_ = vala_symbol_get_external_package ((ValaSymbol*) _tmp505_);
2171 _tmp507_ = _tmp506_;
2172 if (!_tmp507_) {
2173 ValaSemanticAnalyzer* _tmp508_;
2174 ValaSemanticAnalyzer* _tmp509_;
2175 ValaDataType* _tmp510_;
2176 ValaDataType* _tmp511_;
2177 _tmp508_ = vala_code_context_get_analyzer (context);
2178 _tmp509_ = _tmp508_;
2179 _tmp510_ = vala_object_creation_expression_get_type_reference (self);
2180 _tmp511_ = _tmp510_;
2181 vala_semantic_analyzer_check_type (_tmp509_, _tmp511_);
2182 }
2183 {
2184 ValaList* _init_list = NULL;
2185 ValaList* _tmp512_;
2186 ValaList* _tmp513_;
2187 gint _init_size = 0;
2188 ValaList* _tmp514_;
2189 gint _tmp515_;
2190 gint _tmp516_;
2191 gint _init_index = 0;
2192 _tmp512_ = vala_object_creation_expression_get_object_initializer (self);
2193 _tmp513_ = _vala_iterable_ref0 (_tmp512_);
2194 _init_list = _tmp513_;
2195 _tmp514_ = _init_list;
2196 _tmp515_ = vala_collection_get_size ((ValaCollection*) _tmp514_);
2197 _tmp516_ = _tmp515_;
2198 _init_size = _tmp516_;
2199 _init_index = -1;
2200 while (TRUE) {
2201 gint _tmp517_;
2202 gint _tmp518_;
2203 ValaMemberInitializer* init = NULL;
2204 ValaList* _tmp519_;
2205 gpointer _tmp520_;
2206 ValaSemanticAnalyzer* _tmp521_;
2207 ValaSemanticAnalyzer* _tmp522_;
2208 ValaMemberInitializer* _tmp523_;
2209 ValaDataType* _tmp524_;
2210 ValaDataType* _tmp525_;
2211 _init_index = _init_index + 1;
2212 _tmp517_ = _init_index;
2213 _tmp518_ = _init_size;
2214 if (!(_tmp517_ < _tmp518_)) {
2215 break;
2216 }
2217 _tmp519_ = _init_list;
2218 _tmp520_ = vala_list_get (_tmp519_, _init_index);
2219 init = (ValaMemberInitializer*) _tmp520_;
2220 _tmp521_ = vala_code_context_get_analyzer (context);
2221 _tmp522_ = _tmp521_;
2222 _tmp523_ = init;
2223 _tmp524_ = vala_object_creation_expression_get_type_reference (self);
2224 _tmp525_ = _tmp524_;
2225 vala_semantic_analyzer_visit_member_initializer (_tmp522_, _tmp523_, _tmp525_);
2226 _vala_code_node_unref0 (init);
2227 }
2228 _vala_iterable_unref0 (_init_list);
2229 }
2230 _tmp526_ = vala_code_node_get_tree_can_fail ((ValaCodeNode*) self);
2231 _tmp527_ = _tmp526_;
2232 if (_tmp527_) {
2233 gboolean _tmp528_ = FALSE;
2234 ValaCodeNode* _tmp529_;
2235 ValaCodeNode* _tmp530_;
2236 _tmp529_ = vala_code_node_get_parent_node ((ValaCodeNode*) self);
2237 _tmp530_ = _tmp529_;
2238 if (VALA_IS_LOCAL_VARIABLE (_tmp530_)) {
2239 _tmp528_ = TRUE;
2240 } else {
2241 ValaCodeNode* _tmp531_;
2242 ValaCodeNode* _tmp532_;
2243 _tmp531_ = vala_code_node_get_parent_node ((ValaCodeNode*) self);
2244 _tmp532_ = _tmp531_;
2245 _tmp528_ = VALA_IS_EXPRESSION_STATEMENT (_tmp532_);
2246 }
2247 if (_tmp528_) {
2248 } else {
2249 ValaSemanticAnalyzer* _tmp533_;
2250 ValaSemanticAnalyzer* _tmp534_;
2251 ValaSymbol* _tmp535_;
2252 ValaSymbol* _tmp536_;
2253 _tmp533_ = vala_code_context_get_analyzer (context);
2254 _tmp534_ = _tmp533_;
2255 _tmp535_ = vala_semantic_analyzer_get_current_symbol (_tmp534_);
2256 _tmp536_ = _tmp535_;
2257 if (!VALA_IS_BLOCK (_tmp536_)) {
2258 ValaSourceReference* _tmp537_;
2259 ValaSourceReference* _tmp538_;
2260 _tmp537_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2261 _tmp538_ = _tmp537_;
2262 vala_report_error (_tmp538_, "Field initializers must not throw errors");
2263 } else {
2264 ValaCodeNode* old_parent_node = NULL;
2265 ValaCodeNode* _tmp539_;
2266 ValaCodeNode* _tmp540_;
2267 ValaCodeNode* _tmp541_;
2268 ValaLocalVariable* local = NULL;
2269 ValaDataType* _tmp542_;
2270 ValaDataType* _tmp543_;
2271 ValaDataType* _tmp544_;
2272 ValaDataType* _tmp545_;
2273 gchar* _tmp546_;
2274 gchar* _tmp547_;
2275 ValaSourceReference* _tmp548_;
2276 ValaSourceReference* _tmp549_;
2277 ValaLocalVariable* _tmp550_;
2278 ValaLocalVariable* _tmp551_;
2279 ValaDeclarationStatement* decl = NULL;
2280 ValaLocalVariable* _tmp552_;
2281 ValaSourceReference* _tmp553_;
2282 ValaSourceReference* _tmp554_;
2283 ValaDeclarationStatement* _tmp555_;
2284 ValaSemanticAnalyzer* _tmp556_;
2285 ValaSemanticAnalyzer* _tmp557_;
2286 ValaBlock* _tmp558_;
2287 ValaDeclarationStatement* _tmp559_;
2288 ValaExpression* temp_access = NULL;
2289 ValaLocalVariable* _tmp560_;
2290 ValaDataType* _tmp561_;
2291 ValaDataType* _tmp562_;
2292 ValaExpression* _tmp563_;
2293 ValaExpression* _tmp564_;
2294 ValaDataType* _tmp565_;
2295 ValaDataType* _tmp566_;
2296 ValaLocalVariable* _tmp567_;
2297 ValaDeclarationStatement* _tmp568_;
2298 ValaBlock* block = NULL;
2299 ValaSemanticAnalyzer* _tmp569_;
2300 ValaSemanticAnalyzer* _tmp570_;
2301 ValaSymbol* _tmp571_;
2302 ValaSymbol* _tmp572_;
2303 ValaBlock* _tmp573_;
2304 ValaBlock* _tmp574_;
2305 ValaLocalVariable* _tmp575_;
2306 ValaSemanticAnalyzer* _tmp576_;
2307 ValaSemanticAnalyzer* _tmp577_;
2308 ValaBlock* _tmp578_;
2309 ValaLocalVariable* _tmp579_;
2310 ValaCodeNode* _tmp580_;
2311 ValaExpression* _tmp581_;
2312 ValaExpression* _tmp582_;
2313 _tmp539_ = vala_code_node_get_parent_node ((ValaCodeNode*) self);
2314 _tmp540_ = _tmp539_;
2315 _tmp541_ = _vala_code_node_ref0 (_tmp540_);
2316 old_parent_node = _tmp541_;
2317 _tmp542_ = vala_expression_get_value_type ((ValaExpression*) self);
2318 _tmp543_ = _tmp542_;
2319 _tmp544_ = vala_data_type_copy (_tmp543_);
2320 _tmp545_ = _tmp544_;
2321 _tmp546_ = vala_code_node_get_temp_name ();
2322 _tmp547_ = _tmp546_;
2323 _tmp548_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2324 _tmp549_ = _tmp548_;
2325 _tmp550_ = vala_local_variable_new (_tmp545_, _tmp547_, NULL, _tmp549_);
2326 _tmp551_ = _tmp550_;
2327 _g_free0 (_tmp547_);
2328 _vala_code_node_unref0 (_tmp545_);
2329 local = _tmp551_;
2330 _tmp552_ = local;
2331 _tmp553_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2332 _tmp554_ = _tmp553_;
2333 _tmp555_ = vala_declaration_statement_new ((ValaSymbol*) _tmp552_, _tmp554_);
2334 decl = _tmp555_;
2335 _tmp556_ = vala_code_context_get_analyzer (context);
2336 _tmp557_ = _tmp556_;
2337 _tmp558_ = _tmp557_->insert_block;
2338 _tmp559_ = decl;
2339 vala_expression_insert_statement ((ValaExpression*) self, _tmp558_, (ValaStatement*) _tmp559_);
2340 _tmp560_ = local;
2341 _tmp561_ = vala_expression_get_target_type ((ValaExpression*) self);
2342 _tmp562_ = _tmp561_;
2343 _tmp563_ = vala_semantic_analyzer_create_temp_access (_tmp560_, _tmp562_);
2344 temp_access = _tmp563_;
2345 _tmp564_ = temp_access;
2346 _tmp565_ = vala_expression_get_formal_target_type ((ValaExpression*) self);
2347 _tmp566_ = _tmp565_;
2348 vala_expression_set_formal_target_type (_tmp564_, _tmp566_);
2349 _tmp567_ = local;
2350 vala_variable_set_initializer ((ValaVariable*) _tmp567_, (ValaExpression*) self);
2351 _tmp568_ = decl;
2352 vala_code_node_check ((ValaCodeNode*) _tmp568_, context);
2353 _tmp569_ = vala_code_context_get_analyzer (context);
2354 _tmp570_ = _tmp569_;
2355 _tmp571_ = vala_semantic_analyzer_get_current_symbol (_tmp570_);
2356 _tmp572_ = _tmp571_;
2357 _tmp573_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp572_, VALA_TYPE_BLOCK, ValaBlock));
2358 block = _tmp573_;
2359 _tmp574_ = block;
2360 _tmp575_ = local;
2361 vala_block_remove_local_variable (_tmp574_, _tmp575_);
2362 _tmp576_ = vala_code_context_get_analyzer (context);
2363 _tmp577_ = _tmp576_;
2364 _tmp578_ = _tmp577_->insert_block;
2365 _tmp579_ = local;
2366 vala_block_add_local_variable (_tmp578_, _tmp579_);
2367 _tmp580_ = old_parent_node;
2368 _tmp581_ = temp_access;
2369 vala_code_node_replace_expression (_tmp580_, (ValaExpression*) self, _tmp581_);
2370 _tmp582_ = temp_access;
2371 vala_code_node_check ((ValaCodeNode*) _tmp582_, context);
2372 _vala_code_node_unref0 (block);
2373 _vala_code_node_unref0 (temp_access);
2374 _vala_code_node_unref0 (decl);
2375 _vala_code_node_unref0 (local);
2376 _vala_code_node_unref0 (old_parent_node);
2377 }
2378 }
2379 }
2380 _tmp583_ = vala_code_node_get_error ((ValaCodeNode*) self);
2381 _tmp584_ = _tmp583_;
2382 result = !_tmp584_;
2383 _vala_code_node_unref0 (type);
2384 return result;
2385 }
2386
2387 static void
vala_object_creation_expression_real_get_error_types(ValaCodeNode * base,ValaCollection * collection,ValaSourceReference * source_reference)2388 vala_object_creation_expression_real_get_error_types (ValaCodeNode* base,
2389 ValaCollection* collection,
2390 ValaSourceReference* source_reference)
2391 {
2392 ValaObjectCreationExpression * self;
2393 ValaSymbol* _tmp0_;
2394 ValaSymbol* _tmp1_;
2395 self = (ValaObjectCreationExpression*) base;
2396 g_return_if_fail (collection != NULL);
2397 _tmp0_ = vala_expression_get_symbol_reference ((ValaExpression*) self);
2398 _tmp1_ = _tmp0_;
2399 if (VALA_IS_METHOD (_tmp1_)) {
2400 ValaMethod* m = NULL;
2401 ValaSymbol* _tmp4_;
2402 ValaSymbol* _tmp5_;
2403 ValaMethod* _tmp6_;
2404 ValaMethod* _tmp7_;
2405 if (source_reference == NULL) {
2406 ValaSourceReference* _tmp2_;
2407 ValaSourceReference* _tmp3_;
2408 _tmp2_ = vala_code_node_get_source_reference ((ValaCodeNode*) self);
2409 _tmp3_ = _tmp2_;
2410 source_reference = _tmp3_;
2411 }
2412 _tmp4_ = vala_expression_get_symbol_reference ((ValaExpression*) self);
2413 _tmp5_ = _tmp4_;
2414 _tmp6_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, VALA_TYPE_METHOD, ValaMethod));
2415 m = _tmp6_;
2416 _tmp7_ = m;
2417 vala_code_node_get_error_types ((ValaCodeNode*) _tmp7_, collection, source_reference);
2418 _vala_code_node_unref0 (m);
2419 }
2420 }
2421
2422 static void
vala_object_creation_expression_real_emit(ValaCodeNode * base,ValaCodeGenerator * codegen)2423 vala_object_creation_expression_real_emit (ValaCodeNode* base,
2424 ValaCodeGenerator* codegen)
2425 {
2426 ValaObjectCreationExpression * self;
2427 self = (ValaObjectCreationExpression*) base;
2428 g_return_if_fail (codegen != NULL);
2429 {
2430 ValaList* _arg_list = NULL;
2431 ValaList* _tmp0_;
2432 ValaList* _tmp1_;
2433 gint _arg_size = 0;
2434 ValaList* _tmp2_;
2435 gint _tmp3_;
2436 gint _tmp4_;
2437 gint _arg_index = 0;
2438 _tmp0_ = self->priv->argument_list;
2439 _tmp1_ = _vala_iterable_ref0 (_tmp0_);
2440 _arg_list = _tmp1_;
2441 _tmp2_ = _arg_list;
2442 _tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_);
2443 _tmp4_ = _tmp3_;
2444 _arg_size = _tmp4_;
2445 _arg_index = -1;
2446 while (TRUE) {
2447 gint _tmp5_;
2448 gint _tmp6_;
2449 ValaExpression* arg = NULL;
2450 ValaList* _tmp7_;
2451 gpointer _tmp8_;
2452 ValaExpression* _tmp9_;
2453 _arg_index = _arg_index + 1;
2454 _tmp5_ = _arg_index;
2455 _tmp6_ = _arg_size;
2456 if (!(_tmp5_ < _tmp6_)) {
2457 break;
2458 }
2459 _tmp7_ = _arg_list;
2460 _tmp8_ = vala_list_get (_tmp7_, _arg_index);
2461 arg = (ValaExpression*) _tmp8_;
2462 _tmp9_ = arg;
2463 vala_code_node_emit ((ValaCodeNode*) _tmp9_, codegen);
2464 _vala_code_node_unref0 (arg);
2465 }
2466 _vala_iterable_unref0 (_arg_list);
2467 }
2468 {
2469 ValaList* _init_list = NULL;
2470 ValaList* _tmp10_;
2471 ValaList* _tmp11_;
2472 gint _init_size = 0;
2473 ValaList* _tmp12_;
2474 gint _tmp13_;
2475 gint _tmp14_;
2476 gint _init_index = 0;
2477 _tmp10_ = self->priv->object_initializer;
2478 _tmp11_ = _vala_iterable_ref0 (_tmp10_);
2479 _init_list = _tmp11_;
2480 _tmp12_ = _init_list;
2481 _tmp13_ = vala_collection_get_size ((ValaCollection*) _tmp12_);
2482 _tmp14_ = _tmp13_;
2483 _init_size = _tmp14_;
2484 _init_index = -1;
2485 while (TRUE) {
2486 gint _tmp15_;
2487 gint _tmp16_;
2488 ValaMemberInitializer* init = NULL;
2489 ValaList* _tmp17_;
2490 gpointer _tmp18_;
2491 ValaMemberInitializer* _tmp19_;
2492 _init_index = _init_index + 1;
2493 _tmp15_ = _init_index;
2494 _tmp16_ = _init_size;
2495 if (!(_tmp15_ < _tmp16_)) {
2496 break;
2497 }
2498 _tmp17_ = _init_list;
2499 _tmp18_ = vala_list_get (_tmp17_, _init_index);
2500 init = (ValaMemberInitializer*) _tmp18_;
2501 _tmp19_ = init;
2502 vala_code_node_emit ((ValaCodeNode*) _tmp19_, codegen);
2503 _vala_code_node_unref0 (init);
2504 }
2505 _vala_iterable_unref0 (_init_list);
2506 }
2507 vala_code_visitor_visit_object_creation_expression ((ValaCodeVisitor*) codegen, self);
2508 vala_code_visitor_visit_expression ((ValaCodeVisitor*) codegen, (ValaExpression*) self);
2509 }
2510
2511 static void
vala_object_creation_expression_real_get_defined_variables(ValaCodeNode * base,ValaCollection * collection)2512 vala_object_creation_expression_real_get_defined_variables (ValaCodeNode* base,
2513 ValaCollection* collection)
2514 {
2515 ValaObjectCreationExpression * self;
2516 self = (ValaObjectCreationExpression*) base;
2517 g_return_if_fail (collection != NULL);
2518 {
2519 ValaList* _arg_list = NULL;
2520 ValaList* _tmp0_;
2521 ValaList* _tmp1_;
2522 gint _arg_size = 0;
2523 ValaList* _tmp2_;
2524 gint _tmp3_;
2525 gint _tmp4_;
2526 gint _arg_index = 0;
2527 _tmp0_ = self->priv->argument_list;
2528 _tmp1_ = _vala_iterable_ref0 (_tmp0_);
2529 _arg_list = _tmp1_;
2530 _tmp2_ = _arg_list;
2531 _tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_);
2532 _tmp4_ = _tmp3_;
2533 _arg_size = _tmp4_;
2534 _arg_index = -1;
2535 while (TRUE) {
2536 gint _tmp5_;
2537 gint _tmp6_;
2538 ValaExpression* arg = NULL;
2539 ValaList* _tmp7_;
2540 gpointer _tmp8_;
2541 ValaExpression* _tmp9_;
2542 _arg_index = _arg_index + 1;
2543 _tmp5_ = _arg_index;
2544 _tmp6_ = _arg_size;
2545 if (!(_tmp5_ < _tmp6_)) {
2546 break;
2547 }
2548 _tmp7_ = _arg_list;
2549 _tmp8_ = vala_list_get (_tmp7_, _arg_index);
2550 arg = (ValaExpression*) _tmp8_;
2551 _tmp9_ = arg;
2552 vala_code_node_get_defined_variables ((ValaCodeNode*) _tmp9_, collection);
2553 _vala_code_node_unref0 (arg);
2554 }
2555 _vala_iterable_unref0 (_arg_list);
2556 }
2557 }
2558
2559 static void
vala_object_creation_expression_real_get_used_variables(ValaCodeNode * base,ValaCollection * collection)2560 vala_object_creation_expression_real_get_used_variables (ValaCodeNode* base,
2561 ValaCollection* collection)
2562 {
2563 ValaObjectCreationExpression * self;
2564 self = (ValaObjectCreationExpression*) base;
2565 g_return_if_fail (collection != NULL);
2566 {
2567 ValaList* _arg_list = NULL;
2568 ValaList* _tmp0_;
2569 ValaList* _tmp1_;
2570 gint _arg_size = 0;
2571 ValaList* _tmp2_;
2572 gint _tmp3_;
2573 gint _tmp4_;
2574 gint _arg_index = 0;
2575 _tmp0_ = self->priv->argument_list;
2576 _tmp1_ = _vala_iterable_ref0 (_tmp0_);
2577 _arg_list = _tmp1_;
2578 _tmp2_ = _arg_list;
2579 _tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_);
2580 _tmp4_ = _tmp3_;
2581 _arg_size = _tmp4_;
2582 _arg_index = -1;
2583 while (TRUE) {
2584 gint _tmp5_;
2585 gint _tmp6_;
2586 ValaExpression* arg = NULL;
2587 ValaList* _tmp7_;
2588 gpointer _tmp8_;
2589 ValaExpression* _tmp9_;
2590 _arg_index = _arg_index + 1;
2591 _tmp5_ = _arg_index;
2592 _tmp6_ = _arg_size;
2593 if (!(_tmp5_ < _tmp6_)) {
2594 break;
2595 }
2596 _tmp7_ = _arg_list;
2597 _tmp8_ = vala_list_get (_tmp7_, _arg_index);
2598 arg = (ValaExpression*) _tmp8_;
2599 _tmp9_ = arg;
2600 vala_code_node_get_used_variables ((ValaCodeNode*) _tmp9_, collection);
2601 _vala_code_node_unref0 (arg);
2602 }
2603 _vala_iterable_unref0 (_arg_list);
2604 }
2605 {
2606 ValaList* _init_list = NULL;
2607 ValaList* _tmp10_;
2608 ValaList* _tmp11_;
2609 gint _init_size = 0;
2610 ValaList* _tmp12_;
2611 gint _tmp13_;
2612 gint _tmp14_;
2613 gint _init_index = 0;
2614 _tmp10_ = self->priv->object_initializer;
2615 _tmp11_ = _vala_iterable_ref0 (_tmp10_);
2616 _init_list = _tmp11_;
2617 _tmp12_ = _init_list;
2618 _tmp13_ = vala_collection_get_size ((ValaCollection*) _tmp12_);
2619 _tmp14_ = _tmp13_;
2620 _init_size = _tmp14_;
2621 _init_index = -1;
2622 while (TRUE) {
2623 gint _tmp15_;
2624 gint _tmp16_;
2625 ValaMemberInitializer* init = NULL;
2626 ValaList* _tmp17_;
2627 gpointer _tmp18_;
2628 ValaMemberInitializer* _tmp19_;
2629 _init_index = _init_index + 1;
2630 _tmp15_ = _init_index;
2631 _tmp16_ = _init_size;
2632 if (!(_tmp15_ < _tmp16_)) {
2633 break;
2634 }
2635 _tmp17_ = _init_list;
2636 _tmp18_ = vala_list_get (_tmp17_, _init_index);
2637 init = (ValaMemberInitializer*) _tmp18_;
2638 _tmp19_ = init;
2639 vala_code_node_get_used_variables ((ValaCodeNode*) _tmp19_, collection);
2640 _vala_code_node_unref0 (init);
2641 }
2642 _vala_iterable_unref0 (_init_list);
2643 }
2644 }
2645
2646 static void
vala_object_creation_expression_class_init(ValaObjectCreationExpressionClass * klass,gpointer klass_data)2647 vala_object_creation_expression_class_init (ValaObjectCreationExpressionClass * klass,
2648 gpointer klass_data)
2649 {
2650 vala_object_creation_expression_parent_class = g_type_class_peek_parent (klass);
2651 ((ValaCodeNodeClass *) klass)->finalize = vala_object_creation_expression_finalize;
2652 g_type_class_adjust_private_offset (klass, &ValaObjectCreationExpression_private_offset);
2653 ((ValaCodeNodeClass *) klass)->accept = (void (*) (ValaCodeNode*, ValaCodeVisitor*)) vala_object_creation_expression_real_accept;
2654 ((ValaCodeNodeClass *) klass)->accept_children = (void (*) (ValaCodeNode*, ValaCodeVisitor*)) vala_object_creation_expression_real_accept_children;
2655 ((ValaCodeNodeClass *) klass)->replace_expression = (void (*) (ValaCodeNode*, ValaExpression*, ValaExpression*)) vala_object_creation_expression_real_replace_expression;
2656 ((ValaExpressionClass *) klass)->is_pure = (gboolean (*) (ValaExpression*)) vala_object_creation_expression_real_is_pure;
2657 ((ValaExpressionClass *) klass)->is_accessible = (gboolean (*) (ValaExpression*, ValaSymbol*)) vala_object_creation_expression_real_is_accessible;
2658 ((ValaCodeNodeClass *) klass)->replace_type = (void (*) (ValaCodeNode*, ValaDataType*, ValaDataType*)) vala_object_creation_expression_real_replace_type;
2659 ((ValaCodeNodeClass *) klass)->check = (gboolean (*) (ValaCodeNode*, ValaCodeContext*)) vala_object_creation_expression_real_check;
2660 ((ValaCodeNodeClass *) klass)->get_error_types = (void (*) (ValaCodeNode*, ValaCollection*, ValaSourceReference*)) vala_object_creation_expression_real_get_error_types;
2661 ((ValaCodeNodeClass *) klass)->emit = (void (*) (ValaCodeNode*, ValaCodeGenerator*)) vala_object_creation_expression_real_emit;
2662 ((ValaCodeNodeClass *) klass)->get_defined_variables = (void (*) (ValaCodeNode*, ValaCollection*)) vala_object_creation_expression_real_get_defined_variables;
2663 ((ValaCodeNodeClass *) klass)->get_used_variables = (void (*) (ValaCodeNode*, ValaCollection*)) vala_object_creation_expression_real_get_used_variables;
2664 }
2665
2666 static void
vala_object_creation_expression_instance_init(ValaObjectCreationExpression * self,gpointer klass)2667 vala_object_creation_expression_instance_init (ValaObjectCreationExpression * self,
2668 gpointer klass)
2669 {
2670 GEqualFunc _tmp0_;
2671 ValaArrayList* _tmp1_;
2672 GEqualFunc _tmp2_;
2673 ValaArrayList* _tmp3_;
2674 self->priv = vala_object_creation_expression_get_instance_private (self);
2675 _tmp0_ = g_direct_equal;
2676 _tmp1_ = vala_array_list_new (VALA_TYPE_EXPRESSION, (GBoxedCopyFunc) vala_code_node_ref, (GDestroyNotify) vala_code_node_unref, _tmp0_);
2677 self->priv->argument_list = (ValaList*) _tmp1_;
2678 _tmp2_ = g_direct_equal;
2679 _tmp3_ = vala_array_list_new (VALA_TYPE_MEMBER_INITIALIZER, (GBoxedCopyFunc) vala_code_node_ref, (GDestroyNotify) vala_code_node_unref, _tmp2_);
2680 self->priv->object_initializer = (ValaList*) _tmp3_;
2681 }
2682
2683 static void
vala_object_creation_expression_finalize(ValaCodeNode * obj)2684 vala_object_creation_expression_finalize (ValaCodeNode * obj)
2685 {
2686 ValaObjectCreationExpression * self;
2687 self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALA_TYPE_OBJECT_CREATION_EXPRESSION, ValaObjectCreationExpression);
2688 _vala_iterable_unref0 (self->priv->argument_list);
2689 _vala_iterable_unref0 (self->priv->object_initializer);
2690 _vala_code_node_unref0 (self->priv->_data_type);
2691 _vala_code_node_unref0 (self->priv->_member_name);
2692 VALA_CODE_NODE_CLASS (vala_object_creation_expression_parent_class)->finalize (obj);
2693 }
2694
2695 /**
2696 * Represents an object creation expression in the source code.
2697 */
2698 static GType
vala_object_creation_expression_get_type_once(void)2699 vala_object_creation_expression_get_type_once (void)
2700 {
2701 static const GTypeInfo g_define_type_info = { sizeof (ValaObjectCreationExpressionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_object_creation_expression_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaObjectCreationExpression), 0, (GInstanceInitFunc) vala_object_creation_expression_instance_init, NULL };
2702 GType vala_object_creation_expression_type_id;
2703 vala_object_creation_expression_type_id = g_type_register_static (VALA_TYPE_EXPRESSION, "ValaObjectCreationExpression", &g_define_type_info, 0);
2704 ValaObjectCreationExpression_private_offset = g_type_add_instance_private (vala_object_creation_expression_type_id, sizeof (ValaObjectCreationExpressionPrivate));
2705 return vala_object_creation_expression_type_id;
2706 }
2707
2708 GType
vala_object_creation_expression_get_type(void)2709 vala_object_creation_expression_get_type (void)
2710 {
2711 static volatile gsize vala_object_creation_expression_type_id__volatile = 0;
2712 if (g_once_init_enter (&vala_object_creation_expression_type_id__volatile)) {
2713 GType vala_object_creation_expression_type_id;
2714 vala_object_creation_expression_type_id = vala_object_creation_expression_get_type_once ();
2715 g_once_init_leave (&vala_object_creation_expression_type_id__volatile, vala_object_creation_expression_type_id);
2716 }
2717 return vala_object_creation_expression_type_id__volatile;
2718 }
2719
2720