~ubuntu-branches/ubuntu/maverick/vala/maverick

« back to all changes in this revision

Viewing changes to codegen/valagerrormodule.c

  • Committer: Bazaar Package Importer
  • Author(s): Julien Lavergne
  • Date: 2010-02-13 17:59:22 UTC
  • mfrom: (7.3.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100213175922-n8bq2xv2q1hihhqb
Tags: 0.7.10-1ubuntu1
* Sync with Debian unstable.
* Remaining changes :
 - debian/rules: Don't make unit test failures fatal to fix FTBFS. It was
   needed if vala need to enter main but it's not the case for now. 
   (See #374151)

Show diffs side-by-side

added added

removed removed

Lines of Context:
341
341
        ValaTypeSymbol* garray_type;
342
342
        ValaTypeSymbol* gbytearray_type;
343
343
        ValaTypeSymbol* gptrarray_type;
 
344
        ValaTypeSymbol* gthreadpool_type;
344
345
        ValaDataType* gquark_type;
345
346
        ValaStruct* gvalue_type;
346
347
        ValaStruct* mutex_type;
528
529
ValaCCodeExpression* vala_ccode_base_module_default_value_for_type (ValaCCodeBaseModule* self, ValaDataType* type, gboolean initializer_expression);
529
530
ValaCCodeStatement* vala_gerror_module_return_with_exception (ValaGErrorModule* self, ValaCCodeExpression* error_expr);
530
531
static ValaCCodeStatement* vala_gerror_module_real_return_with_exception (ValaGErrorModule* self, ValaCCodeExpression* error_expr);
531
 
static ValaCCodeStatement* vala_gerror_module_uncaught_error_statement (ValaGErrorModule* self, ValaCCodeExpression* inner_error);
 
532
static ValaCCodeStatement* vala_gerror_module_uncaught_error_statement (ValaGErrorModule* self, ValaCCodeExpression* inner_error, ValaCCodeBlock* block, gboolean unexpected);
 
533
static gboolean vala_gerror_module_in_finally_block (ValaGErrorModule* self, ValaCodeNode* node);
532
534
void vala_ccode_base_module_append_error_free (ValaCCodeBaseModule* self, ValaSymbol* sym, ValaCCodeFragment* cfrag, ValaTryStatement* current_try);
533
535
static void vala_gerror_module_real_add_simple_check (ValaCCodeModule* base, ValaCodeNode* node, ValaCCodeFragment* cfrag);
534
536
static void vala_gerror_module_real_visit_try_statement (ValaCCodeModule* base, ValaTryStatement* stmt);
687
689
}
688
690
 
689
691
 
 
692
static gpointer _vala_code_node_ref0 (gpointer self) {
 
693
        return self ? vala_code_node_ref (self) : NULL;
 
694
}
 
695
 
 
696
 
690
697
static ValaCCodeStatement* vala_gerror_module_real_return_with_exception (ValaGErrorModule* self, ValaCCodeExpression* error_expr) {
691
698
        ValaCCodeStatement* result;
692
699
        ValaCCodeIdentifier* _tmp0_;
709
716
        vala_ccode_base_module_append_local_free ((ValaCCodeBaseModule*) self, ((ValaCCodeBaseModule*) self)->current_symbol, free_frag, FALSE);
710
717
        vala_ccode_block_add_statement (cerror_block, (ValaCCodeNode*) free_frag);
711
718
        if (VALA_IS_CREATION_METHOD (vala_ccode_base_module_get_current_method ((ValaCCodeBaseModule*) self))) {
712
 
                ValaCCodeReturnStatement* _tmp5_;
713
 
                ValaCCodeConstant* _tmp4_;
714
 
                vala_ccode_block_add_statement (cerror_block, (ValaCCodeNode*) (_tmp5_ = vala_ccode_return_statement_new ((ValaCCodeExpression*) (_tmp4_ = vala_ccode_constant_new ("NULL")))));
715
 
                _vala_ccode_node_unref0 (_tmp5_);
716
 
                _vala_ccode_node_unref0 (_tmp4_);
 
719
                ValaSymbol* _tmp4_;
 
720
                ValaClass* cl;
 
721
                ValaCCodeIdentifier* _tmp6_;
 
722
                char* _tmp5_;
 
723
                ValaCCodeFunctionCall* _tmp7_;
 
724
                ValaCCodeFunctionCall* unref_call;
 
725
                ValaCCodeIdentifier* _tmp8_;
 
726
                ValaCCodeExpressionStatement* _tmp9_;
 
727
                ValaCCodeReturnStatement* _tmp11_;
 
728
                ValaCCodeConstant* _tmp10_;
 
729
                cl = _vala_code_node_ref0 ((_tmp4_ = vala_symbol_get_parent_symbol ((ValaSymbol*) vala_ccode_base_module_get_current_method ((ValaCCodeBaseModule*) self)), VALA_IS_CLASS (_tmp4_) ? ((ValaClass*) _tmp4_) : NULL));
 
730
                unref_call = (_tmp7_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp6_ = vala_ccode_identifier_new (_tmp5_ = vala_typesymbol_get_unref_function ((ValaTypeSymbol*) cl)))), _vala_ccode_node_unref0 (_tmp6_), _g_free0 (_tmp5_), _tmp7_);
 
731
                vala_ccode_function_call_add_argument (unref_call, (ValaCCodeExpression*) (_tmp8_ = vala_ccode_identifier_new ("self")));
 
732
                _vala_ccode_node_unref0 (_tmp8_);
 
733
                vala_ccode_block_add_statement (cerror_block, (ValaCCodeNode*) (_tmp9_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) unref_call)));
 
734
                _vala_ccode_node_unref0 (_tmp9_);
 
735
                vala_ccode_block_add_statement (cerror_block, (ValaCCodeNode*) (_tmp11_ = vala_ccode_return_statement_new ((ValaCCodeExpression*) (_tmp10_ = vala_ccode_constant_new ("NULL")))));
 
736
                _vala_ccode_node_unref0 (_tmp11_);
 
737
                _vala_ccode_node_unref0 (_tmp10_);
 
738
                _vala_code_node_unref0 (cl);
 
739
                _vala_ccode_node_unref0 (unref_call);
