~ubuntu-branches/ubuntu/vivid/vala/vivid

« back to all changes in this revision

Viewing changes to codegen/valadovamethodcallmodule.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2010-07-28 07:58:01 UTC
  • mfrom: (1.5.5 upstream) (7.3.14 experimental)
  • Revision ID: james.westby@ubuntu.com-20100728075801-18u9cg5hv5oety6m
Tags: 0.9.4-1
New upstream development release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
161
161
        void (*visit_enum) (ValaCCodeModule* self, ValaEnum* en);
162
162
        void (*visit_error_domain) (ValaCCodeModule* self, ValaErrorDomain* edomain);
163
163
        void (*visit_delegate) (ValaCCodeModule* self, ValaDelegate* d);
164
 
        void (*visit_member) (ValaCCodeModule* self, ValaMember* m);
 
164
        void (*visit_member) (ValaCCodeModule* self, ValaSymbol* m);
165
165
        void (*visit_constant) (ValaCCodeModule* self, ValaConstant* c);
166
166
        void (*visit_field) (ValaCCodeModule* self, ValaField* f);
167
167
        void (*visit_method) (ValaCCodeModule* self, ValaMethod* m);
268
268
        ValaArrayList* temp_ref_vars;
269
269
        gint next_temp_var_id;
270
270
        gint next_wrapper_id;
271
 
        gint next_string_const_id;
272
 
        gboolean current_method_inner_error;
273
271
        ValaDataType* void_type;
274
272
        ValaDataType* bool_type;
275
273
        ValaDataType* char_type;
678
676
                                                if (vala_formal_parameter_get_direction (param) == VALA_PARAMETER_DIRECTION_OUT) {
679
677
                                                        _tmp50_ = TRUE;
680
678
                                                } else {
681
 
                                                        _tmp50_ = !vala_data_type_get_value_owned (vala_formal_parameter_get_parameter_type (param));
 
679
                                                        _tmp50_ = !vala_data_type_get_value_owned (vala_variable_get_variable_type ((ValaVariable*) param));
682
680
                                                }
683
681
                                                _tmp48_ = _tmp50_;
684
682
                                        } else {
685
683
                                                _tmp48_ = FALSE;
686
684
                                        }
687
685
                                        if (_tmp48_) {
688
 
                                                _tmp47_ = !VALA_IS_ARRAY_TYPE (vala_formal_parameter_get_parameter_type (param));
 
686
                                                _tmp47_ = !VALA_IS_ARRAY_TYPE (vala_variable_get_variable_type ((ValaVariable*) param));
689
687
                                        } else {
690
688
                                                _tmp47_ = FALSE;
691
689
                                        }
712
710
                                                ValaCCodeExpression* _tmp72_;
713
711
                                                unary = _vala_code_node_ref0 (VALA_UNARY_EXPRESSION (arg));
714
712
                                                ccomma = vala_ccode_comma_expression_new ();
715
 
                                                temp_var = vala_dova_base_module_get_temp_variable ((ValaDovaBaseModule*) self, vala_formal_parameter_get_parameter_type (param), vala_data_type_get_value_owned (vala_formal_parameter_get_parameter_type (param)), NULL);
 
713
                                                temp_var = vala_dova_base_module_get_temp_variable ((ValaDovaBaseModule*) self, vala_variable_get_variable_type ((ValaVariable*) param), vala_data_type_get_value_owned (vala_variable_get_variable_type ((ValaVariable*) param)), NULL);
716
714
                                                vala_list_insert ((ValaList*) ((ValaDovaBaseModule*) self)->temp_vars, 0, temp_var);
717
715
                                                cexpr = (_tmp52_ = (ValaCCodeExpression*) vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, _tmp51_ = vala_dova_base_module_get_variable_cexpression ((ValaDovaBaseModule*) self, vala_symbol_get_name ((ValaSymbol*) temp_var))), _vala_ccode_node_unref0 (cexpr), _tmp52_);
718
716
                                                _vala_ccode_node_unref0 (_tmp51_);
747
745
                                                cassign_comma = vala_ccode_comma_expression_new ();
748
746
                                                assign_temp_var = vala_dova_base_module_get_temp_variable ((ValaDovaBaseModule*) self, vala_expression_get_value_type (vala_unary_expression_get_inner (unary)), vala_data_type_get_value_owned (vala_expression_get_value_type (vala_unary_expression_get_inner (unary))), NULL);
749
747
                                                vala_list_insert ((ValaList*) ((ValaDovaBaseModule*) self)->temp_vars, 0, assign_temp_var);
750
 
                                                vala_ccode_comma_expression_append_expression (cassign_comma, (ValaCCodeExpression*) (_tmp65_ = vala_ccode_assignment_new (_tmp62_ = vala_dova_base_module_get_variable_cexpression ((ValaDovaBaseModule*) self, vala_symbol_get_name ((ValaSymbol*) assign_temp_var)), _tmp64_ = vala_dova_base_module_transform_expression ((ValaDovaBaseModule*) self, _tmp63_ = vala_dova_base_module_get_variable_cexpression ((ValaDovaBaseModule*) self, vala_symbol_get_name ((ValaSymbol*) temp_var)), vala_formal_parameter_get_parameter_type (param), vala_expression_get_value_type (vala_unary_expression_get_inner (unary)), arg), VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)));
 
748
                                                vala_ccode_comma_expression_append_expression (cassign_comma, (ValaCCodeExpression*) (_tmp65_ = vala_ccode_assignment_new (_tmp62_ = vala_dova_base_module_get_variable_cexpression ((ValaDovaBaseModule*) self, vala_symbol_get_name ((ValaSymbol*) assign_temp_var)), _tmp64_ = vala_dova_base_module_transform_expression ((ValaDovaBaseModule*) self, _tmp63_ = vala_dova_base_module_get_variable_cexpression ((ValaDovaBaseModule*) self, vala_symbol_get_name ((ValaSymbol*) temp_var)), vala_variable_get_variable_type ((ValaVariable*) param), vala_expression_get_value_type (vala_unary_expression_get_inner (unary)), arg), VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE)));
751
749
                                                _vala_ccode_node_unref0 (_tmp65_);
752
750
                                                _vala_ccode_node_unref0 (_tmp64_);
753
751
                                                _vala_ccode_node_unref0 (_tmp63_);
818
816
                _vala_code_node_unref0 (temp_var);
819
817
                _vala_ccode_node_unref0 (ccomma);
820
818
        }
821
 
        if (vala_code_node_get_tree_can_fail ((ValaCodeNode*) expr)) {
822
 
                ValaCCodeUnaryExpression* _tmp82_;
823
 
                ValaCCodeExpression* _tmp81_;
824
 
                ((ValaDovaBaseModule*) self)->current_method_inner_error = TRUE;
825
 
                vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) (_tmp82_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, _tmp81_ = vala_dova_base_module_get_variable_cexpression ((ValaDovaBaseModule*) self, "_inner_error_"))));
826
 
                _vala_ccode_node_unref0 (_tmp82_);
827
 
                _vala_ccode_node_unref0 (_tmp81_);
828
 
        }
829
819
        vala_code_node_set_ccodenode ((ValaCodeNode*) expr, (ValaCCodeNode*) ccall_expr);
830
820
        _vala_collection_object_unref0 (params_it);
831
821
        _vala_ccode_node_unref0 (ccall_expr);