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_);
721
ValaCCodeIdentifier* _tmp6_;
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);
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));
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_);
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_);
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_);
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_);
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;
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_;
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_);
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_);
821
_tmp3_ = "\"file %s: line %d: unexpected error: %s (%s, %d)\"";
823
_tmp3_ = "\"file %s: line %d: uncaught error: %s (%s, %d)\"";
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_);
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));
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_);
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_);
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_);
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_);
878
938
if (((ValaCCodeBaseModule*) self)->current_try != NULL) {
879
939
ValaCCodeBlock* cerror_block;
880
940
ValaCCodeFragment* free_frag;
881
ValaCCodeGotoStatement* _tmp16_;
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);
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_);
955
ValaDataType* node_error_type;
956
if (!vala_iterator_next (_node_error_type_it)) {
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);
963
_vala_collection_object_unref0 (_node_error_type_it);
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);
891
ValaIterator* _tmp1_;
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_);
895
975
ValaCatchClause* clause;
896
976
ValaCCodeGotoStatement* cgoto_stmt;
900
980
clause = (ValaCatchClause*) vala_iterator_get (_clause_it);
982
ValaIterator* _node_error_type_it;
983
_node_error_type_it = vala_iterable_iterator ((ValaIterable*) error_types);
985
ValaDataType* node_error_type;
986
gboolean _tmp4_ = FALSE;
987
if (!vala_iterator_next (_node_error_type_it)) {
990
node_error_type = (ValaDataType*) vala_iterator_get (_node_error_type_it);
991
if (vala_catch_clause_get_error_type (clause) == NULL) {
994
_tmp4_ = vala_data_type_compatible (node_error_type, vala_catch_clause_get_error_type (clause));
997
vala_collection_add ((ValaCollection*) handled_error_types, node_error_type);
999
_vala_code_node_unref0 (node_error_type);
1001
_vala_collection_object_unref0 (_node_error_type_it);
1004
ValaIterator* _handled_error_type_it;
1005
_handled_error_type_it = vala_iterable_iterator ((ValaIterable*) handled_error_types);
1007
ValaDataType* handled_error_type;
1008
if (!vala_iterator_next (_handled_error_type_it)) {
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);
1015
_vala_collection_object_unref0 (_handled_error_type_it);
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);
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_;
920
ValaCCodeIdentifier* _tmp8_;
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_;
1038
ValaCCodeIdentifier* _tmp11_;
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_);
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_);
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_);
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_);
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);
935
ValaCCodeIdentifier* _tmp12_;
937
ValaCCodeMemberAccess* _tmp10_;
938
ValaCCodeBinaryExpression* _tmp13_;
1053
ValaCCodeIdentifier* _tmp15_;
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);
946
1064
_vala_code_node_unref0 (catch_type);
952
1070
_vala_collection_object_unref0 (_clause_it);
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_);
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);
1074
if (has_general_catch_clause) {
1076
if (vala_collection_get_size ((ValaCollection*) error_types) > 0) {
1077
ValaCCodeGotoStatement* _tmp19_;
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_);
1083
if (vala_gerror_module_in_finally_block (self, node)) {
1085
ValaCCodeStatement* _tmp20_;
1086
_tmp20_ = vala_gerror_module_uncaught_error_statement (self, inner_error, cerror_block, TRUE);
1087
_vala_ccode_node_unref0 (_tmp20_);
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);
962
gboolean _tmp18_ = FALSE;
1096
gboolean _tmp22_ = FALSE;
963
1097
if (vala_ccode_base_module_get_current_method ((ValaCCodeBaseModule*) self) != NULL) {
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_);
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_);
971
1105
ValaCCodeBinaryExpression* ccond;
975
ValaIterator* _tmp21_;
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_);
979
1113
ValaDataType* error_type;
980
ValaCCodeIdentifier* _tmp25_;
982
ValaCCodeMemberAccess* _tmp23_;
983
ValaCCodeBinaryExpression* _tmp26_;
1114
ValaCCodeIdentifier* _tmp29_;
1116
ValaCCodeMemberAccess* _tmp27_;
1117
ValaCCodeBinaryExpression* _tmp30_;
984
1118
ValaCCodeBinaryExpression* domain_check;
985
1119
if (!vala_iterator_next (_error_type_it)) {
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);
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_);
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_);
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);
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_);
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);
1025
1159
_vala_ccode_node_unref0 (ccond);
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_);
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);
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);
1034
1177
_vala_ccode_node_unref0 (inner_error);
1035
1178
_vala_ccode_node_unref0 (cerror_handler);
1036
_vala_ccode_node_unref0 (ccond);