717
740
        } else {
718
 
                gboolean _tmp6_ = FALSE;
 
741
                gboolean _tmp12_ = FALSE;
719
742
                if (vala_ccode_base_module_get_current_method ((ValaCCodeBaseModule*) self) != NULL) {
720
 
                        _tmp6_ = vala_method_get_coroutine (vala_ccode_base_module_get_current_method ((ValaCCodeBaseModule*) self));
 
743
                        _tmp12_ = vala_method_get_coroutine (vala_ccode_base_module_get_current_method ((ValaCCodeBaseModule*) self));
721
744
                } else {
722
 
                        _tmp6_ = FALSE;
 
745
                        _tmp12_ = FALSE;
723
746
                }
724
 
                if (_tmp6_) {
725
 
                        ValaCCodeReturnStatement* _tmp8_;
726
 
                        ValaCCodeConstant* _tmp7_;
727
 
                        vala_ccode_block_add_statement (cerror_block, (ValaCCodeNode*) (_tmp8_ = vala_ccode_return_statement_new ((ValaCCodeExpression*) (_tmp7_ = vala_ccode_constant_new ("FALSE")))));
728
 
                        _vala_ccode_node_unref0 (_tmp8_);
729
 
                        _vala_ccode_node_unref0 (_tmp7_);
 
747
                if (_tmp12_) {
 
748
                        ValaCCodeReturnStatement* _tmp14_;
 
749
                        ValaCCodeConstant* _tmp13_;
 
750
                        vala_ccode_block_add_statement (cerror_block, (ValaCCodeNode*) (_tmp14_ = vala_ccode_return_statement_new ((ValaCCodeExpression*) (_tmp13_ = vala_ccode_constant_new ("FALSE")))));
 
751
                        _vala_ccode_node_unref0 (_tmp14_);
 
752
                        _vala_ccode_node_unref0 (_tmp13_);
730
753
                } else {
731
754
                        if (VALA_IS_VOID_TYPE (vala_ccode_base_module_get_current_return_type ((ValaCCodeBaseModule*) self))) {
732
 
                                ValaCCodeReturnStatement* _tmp9_;
733
 
                                vala_ccode_block_add_statement (cerror_block, (ValaCCodeNode*) (_tmp9_ = vala_ccode_return_statement_new (NULL)));
734
 
                                _vala_ccode_node_unref0 (_tmp9_);
 
755
                                ValaCCodeReturnStatement* _tmp15_;
 
756
                                vala_ccode_block_add_statement (cerror_block, (ValaCCodeNode*) (_tmp15_ = vala_ccode_return_statement_new (NULL)));
 
757
                                _vala_ccode_node_unref0 (_tmp15_);
735
758
                        } else {
736
 
                                ValaCCodeReturnStatement* _tmp11_;
737
 
                                ValaCCodeExpression* _tmp10_;
738
 
                                vala_ccode_block_add_statement (cerror_block, (ValaCCodeNode*) (_tmp11_ = vala_ccode_return_statement_new (_tmp10_ = vala_ccode_base_module_default_value_for_type ((ValaCCodeBaseModule*) self, vala_ccode_base_module_get_current_return_type ((ValaCCodeBaseModule*) self), FALSE))));
739
 
                                _vala_ccode_node_unref0 (_tmp11_);
740
 
                                _vala_ccode_node_unref0 (_tmp10_);
 
759
                                ValaCCodeReturnStatement* _tmp17_;
 
760
                                ValaCCodeExpression* _tmp16_;
 
761
                                vala_ccode_block_add_statement (cerror_block, (ValaCCodeNode*) (_tmp17_ = vala_ccode_return_statement_new (_tmp16_ = vala_ccode_base_module_default_value_for_type ((ValaCCodeBaseModule*) self, vala_ccode_base_module_get_current_return_type ((ValaCCodeBaseModule*) self), FALSE))));
 
762
                                _vala_ccode_node_unref0 (_tmp17_);
 
763
                                _vala_ccode_node_unref0 (_tmp16_);
741
764
                        }
742
765
                }
743
766
        }
753
776
}
754
777
 
755
778
 
756
 
static ValaCCodeStatement* vala_gerror_module_uncaught_error_statement (ValaGErrorModule* self, ValaCCodeExpression* inner_error) {
 
779
static gpointer _vala_ccode_node_ref0 (gpointer self) {
 
780
        return self ? vala_ccode_node_ref (self) : NULL;
 
781
}
 
782
 
 
783
 
 
784
static ValaCCodeStatement* vala_gerror_module_uncaught_error_statement (ValaGErrorModule* self, ValaCCodeExpression* inner_error, ValaCCodeBlock* block, gboolean unexpected) {
757
785
        ValaCCodeStatement* result;
758
786
        ValaCCodeBlock* cerror_block;
759
787
        ValaCCodeFragment* free_frag;
760
 
        ValaCCodeIdentifier* _tmp0_;
761
 
        ValaCCodeFunctionCall* _tmp1_;
 
788
        ValaCCodeIdentifier* _tmp1_;
 
789
        ValaCCodeFunctionCall* _tmp2_;
762
790
        ValaCCodeFunctionCall* ccritical;
763
 
        ValaCCodeConstant* _tmp2_;
764
 
        ValaCCodeConstant* _tmp3_;
 
791
        const char* _tmp3_;
765
792
        ValaCCodeConstant* _tmp4_;
766
 
        ValaCCodeMemberAccess* _tmp5_;
767
 
        ValaCCodeIdentifier* _tmp6_;
768
 
        ValaCCodeFunctionCall* _tmp7_;
 
793
        ValaCCodeConstant* _tmp5_;
 
794
        ValaCCodeConstant* _tmp6_;
 
795
        ValaCCodeMemberAccess* _tmp7_;
 
796
        ValaCCodeIdentifier* _tmp8_;
 
797
        ValaCCodeFunctionCall* _tmp9_;
769
798
        ValaCCodeFunctionCall* domain_name;
770
 
        ValaCCodeMemberAccess* _tmp8_;
771
 
        ValaCCodeMemberAccess* _tmp9_;
772
 
        ValaCCodeIdentifier* _tmp10_;
773
 
        ValaCCodeFunctionCall* _tmp11_;
 
799
        ValaCCodeMemberAccess* _tmp10_;
 
800
        ValaCCodeMemberAccess* _tmp11_;
 
801
        ValaCCodeIdentifier* _tmp12_;
 
802
        ValaCCodeFunctionCall* _tmp13_;
774
803
        ValaCCodeFunctionCall* cclear;
775
 
        ValaCCodeUnaryExpression* _tmp12_;
 
804
        ValaCCodeUnaryExpression* _tmp14_;
776
805
        ValaCCodeFragment* cprint_frag;
777
 
        ValaCCodeExpressionStatement* _tmp13_;
778
 
        ValaCCodeExpressionStatement* _tmp14_;
 
806
        ValaCCodeExpressionStatement* _tmp15_;
 
807
        ValaCCodeExpressionStatement* _tmp16_;
779
808
        g_return_val_if_fail (self != NULL, NULL);
780
809
        g_return_val_if_fail (inner_error != NULL, NULL);
781
 
        cerror_block = vala_ccode_block_new ();
 
810
        cerror_block = _vala_ccode_node_ref0 (block);
 
811
        if (cerror_block == NULL) {
 
812
                ValaCCodeBlock* _tmp0_;
 
813
                cerror_block = (_tmp0_ = vala_ccode_block_new (), _vala_ccode_node_unref0 (cerror_block), _tmp0_);
 
814
        }
782
815
        free_frag = vala_ccode_fragment_new ();
783
816
        vala_ccode_base_module_append_local_free ((ValaCCodeBaseModule*) self, ((ValaCCodeBaseModule*) self)->current_symbol, free_frag, FALSE);
784
817
        vala_ccode_block_add_statement (cerror_block, (ValaCCodeNode*) free_frag);
785
 
        ccritical = (_tmp1_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp0_ = vala_ccode_identifier_new ("g_critical"))), _vala_ccode_node_unref0 (_tmp0_), _tmp1_);
786
 
        vala_ccode_function_call_add_argument (ccritical, (ValaCCodeExpression*) (_tmp2_ = vala_ccode_constant_new ("\"file %s: line %d: uncaught error: %s (%s, %d)\"")));
787
 
        _vala_ccode_node_unref0 (_tmp2_);
788
 
        vala_ccode_function_call_add_argument (ccritical, (ValaCCodeExpression*) (_tmp3_ = vala_ccode_constant_new ("__FILE__")));
789
 
        _vala_ccode_node_unref0 (_tmp3_);
790
 
        vala_ccode_function_call_add_argument (ccritical, (ValaCCodeExpression*) (_tmp4_ = vala_ccode_constant_new ("__LINE__")));
 
818
        ccritical = (_tmp2_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp1_ = vala_ccode_identifier_new ("g_critical"))), _vala_ccode_node_unref0 (_tmp1_), _tmp2_);
 
819
        _tmp3_ = NULL;
 
820
        if (unexpected) {
 
821
                _tmp3_ = "\"file %s: line %d: unexpected error: %s (%s, %d)\"";
 
822
        } else {
 
823
                _tmp3_ = "\"file %s: line %d: uncaught error: %s (%s, %d)\"";
 
824
        }
 
825
        vala_ccode_function_call_add_argument (ccritical, (ValaCCodeExpression*) (_tmp4_ = vala_ccode_constant_new (_tmp3_)));
791
826
        _vala_ccode_node_unref0 (_tmp4_);
792
 
        vala_ccode_function_call_add_argument (ccritical, (ValaCCodeExpression*) (_tmp5_ = vala_ccode_member_access_new_pointer (inner_error, "message")));
 
827
        vala_ccode_function_call_add_argument (ccritical, (ValaCCodeExpression*) (_tmp5_ = vala_ccode_constant_new ("__FILE__")));
793
828
        _vala_ccode_node_unref0 (_tmp5_);
794
 
        domain_name = (_tmp7_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp6_ = vala_ccode_identifier_new ("g_quark_to_string"))), _vala_ccode_node_unref0 (_tmp6_), _tmp7_);
795
 
        vala_ccode_function_call_add_argument (domain_name, (ValaCCodeExpression*) (_tmp8_ = vala_ccode_member_access_new_pointer (inner_error, "domain")));
796
 
        _vala_ccode_node_unref0 (_tmp8_);
 
829
        vala_ccode_function_call_add_argument (ccritical, (ValaCCodeExpression*) (_tmp6_ = vala_ccode_constant_new ("__LINE__")));
 
830
        _vala_ccode_node_unref0 (_tmp6_);
 
831
        vala_ccode_function_call_add_argument (ccritical, (ValaCCodeExpression*) (_tmp7_ = vala_ccode_member_access_new_pointer (inner_error, "message")));
 
832
        _vala_ccode_node_unref0 (_tmp7_);
 
833
        domain_name = (_tmp9_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp8_ = vala_ccode_identifier_new ("g_quark_to_string"))), _vala_ccode_node_unref0 (_tmp8_), _tmp9_);
 
834
        vala_ccode_function_call_add_argument (domain_name, (ValaCCodeExpression*) (_tmp10_ = vala_ccode_member_access_new_pointer (inner_error, "domain")));
 
835
        _vala_ccode_node_unref0 (_tmp10_);
797
836
        vala_ccode_function_call_add_argument (ccritical, (ValaCCodeExpression*) domain_name);
798
 
        vala_ccode_function_call_add_argument (ccritical, (ValaCCodeExpression*) (_tmp9_ = vala_ccode_member_access_new_pointer (inner_error, "code")));
799
 
        _vala_ccode_node_unref0 (_tmp9_);
800
 
        cclear = (_tmp11_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp10_ = vala_ccode_identifier_new ("g_clear_error"))), _vala_ccode_node_unref0 (_tmp10_), _tmp11_);
801
 
        vala_ccode_function_call_add_argument (cclear, (ValaCCodeExpression*) (_tmp12_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, inner_error)));
802
 
        _vala_ccode_node_unref0 (_tmp12_);
 
837
        vala_ccode_function_call_add_argument (ccritical, (ValaCCodeExpression*) (_tmp11_ = vala_ccode_member_access_new_pointer (inner_error, "code")));
 
838
        _vala_ccode_node_unref0 (_tmp11_);
 
839
        cclear = (_tmp13_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp12_ = vala_ccode_identifier_new ("g_clear_error"))), _vala_ccode_node_unref0 (_tmp12_), _tmp13_);
 
840
        vala_ccode_function_call_add_argument (cclear, (ValaCCodeExpression*) (_tmp14_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, inner_error)));
 
841
        _vala_ccode_node_unref0 (_tmp14_);
803
842
        cprint_frag = vala_ccode_fragment_new ();
804
 
        vala_ccode_fragment_append (cprint_frag, (ValaCCodeNode*) (_tmp13_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) ccritical)));
805
 
        _vala_ccode_node_unref0 (_tmp13_);
806
 
        vala_ccode_fragment_append (cprint_frag, (ValaCCodeNode*) (_tmp14_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) cclear)));
807
 
        _vala_ccode_node_unref0 (_tmp14_);
 
843
        vala_ccode_fragment_append (cprint_frag, (ValaCCodeNode*) (_tmp15_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) ccritical)));
 
844
        _vala_ccode_node_unref0 (_tmp15_);
 
845
        vala_ccode_fragment_append (cprint_frag, (ValaCCodeNode*) (_tmp16_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) cclear)));
 
846
        _vala_ccode_node_unref0 (_tmp16_);
808
847
        vala_ccode_block_add_statement (cerror_block, (ValaCCodeNode*) cprint_frag);
809
848
        if (VALA_IS_CREATION_METHOD (vala_ccode_base_module_get_current_method ((ValaCCodeBaseModule*) self))) {
810
 
                ValaCCodeReturnStatement* _tmp16_;
811
 
                ValaCCodeConstant* _tmp15_;
812
 
                vala_ccode_block_add_statement (cerror_block, (ValaCCodeNode*) (_tmp16_ = vala_ccode_return_statement_new ((ValaCCodeExpression*) (_tmp15_ = vala_ccode_constant_new ("NULL")))));
813
 
                _vala_ccode_node_unref0 (_tmp16_);
814
 
                _vala_ccode_node_unref0 (_tmp15_);
 
849
                ValaCCodeReturnStatement* _tmp18_;
 
850
                ValaCCodeConstant* _tmp17_;
 
851
                vala_ccode_block_add_statement (cerror_block, (ValaCCodeNode*) (_tmp18_ = vala_ccode_return_statement_new ((ValaCCodeExpression*) (_tmp17_ = vala_ccode_constant_new ("NULL")))));
 
852
                _vala_ccode_node_unref0 (_tmp18_);
 
853
                _vala_ccode_node_unref0 (_tmp17_);
815
854
        } else {
816
 
                gboolean _tmp17_ = FALSE;
 
855
                gboolean _tmp19_ = FALSE;
817
856
                if (vala_ccode_base_module_get_current_method ((ValaCCodeBaseModule*) self) != NULL) {
818
 
                        _tmp17_ = vala_method_get_coroutine (vala_ccode_base_module_get_current_method ((ValaCCodeBaseModule*) self));
 
857
                        _tmp19_ = vala_method_get_coroutine (vala_ccode_base_module_get_current_method ((ValaCCodeBaseModule*) self));
819
858
                } else {
820
 
                        _tmp17_ = FALSE;
 
859
                        _tmp19_ = FALSE;
821
860
                }
822
 
                if (_tmp17_) {
823
 
                        ValaCCodeReturnStatement* _tmp19_;
824
 
                        ValaCCodeConstant* _tmp18_;
825
 
                        vala_ccode_block_add_statement (cerror_block, (ValaCCodeNode*) (_tmp19_ = vala_ccode_return_statement_new ((ValaCCodeExpression*) (_tmp18_ = vala_ccode_constant_new ("FALSE")))));
826
 
                        _vala_ccode_node_unref0 (_tmp19_);
827
 
                        _vala_ccode_node_unref0 (_tmp18_);
 
861
                if (_tmp19_) {
 
862
                        ValaCCodeReturnStatement* _tmp21_;
 
863
                        ValaCCodeConstant* _tmp20_;
 
864
                        vala_ccode_block_add_statement (cerror_block, (ValaCCodeNode*) (_tmp21_ = vala_ccode_return_statement_new ((ValaCCodeExpression*) (_tmp20_ = vala_ccode_constant_new ("FALSE")))));
 
865
                        _vala_ccode_node_unref0 (_tmp21_);
 
866
                        _vala_ccode_node_unref0 (_tmp20_);
828
867
                } else {
829
868
                        if (VALA_IS_VOID_TYPE (vala_ccode_base_module_get_current_return_type ((ValaCCodeBaseModule*) self))) {
830
 
                                ValaCCodeReturnStatement* _tmp20_;
831
 
                                vala_ccode_block_add_statement (cerror_block, (ValaCCodeNode*) (_tmp20_ = vala_ccode_return_statement_new (NULL)));
832
 
                                _vala_ccode_node_unref0 (_tmp20_);
 
869
                                ValaCCodeReturnStatement* _tmp22_;
 
870
                                vala_ccode_block_add_statement (cerror_block, (ValaCCodeNode*) (_tmp22_ = vala_ccode_return_statement_new (NULL)));
 
871
                                _vala_ccode_node_unref0 (_tmp22_);
833
872
                        } else {
834
873
                                if (vala_ccode_base_module_get_current_return_type ((ValaCCodeBaseModule*) self) != NULL) {
835
 
                                        ValaCCodeReturnStatement* _tmp22_;
836
 
                                        ValaCCodeExpression* _tmp21_;
837
 
                                        vala_ccode_block_add_statement (cerror_block, (ValaCCodeNode*) (_tmp22_ = vala_ccode_return_statement_new (_tmp21_ = vala_ccode_base_module_default_value_for_type ((ValaCCodeBaseModule*) self, vala_ccode_base_module_get_current_return_type ((ValaCCodeBaseModule*) self), FALSE))));
838
 
                                        _vala_ccode_node_unref0 (_tmp22_);
839
 
                                        _vala_ccode_node_unref0 (_tmp21_);
 
874
                                        ValaCCodeReturnStatement* _tmp24_;
 
875
                                        ValaCCodeExpression* _tmp23_;
 
876
                                        vala_ccode_block_add_statement (cerror_block, (ValaCCodeNode*) (_tmp24_ = vala_ccode_return_statement_new (_tmp23_ = vala_ccode_base_module_default_value_for_type ((ValaCCodeBaseModule*) self, vala_ccode_base_module_get_current_return_type ((ValaCCodeBaseModule*) self), FALSE))));
 
877
                                        _vala_ccode_node_unref0 (_tmp24_);
 
878
                                        _vala_ccode_node_unref0 (_tmp23_);
840
879
                                }
841
880
                        }
842
881
                }
851
890
}
852
891
 
853
892
 
854
 
static gpointer _vala_code_node_ref0 (gpointer self) {
855
 
        return self ? vala_code_node_ref (self) : NULL;
856
 
}
857
 
 
858
 
 
859
 
static gpointer _vala_ccode_node_ref0 (gpointer self) {
860
 
        return self ? vala_ccode_node_ref (self) : NULL;
 
893
static gboolean vala_gerror_module_in_finally_block (ValaGErrorModule* self, ValaCodeNode* node) {
 
894
        gboolean result;
 
895
        ValaCodeNode* current_node;
 
896
        g_return_val_if_fail (self != NULL, FALSE);
 
897
        g_return_val_if_fail (node != NULL, FALSE);
 
898
        current_node = _vala_code_node_ref0 (node);
 
899
        while (TRUE) {
 
900
                ValaCodeNode* _tmp0_;
 
901
                ValaTryStatement* try_stmt;
 
902
                gboolean _tmp1_ = FALSE;
 
903
                ValaCodeNode* _tmp2_;
 
904
                if (!(current_node != NULL)) {
 
905
                        break;
 
906
                }
 
907
                try_stmt = _vala_code_node_ref0 ((_tmp0_ = vala_code_node_get_parent_node (current_node), VALA_IS_TRY_STATEMENT (_tmp0_) ? ((ValaTryStatement*) _tmp0_) : NULL));
 
908
                if (try_stmt != NULL) {
 
909
                        _tmp1_ = VALA_CODE_NODE (vala_try_statement_get_finally_body (try_stmt)) == current_node;
 
910
                } else {
 
911
                        _tmp1_ = FALSE;
 
912
                }
 
913
                if (_tmp1_) {
 
914
                        result = TRUE;
 
915
                        _vala_code_node_unref0 (try_stmt);
 
916
                        _vala_code_node_unref0 (current_node);
 
917
                        return result;
 
918
                }
 
919
                current_node = (_tmp2_ = _vala_code_node_ref0 (vala_code_node_get_parent_node (current_node)), _vala_code_node_unref0 (current_node), _tmp2_);
 
920
                _vala_code_node_unref0 (try_stmt);
 
921
        }
 
922
        result = FALSE;
 
923
        _vala_code_node_unref0 (current_node);
 
924
        return result;
861
925
}
862
926
 
863
927
 
865
929
        ValaGErrorModule * self;
866
930
        ValaCCodeExpression* inner_error;
867
931
        ValaCCodeStatement* cerror_handler;
868
 
        ValaCCodeConstant* _tmp35_;
869
 
        ValaCCodeBinaryExpression* _tmp36_;
870
 
        ValaCCodeBinaryExpression* ccond;
871
 
        ValaCCodeIfStatement* _tmp37_;
872
932
        self = (ValaGErrorModule*) base;
873
933
        g_return_if_fail (node != NULL);
874
934
        g_return_if_fail (cfrag != NULL);
878
938
        if (((ValaCCodeBaseModule*) self)->current_try != NULL) {
879
939
                ValaCCodeBlock* cerror_block;
880
940
                ValaCCodeFragment* free_frag;
881
 
                ValaCCodeGotoStatement* _tmp16_;
882
 
                char* _tmp15_;
883
 
                ValaCCodeStatement* _tmp17_;
 
941
                ValaArrayList* error_types;
 
942
                gboolean has_general_catch_clause;
 
943
                ValaCCodeStatement* _tmp21_;
884
944
                cerror_block = vala_ccode_block_new ();
885
945
                free_frag = vala_ccode_fragment_new ();
886
946
                vala_ccode_base_module_append_error_free ((ValaCCodeBaseModule*) self, ((ValaCCodeBaseModule*) self)->current_symbol, free_frag, ((ValaCCodeBaseModule*) self)->current_try);
887
947
                vala_ccode_block_add_statement (cerror_block, (ValaCCodeNode*) free_frag);
 
948
                error_types = vala_array_list_new (VALA_TYPE_DATA_TYPE, (GBoxedCopyFunc) vala_code_node_ref, vala_code_node_unref, g_direct_equal);
 
949
                {
 
950
                        ValaList* _tmp0_;
 
951
                        ValaIterator* _tmp1_;
 
952
                        ValaIterator* _node_error_type_it;
 
953
                        _node_error_type_it = (_tmp1_ = vala_iterable_iterator ((ValaIterable*) (_tmp0_ = vala_code_node_get_error_types (node))), _vala_collection_object_unref0 (_tmp0_), _tmp1_);
 
954
                        while (TRUE) {
 
955
                                ValaDataType* node_error_type;
 
956
                                if (!vala_iterator_next (_node_error_type_it)) {
 
957
                                        break;
 
958
                                }
 
959
                                node_error_type = (ValaDataType*) vala_iterator_get (_node_error_type_it);
 
960
                                vala_collection_add ((ValaCollection*) error_types, node_error_type);
 
961
                                _vala_code_node_unref0 (node_error_type);
 
962
                        }
 
963
                        _vala_collection_object_unref0 (_node_error_type_it);
 
964
                }
 
965
                has_general_catch_clause = FALSE;
888
966
                if (!self->priv->is_in_catch) {
 
967
                        ValaArrayList* handled_error_types;
 
968
                        handled_error_types = vala_array_list_new (VALA_TYPE_DATA_TYPE, (GBoxedCopyFunc) vala_code_node_ref, vala_code_node_unref, g_direct_equal);
889
969
                        {
890
 
                                ValaList* _tmp0_;
891
 
                                ValaIterator* _tmp1_;
 
970
                                ValaList* _tmp2_;
 
971
                                ValaIterator* _tmp3_;
892
972
                                ValaIterator* _clause_it;
893
 
                                _clause_it = (_tmp1_ = vala_iterable_iterator ((ValaIterable*) (_tmp0_ = vala_try_statement_get_catch_clauses (((ValaCCodeBaseModule*) self)->current_try))), _vala_collection_object_unref0 (_tmp0_), _tmp1_);
 
973
                                _clause_it = (_tmp3_ = vala_iterable_iterator ((ValaIterable*) (_tmp2_ = vala_try_statement_get_catch_clauses (((ValaCCodeBaseModule*) self)->current_try))), _vala_collection_object_unref0 (_tmp2_), _tmp3_);
894
974
                                while (TRUE) {
895
975
                                        ValaCatchClause* clause;
896
976
                                        ValaCCodeGotoStatement* cgoto_stmt;
898
978
                                                break;
899
979
                                        }
900
980
                                        clause = (ValaCatchClause*) vala_iterator_get (_clause_it);
 
981
                                        {
 
982
                                                ValaIterator* _node_error_type_it;
 
983
                                                _node_error_type_it = vala_iterable_iterator ((ValaIterable*) error_types);
 
984
                                                while (TRUE) {
 
985
                                                        ValaDataType* node_error_type;
 
986
                                                        gboolean _tmp4_ = FALSE;
 
987
                                                        if (!vala_iterator_next (_node_error_type_it)) {
 
988
                                                                break;
 
989
                                                        }
 
990
                                                        node_error_type = (ValaDataType*) vala_iterator_get (_node_error_type_it);
 
991
                                                        if (vala_catch_clause_get_error_type (clause) == NULL) {
 
992
                                                                _tmp4_ = TRUE;
 
993
                                                        } else {
 
994
                                                                _tmp4_ = vala_data_type_compatible (node_error_type, vala_catch_clause_get_error_type (clause));
 
995
                                                        }
 
996
                                                        if (_tmp4_) {
 
997
                                                                vala_collection_add ((ValaCollection*) handled_error_types, node_error_type);
 
998
                                                        }
 
999
                                                        _vala_code_node_unref0 (node_error_type);
 
1000
                                                }
 
1001
                                                _vala_collection_object_unref0 (_node_error_type_it);
 
1002
                                        }
 
1003
                                        {
 
1004
                                                ValaIterator* _handled_error_type_it;
 
1005
                                                _handled_error_type_it = vala_iterable_iterator ((ValaIterable*) handled_error_types);
 
1006
                                                while (TRUE) {
 
1007
                                                        ValaDataType* handled_error_type;
 
1008
                                                        if (!vala_iterator_next (_handled_error_type_it)) {
 
1009
                                                                break;
 
1010
                                                        }
 
1011
                                                        handled_error_type = (ValaDataType*) vala_iterator_get (_handled_error_type_it);
 
1012
                                                        vala_collection_remove ((ValaCollection*) error_types, handled_error_type);
 
1013
                                                        _vala_code_node_unref0 (handled_error_type);
 
1014
                                                }
 
1015
                                                _vala_collection_object_unref0 (_handled_error_type_it);
 
1016
                                        }
 
1017
                                        vala_collection_clear ((ValaCollection*) handled_error_types);
901
1018
                                        cgoto_stmt = vala_ccode_goto_statement_new (vala_catch_clause_get_clabel_name (clause));
902
1019
                                        if (vala_data_type_equals (vala_catch_clause_get_error_type (clause), (ValaDataType*) ((ValaCCodeBaseModule*) self)->gerror_type)) {
 
1020
                                                has_general_catch_clause = TRUE;
903
1021
                                                vala_ccode_block_add_statement (cerror_block, (ValaCCodeNode*) cgoto_stmt);
904
1022
                                                _vala_code_node_unref0 (clause);
905
1023
                                                _vala_ccode_node_unref0 (cgoto_stmt);
906
1024
                                                break;
907
1025
                                        } else {
908
 
                                                ValaDataType* _tmp2_;
 
1026
                                                ValaDataType* _tmp5_;
909
1027
                                                ValaErrorType* catch_type;
910
1028
                                                ValaCCodeBlock* cgoto_block;
911
 
                                                catch_type = _vala_code_node_ref0 ((_tmp2_ = vala_catch_clause_get_error_type (clause), VALA_IS_ERROR_TYPE (_tmp2_) ? ((ValaErrorType*) _tmp2_) : NULL));
 
1029
                                                catch_type = _vala_code_node_ref0 ((_tmp5_ = vala_catch_clause_get_error_type (clause), VALA_IS_ERROR_TYPE (_tmp5_) ? ((ValaErrorType*) _tmp5_) : NULL));
912
1030
                                                cgoto_block = vala_ccode_block_new ();
913
1031
                                                vala_ccode_block_add_statement (cgoto_block, (ValaCCodeNode*) cgoto_stmt);
914
1032
                                                if (vala_error_type_get_error_code (catch_type) != NULL) {
915
 
                                                        ValaCCodeIdentifier* _tmp3_;
916
 
                                                        ValaCCodeFunctionCall* _tmp4_;
 
1033
                                                        ValaCCodeIdentifier* _tmp6_;
 
1034
                                                        ValaCCodeFunctionCall* _tmp7_;
917
1035
                                                        ValaCCodeFunctionCall* error_match;
918
 
                                                        ValaCCodeIdentifier* _tmp6_;
919
 
                                                        char* _tmp5_;
920
 
                                                        ValaCCodeIdentifier* _tmp8_;
921
 
                                                        char* _tmp7_;
922
 
                                                        ValaCCodeIfStatement* _tmp9_;
923
 
                                                        error_match = (_tmp4_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp3_ = vala_ccode_identifier_new ("g_error_matches"))), _vala_ccode_node_unref0 (_tmp3_), _tmp4_);
 
1036
                                                        ValaCCodeIdentifier* _tmp9_;
 
1037
                                                        char* _tmp8_;
 
1038
                                                        ValaCCodeIdentifier* _tmp11_;
 
1039
                                                        char* _tmp10_;
 
1040
                                                        ValaCCodeIfStatement* _tmp12_;
 
1041
                                                        error_match = (_tmp7_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp6_ = vala_ccode_identifier_new ("g_error_matches"))), _vala_ccode_node_unref0 (_tmp6_), _tmp7_);
924
1042
                                                        vala_ccode_function_call_add_argument (error_match, inner_error);
925
 
                                                        vala_ccode_function_call_add_argument (error_match, (ValaCCodeExpression*) (_tmp6_ = vala_ccode_identifier_new (_tmp5_ = vala_typesymbol_get_upper_case_cname (vala_data_type_get_data_type ((ValaDataType*) catch_type), NULL))));
926
 
                                                        _vala_ccode_node_unref0 (_tmp6_);
927
 
                                                        _g_free0 (_tmp5_);
928
 
                                                        vala_ccode_function_call_add_argument (error_match, (ValaCCodeExpression*) (_tmp8_ = vala_ccode_identifier_new (_tmp7_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) vala_error_type_get_error_code (catch_type), FALSE))));
929
 
                                                        _vala_ccode_node_unref0 (_tmp8_);
930
 
                                                        _g_free0 (_tmp7_);
931
 
                                                        vala_ccode_block_add_statement (cerror_block, (ValaCCodeNode*) (_tmp9_ = vala_ccode_if_statement_new ((ValaCCodeExpression*) error_match, (ValaCCodeStatement*) cgoto_block, NULL)));
 
1043
                                                        vala_ccode_function_call_add_argument (error_match, (ValaCCodeExpression*) (_tmp9_ = vala_ccode_identifier_new (_tmp8_ = vala_typesymbol_get_upper_case_cname (vala_data_type_get_data_type ((ValaDataType*) catch_type), NULL))));
932
1044
                                                        _vala_ccode_node_unref0 (_tmp9_);
 
1045
                                                        _g_free0 (_tmp8_);
 
1046
                                                        vala_ccode_function_call_add_argument (error_match, (ValaCCodeExpression*) (_tmp11_ = vala_ccode_identifier_new (_tmp10_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) vala_error_type_get_error_code (catch_type), FALSE))));
 
1047
                                                        _vala_ccode_node_unref0 (_tmp11_);
 
1048
                                                        _g_free0 (_tmp10_);
 
1049
                                                        vala_ccode_block_add_statement (cerror_block, (ValaCCodeNode*) (_tmp12_ = vala_ccode_if_statement_new ((ValaCCodeExpression*) error_match, (ValaCCodeStatement*) cgoto_block, NULL)));
 
1050
                                                        _vala_ccode_node_unref0 (_tmp12_);
933
1051
                                                        _vala_ccode_node_unref0 (error_match);
934
1052
                                                } else {
935
 
                                                        ValaCCodeIdentifier* _tmp12_;
936
 
                                                        char* _tmp11_;
937
 
                                                        ValaCCodeMemberAccess* _tmp10_;
938
 
                                                        ValaCCodeBinaryExpression* _tmp13_;
 
1053
                                                        ValaCCodeIdentifier* _tmp15_;
 
1054
                                                        char* _tmp14_;
 
1055
                                                        ValaCCodeMemberAccess* _tmp13_;
 
1056
                                                        ValaCCodeBinaryExpression* _tmp16_;
939
1057
                                                        ValaCCodeBinaryExpression* ccond;
940
 
                                                        ValaCCodeIfStatement* _tmp14_;
941
 
                                                        ccond = (_tmp13_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_EQUALITY, (ValaCCodeExpression*) (_tmp10_ = vala_ccode_member_access_new_pointer (inner_error, "domain")), (ValaCCodeExpression*) (_tmp12_ = vala_ccode_identifier_new (_tmp11_ = vala_typesymbol_get_upper_case_cname (vala_data_type_get_data_type (vala_catch_clause_get_error_type (clause)), NULL)))), _vala_ccode_node_unref0 (_tmp12_), _g_free0 (_tmp11_), _vala_ccode_node_unref0 (_tmp10_), _tmp13_);
942
 
                                                        vala_ccode_block_add_statement (cerror_block, (ValaCCodeNode*) (_tmp14_ = vala_ccode_if_statement_new ((ValaCCodeExpression*) ccond, (ValaCCodeStatement*) cgoto_block, NULL)));
943
 
                                                        _vala_ccode_node_unref0 (_tmp14_);
 
1058
                                                        ValaCCodeIfStatement* _tmp17_;
 
1059
                                                        ccond = (_tmp16_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_EQUALITY, (ValaCCodeExpression*) (_tmp13_ = vala_ccode_member_access_new_pointer (inner_error, "domain")), (ValaCCodeExpression*) (_tmp15_ = vala_ccode_identifier_new (_tmp14_ = vala_typesymbol_get_upper_case_cname (vala_data_type_get_data_type (vala_catch_clause_get_error_type (clause)), NULL)))), _vala_ccode_node_unref0 (_tmp15_), _g_free0 (_tmp14_), _vala_ccode_node_unref0 (_tmp13_), _tmp16_);
 
1060
                                                        vala_ccode_block_add_statement (cerror_block, (ValaCCodeNode*) (_tmp17_ = vala_ccode_if_statement_new ((ValaCCodeExpression*) ccond, (ValaCCodeStatement*) cgoto_block, NULL)));
 
1061
                                                        _vala_ccode_node_unref0 (_tmp17_);
944
1062
                                                        _vala_ccode_node_unref0 (ccond);
945
1063
                                                }
946
1064
                                                _vala_code_node_unref0 (catch_type);
951
1069
                                }
952
1070
                                _vala_collection_object_unref0 (_clause_it);
953
1071
                        }
954
 
                }
955
 
                vala_ccode_block_add_statement (cerror_block, (ValaCCodeNode*) (_tmp16_ = vala_ccode_goto_statement_new (_tmp15_ = g_strdup_printf ("__finally%d", self->priv->current_try_id))));
956
 
                _vala_ccode_node_unref0 (_tmp16_);
957
 
                _g_free0 (_tmp15_);
958
 
                cerror_handler = (_tmp17_ = _vala_ccode_node_ref0 ((ValaCCodeStatement*) cerror_block), _vala_ccode_node_unref0 (cerror_handler), _tmp17_);
 
1072
                        _vala_collection_object_unref0 (handled_error_types);
 
1073
                }
 
1074
                if (has_general_catch_clause) {
 
1075
                } else {
 
1076
                        if (vala_collection_get_size ((ValaCollection*) error_types) > 0) {
 
1077
                                ValaCCodeGotoStatement* _tmp19_;
 
1078
                                char* _tmp18_;
 
1079
                                vala_ccode_block_add_statement (cerror_block, (ValaCCodeNode*) (_tmp19_ = vala_ccode_goto_statement_new (_tmp18_ = g_strdup_printf ("__finally%d", self->priv->current_try_id))));
 
1080
                                _vala_ccode_node_unref0 (_tmp19_);
 
1081
                                _g_free0 (_tmp18_);
 
1082
                        } else {
 
1083
                                if (vala_gerror_module_in_finally_block (self, node)) {
 
1084
                                } else {
 
1085
                                        ValaCCodeStatement* _tmp20_;
 
1086
                                        _tmp20_ = vala_gerror_module_uncaught_error_statement (self, inner_error, cerror_block, TRUE);
 
1087
                                        _vala_ccode_node_unref0 (_tmp20_);
 
1088
                                }
 
1089
                        }
 
1090
                }
 
1091
                cerror_handler = (_tmp21_ = _vala_ccode_node_ref0 ((ValaCCodeStatement*) cerror_block), _vala_ccode_node_unref0 (cerror_handler), _tmp21_);
959
1092
                _vala_ccode_node_unref0 (cerror_block);
960
1093
                _vala_ccode_node_unref0 (free_frag);
 
1094
                _vala_collection_object_unref0 (error_types);
961
1095
        } else {
962
 
                gboolean _tmp18_ = FALSE;
 
1096
                gboolean _tmp22_ = FALSE;
963
1097
                if (vala_ccode_base_module_get_current_method ((ValaCCodeBaseModule*) self) != NULL) {
964
 
                        ValaList* _tmp19_;
965
 
                        _tmp18_ = vala_collection_get_size ((ValaCollection*) (_tmp19_ = vala_code_node_get_error_types ((ValaCodeNode*) vala_ccode_base_module_get_current_method ((ValaCCodeBaseModule*) self)))) > 0;
966
 
                        _vala_collection_object_unref0 (_tmp19_);
 
1098
                        ValaList* _tmp23_;
 
1099
                        _tmp22_ = vala_collection_get_size ((ValaCollection*) (_tmp23_ = vala_code_node_get_error_types ((ValaCodeNode*) vala_ccode_base_module_get_current_method ((ValaCCodeBaseModule*) self)))) > 0;
 
1100
                        _vala_collection_object_unref0 (_tmp23_);
967
1101
                } else {
968
 
                        _tmp18_ = FALSE;
 
1102
                        _tmp22_ = FALSE;
969
1103
                }
970
 
                if (_tmp18_) {
 
1104
                if (_tmp22_) {
971
1105
                        ValaCCodeBinaryExpression* ccond;
972
1106
                        ccond = NULL;
973
1107
                        {
974
 
                                ValaList* _tmp20_;
975
 
                                ValaIterator* _tmp21_;
 
1108
                                ValaList* _tmp24_;
 
1109
                                ValaIterator* _tmp25_;
976
1110
                                ValaIterator* _error_type_it;
977
 
                                _error_type_it = (_tmp21_ = vala_iterable_iterator ((ValaIterable*) (_tmp20_ = vala_code_node_get_error_types ((ValaCodeNode*) vala_ccode_base_module_get_current_method ((ValaCCodeBaseModule*) self)))), _vala_collection_object_unref0 (_tmp20_), _tmp21_);
 
1111
                                _error_type_it = (_tmp25_ = vala_iterable_iterator ((ValaIterable*) (_tmp24_ = vala_code_node_get_error_types ((ValaCodeNode*) vala_ccode_base_module_get_current_method ((ValaCCodeBaseModule*) self)))), _vala_collection_object_unref0 (_tmp24_), _tmp25_);
978
1112
                                while (TRUE) {
979
1113
                                        ValaDataType* error_type;
980
 
                                        ValaCCodeIdentifier* _tmp25_;
981
 
                                        char* _tmp24_;
982
 
                                        ValaCCodeMemberAccess* _tmp23_;
983
 
                                        ValaCCodeBinaryExpression* _tmp26_;
 
1114
                                        ValaCCodeIdentifier* _tmp29_;
 
1115
                                        char* _tmp28_;
 
1116
                                        ValaCCodeMemberAccess* _tmp27_;
 
1117
                                        ValaCCodeBinaryExpression* _tmp30_;
984
1118
                                        ValaCCodeBinaryExpression* domain_check;
985
1119
                                        if (!vala_iterator_next (_error_type_it)) {
986
1120
                                                break;
987
1121
                                        }
988
1122
                                        error_type = (ValaDataType*) vala_iterator_get (_error_type_it);
989
1123
                                        if (vala_data_type_equals (error_type, (ValaDataType*) ((ValaCCodeBaseModule*) self)->gerror_type)) {
990
 
                                                ValaCCodeBinaryExpression* _tmp22_;
991
 
                                                ccond = (_tmp22_ = NULL, _vala_ccode_node_unref0 (ccond), _tmp22_);
 
1124
                                                ValaCCodeBinaryExpression* _tmp26_;
 
1125
                                                ccond = (_tmp26_ = NULL, _vala_ccode_node_unref0 (ccond), _tmp26_);
992
1126
                                                _vala_code_node_unref0 (error_type);
993
1127
                                                break;
994
1128
                                        }
995
 
                                        domain_check = (_tmp26_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_EQUALITY, (ValaCCodeExpression*) (_tmp23_ = vala_ccode_member_access_new_pointer (inner_error, "domain")), (ValaCCodeExpression*) (_tmp25_ = vala_ccode_identifier_new (_tmp24_ = vala_typesymbol_get_upper_case_cname (vala_data_type_get_data_type (error_type), NULL)))), _vala_ccode_node_unref0 (_tmp25_), _g_free0 (_tmp24_), _vala_ccode_node_unref0 (_tmp23_), _tmp26_);
 
1129
                                        domain_check = (_tmp30_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_EQUALITY, (ValaCCodeExpression*) (_tmp27_ = vala_ccode_member_access_new_pointer (inner_error, "domain")), (ValaCCodeExpression*) (_tmp29_ = vala_ccode_identifier_new (_tmp28_ = vala_typesymbol_get_upper_case_cname (vala_data_type_get_data_type (error_type), NULL)))), _vala_ccode_node_unref0 (_tmp29_), _g_free0 (_tmp28_), _vala_ccode_node_unref0 (_tmp27_), _tmp30_);
996
1130
                                        if (ccond == NULL) {
997
 
                                                ValaCCodeBinaryExpression* _tmp27_;
998
 
                                                ccond = (_tmp27_ = _vala_ccode_node_ref0 (domain_check), _vala_ccode_node_unref0 (ccond), _tmp27_);
 
1131
                                                ValaCCodeBinaryExpression* _tmp31_;
 
1132
                                                ccond = (_tmp31_ = _vala_ccode_node_ref0 (domain_check), _vala_ccode_node_unref0 (ccond), _tmp31_);
999
1133
                                        } else {
1000
 
                                                ValaCCodeBinaryExpression* _tmp28_;
1001
 
                                                ccond = (_tmp28_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_OR, (ValaCCodeExpression*) ccond, (ValaCCodeExpression*) domain_check), _vala_ccode_node_unref0 (ccond), _tmp28_);
 
1134
                                                ValaCCodeBinaryExpression* _tmp32_;
 
1135
                                                ccond = (_tmp32_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_OR, (ValaCCodeExpression*) ccond, (ValaCCodeExpression*) domain_check), _vala_ccode_node_unref0 (ccond), _tmp32_);
1002
1136
                                        }
1003
1137
                                        _vala_code_node_unref0 (error_type);
1004
1138
                                        _vala_ccode_node_unref0 (domain_check);
1006
1140
                                _vala_collection_object_unref0 (_error_type_it);
1007
1141
                        }
1008
1142
                        if (ccond == NULL) {
1009
 
                                ValaCCodeStatement* _tmp29_;
1010
 
                                cerror_handler = (_tmp29_ = vala_gerror_module_return_with_exception (self, inner_error), _vala_ccode_node_unref0 (cerror_handler), _tmp29_);
 
1143
                                ValaCCodeStatement* _tmp33_;
 
1144
                                cerror_handler = (_tmp33_ = vala_gerror_module_return_with_exception (self, inner_error), _vala_ccode_node_unref0 (cerror_handler), _tmp33_);
1011
1145
                        } else {
1012
1146
                                ValaCCodeBlock* cerror_block;
1013
 
                                ValaCCodeIfStatement* _tmp32_;
1014
 
                                ValaCCodeStatement* _tmp31_;
1015
 
                                ValaCCodeStatement* _tmp30_;
1016
 
                                ValaCCodeStatement* _tmp33_;
 
1147
                                ValaCCodeIfStatement* _tmp36_;
 
1148
                                ValaCCodeStatement* _tmp35_;
 
1149
                                ValaCCodeStatement* _tmp34_;
 
1150
                                ValaCCodeStatement* _tmp37_;
1017
1151
                                cerror_block = vala_ccode_block_new ();
1018
 
                                vala_ccode_block_add_statement (cerror_block, (ValaCCodeNode*) (_tmp32_ = vala_ccode_if_statement_new ((ValaCCodeExpression*) ccond, _tmp30_ = vala_gerror_module_return_with_exception (self, inner_error), _tmp31_ = vala_gerror_module_uncaught_error_statement (self, inner_error))));
1019
 
                                _vala_ccode_node_unref0 (_tmp32_);
1020
 
                                _vala_ccode_node_unref0 (_tmp31_);
1021
 
                                _vala_ccode_node_unref0 (_tmp30_);
1022
 
                                cerror_handler = (_tmp33_ = _vala_ccode_node_ref0 ((ValaCCodeStatement*) cerror_block), _vala_ccode_node_unref0 (cerror_handler), _tmp33_);
 
1152
                                vala_ccode_block_add_statement (cerror_block, (ValaCCodeNode*) (_tmp36_ = vala_ccode_if_statement_new ((ValaCCodeExpression*) ccond, _tmp34_ = vala_gerror_module_return_with_exception (self, inner_error), _tmp35_ = vala_gerror_module_uncaught_error_statement (self, inner_error, NULL, FALSE))));
 
1153
                                _vala_ccode_node_unref0 (_tmp36_);
 
1154
                                _vala_ccode_node_unref0 (_tmp35_);
 
1155
                                _vala_ccode_node_unref0 (_tmp34_);
 
1156
                                cerror_handler = (_tmp37_ = _vala_ccode_node_ref0 ((ValaCCodeStatement*) cerror_block), _vala_ccode_node_unref0 (cerror_handler), _tmp37_);
1023
1157
                                _vala_ccode_node_unref0 (cerror_block);
1024
1158
                        }
1025
1159
                        _vala_ccode_node_unref0 (ccond);
1026
1160
                } else {
1027
 
                        ValaCCodeStatement* _tmp34_;
1028
 
                        cerror_handler = (_tmp34_ = vala_gerror_module_uncaught_error_statement (self, inner_error), _vala_ccode_node_unref0 (cerror_handler), _tmp34_);
 
1161
                        ValaCCodeStatement* _tmp38_;
 
1162
                        cerror_handler = (_tmp38_ = vala_gerror_module_uncaught_error_statement (self, inner_error, NULL, FALSE), _vala_ccode_node_unref0 (cerror_handler), _tmp38_);
1029
1163
                }
1030
1164
        }
1031
 
        ccond = (_tmp36_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_INEQUALITY, inner_error, (ValaCCodeExpression*) (_tmp35_ = vala_ccode_constant_new ("NULL"))), _vala_ccode_node_unref0 (_tmp35_), _tmp36_);
1032
 
        vala_ccode_fragment_append (cfrag, (ValaCCodeNode*) (_tmp37_ = vala_ccode_if_statement_new ((ValaCCodeExpression*) ccond, cerror_handler, NULL)));
1033
 
        _vala_ccode_node_unref0 (_tmp37_);
 
1165
        if (VALA_IS_THROW_STATEMENT (node)) {
 
1166
                vala_ccode_fragment_append (cfrag, (ValaCCodeNode*) cerror_handler);
 
1167
        } else {
 
1168
                ValaCCodeConstant* _tmp39_;
 
1169
                ValaCCodeBinaryExpression* _tmp40_;
 
1170
                ValaCCodeBinaryExpression* ccond;
 
1171
                ValaCCodeIfStatement* _tmp41_;
 
1172
                ccond = (_tmp40_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_INEQUALITY, inner_error, (ValaCCodeExpression*) (_tmp39_ = vala_ccode_constant_new ("NULL"))), _vala_ccode_node_unref0 (_tmp39_), _tmp40_);
 
1173
                vala_ccode_fragment_append (cfrag, (ValaCCodeNode*) (_tmp41_ = vala_ccode_if_statement_new ((ValaCCodeExpression*) ccond, cerror_handler, NULL)));
 
1174
                _vala_ccode_node_unref0 (_tmp41_);
 
1175
                _vala_ccode_node_unref0 (ccond);
 
1176
        }
1034
1177
        _vala_ccode_node_unref0 (inner_error);
1035
1178
        _vala_ccode_node_unref0 (cerror_handler);
1036
 
        _vala_ccode_node_unref0 (ccond);
1037
1179
}
1038
1180
 
1039
1181