Example #1
0
 private void VisitWhile(while_node stmt)
 {
     RetVal rv = GetConstantValue(stmt.condition);
     VisitExpression(stmt.condition);
     if (rv == RetVal.False)
         is_break_stmt = true;
     VisitStatement(stmt.body);
 }
        public override void visit(SyntaxTree.while_node _while_node)
        {
            expression_node expr = convert_strong(_while_node.expr);
            expr = convertion_data_and_alghoritms.convert_type(expr, SystemLibrary.SystemLibrary.bool_type);

            CheckToEmbeddedStatementCannotBeADeclaration(_while_node.statements);

            while_node wn = new while_node(expr, get_location(_while_node));
            context.cycle_stack.push(wn);

            statements_list sl = new statements_list(get_location(_while_node.statements));
            convertion_data_and_alghoritms.statement_list_stack_push(sl);

            context.enter_code_block_with_bind();
            statement_node st = convert_strong(_while_node.statements);
            context.leave_code_block();

            sl = convertion_data_and_alghoritms.statement_list_stack.pop();
            if (sl.statements.Count > 0 || sl.local_variables.Count > 0)
            {
                sl.statements.AddElement(st);
                st = sl;
            }

            wn.body = st;
            context.cycle_stack.pop();
            return_value(wn);
        }
		private void VisitWhile(while_node stmt)
		{
			VisitExpression(stmt.condition);
			VisitStatement(stmt.body);
		}
Example #4
0
 /// <summary>
 /// Конструктор класса.
 /// </summary>
 /// <param name="whnd">Узел while из которого ведет этот break.</param>
 /// <param name="loc">Расположение узла.</param>
 public while_break_node(while_node whnd, location loc) :
     base(null, loc)
 {
     _whnd = whnd;
 }
        internal void add_clip_for_set(common_function_node cfn)
        {
        	statements_list sl = cfn.function_code as statements_list;
        	if (sl == null) return;
        	foreach (common_parameter prm in cfn.parameters)
        	{
        		if (prm.type.type_special_kind == SemanticTree.type_special_kind.set_type && prm.parameter_type == SemanticTree.parameter_type.value ||
        		   prm.is_params && prm.type.element_type.type_special_kind == SemanticTree.type_special_kind.set_type)
        		{
        			if (!prm.is_params)
        			{
        				ordinal_type_interface oti = prm.type.element_type.get_internal_interface(internal_interface_kind.ordinal_interface) as ordinal_type_interface;
        				if (oti == null)
        				if (prm.type.element_type.type_special_kind == SemanticTree.type_special_kind.short_string)
        				{
                            base_function_call cmc2 = null;
                            if (SystemLibrary.SystemLibInitializer.ClipShortStringInSetProcedure.sym_info is common_namespace_function_node)
                                cmc2 = new common_namespace_function_call(SystemLibrary.SystemLibInitializer.ClipShortStringInSetProcedure.sym_info as common_namespace_function_node, null);
                            else
                                cmc2 = new compiled_static_method_call(SystemLibrary.SystemLibInitializer.ClipShortStringInSetProcedure.sym_info as compiled_function_node, null);
        					cmc2.parameters.AddElement(new common_parameter_reference(prm,0,null));
        					cmc2.parameters.AddElement(new int_const_node((prm.type.element_type as short_string_type_node).Length,null));
        					sl.statements.AddElementFirst(cmc2);
        					continue;
        				}
        				else continue;
                        base_function_call cmc = null;
                        if (SystemLibrary.SystemLibInitializer.ClipProcedure.sym_info is common_namespace_function_node)
                            cmc = new common_namespace_function_call(SystemLibrary.SystemLibInitializer.ClipProcedure.sym_info as common_namespace_function_node, null);
                        else
                            cmc = new compiled_static_method_call(SystemLibrary.SystemLibInitializer.ClipProcedure.sym_info as compiled_function_node, null);
        				cmc.parameters.AddElement(new common_parameter_reference(prm,0,null));
        			
        				cmc.parameters.AddElement(oti.lower_value);
        				cmc.parameters.AddElement(oti.upper_value);
        				sl.statements.AddElementFirst(cmc);
        			}
        			else
        			{
        				var_definition_node var = context.create_for_temp_variable(prm.type.element_type,null);
        				expression_node in_what = new common_parameter_reference(prm,0,null);
        				statements_list what_do = new statements_list(null);
        				ordinal_type_interface oti = prm.type.element_type.element_type.get_internal_interface(internal_interface_kind.ordinal_interface) as ordinal_type_interface;
        				bool short_str = false;
        				if (oti == null)
        				if (prm.type.element_type.element_type.type_special_kind == SemanticTree.type_special_kind.short_string)
        				{
        					short_str = true;
        				}
        				else continue;
        				base_function_call cmc = null;
                        if (!short_str)
                        {
                            if (SystemLibrary.SystemLibInitializer.ClipProcedure.sym_info is common_namespace_function_node)
                                cmc = new common_namespace_function_call(SystemLibrary.SystemLibInitializer.ClipProcedure.sym_info as common_namespace_function_node, null);
                            else
                                cmc = new compiled_static_method_call(SystemLibrary.SystemLibInitializer.ClipProcedure.sym_info as compiled_function_node, null);
                        }
                        else
                        {
                            if (SystemLibrary.SystemLibInitializer.ClipShortStringInSetProcedure.sym_info is common_namespace_function_node)
                                cmc = new common_namespace_function_call(SystemLibrary.SystemLibInitializer.ClipShortStringInSetProcedure.sym_info as common_namespace_function_node, null);
                            else
                                cmc = new compiled_static_method_call(SystemLibrary.SystemLibInitializer.ClipShortStringInSetProcedure.sym_info as compiled_function_node, null);
                        }
                        if (var is local_block_variable)
        				    cmc.parameters.AddElement(new local_block_variable_reference(var as local_block_variable,null));
        				else
        				    cmc.parameters.AddElement(new local_variable_reference(var as local_variable,0,null));	
        				if (!short_str)
        				{
        					cmc.parameters.AddElement(oti.lower_value);
        					cmc.parameters.AddElement(oti.upper_value);
        				}
        				else
        				{
        					cmc.parameters.AddElement(new int_const_node((prm.type.element_type.element_type as short_string_type_node).Length,null));
        				}
        				what_do.statements.AddElement(cmc);
        				foreach_node fn = new foreach_node(var,in_what,what_do,null);
        				sl.statements.AddElementFirst(fn);
        			}
        		}
        		else if (prm.type.type_special_kind == SemanticTree.type_special_kind.short_string && prm.parameter_type == SemanticTree.parameter_type.value
        		        || prm.is_params && prm.type.element_type.type_special_kind == SemanticTree.type_special_kind.short_string)
        		{
                    if (!prm.is_params)
                    {
                        base_function_call cmc = null;
                        if (SystemLibrary.SystemLibInitializer.ClipShortStringProcedure.sym_info is common_namespace_function_node)
                            cmc = new common_namespace_function_call(SystemLibrary.SystemLibInitializer.ClipShortStringProcedure.sym_info as common_namespace_function_node, null);
                        else
                            cmc = new compiled_static_method_call(SystemLibrary.SystemLibInitializer.ClipShortStringProcedure.sym_info as compiled_function_node, null);
                        cmc.parameters.AddElement(new common_parameter_reference(prm, 0, null));
                        cmc.parameters.AddElement(new int_const_node((prm.type as short_string_type_node).Length, null));
                        concrete_parameter_type tmp_cpt = prm.concrete_parameter_type;
                        prm.concrete_parameter_type = concrete_parameter_type.cpt_none;
                        sl.statements.AddElementFirst(find_operator(compiler_string_consts.assign_name, new common_parameter_reference(prm, 0, null), cmc, null));
                        prm.concrete_parameter_type = tmp_cpt;
                    }
                    else
                    {
                        common_parameter_reference cpr = new common_parameter_reference(prm, 0, null);
                        compiled_function_node get_func = (prm.type.find_in_type("Length").sym_info as compiled_property_node).get_function as compiled_function_node;
                        local_variable var = context.create_for_temp_variable(SystemLibrary.SystemLibrary.integer_type, null) as local_variable;
                        local_variable len_var = context.create_for_temp_variable(SystemLibrary.SystemLibrary.integer_type, null) as local_variable;
                        statements_list body = new statements_list(null);
                        //compiled_property_node item_prop = prm.type.find_in_type("Item").sym_info as compiled_property_node;
                        base_function_call cmc = null;
                        if (SystemLibrary.SystemLibInitializer.ClipShortStringProcedure.sym_info is common_namespace_function_node)
                            cmc = new common_namespace_function_call(SystemLibrary.SystemLibInitializer.ClipShortStringProcedure.sym_info as common_namespace_function_node, null);
                        else
                            cmc = new compiled_static_method_call(SystemLibrary.SystemLibInitializer.ClipShortStringProcedure.sym_info as compiled_function_node, null);
                        expression_node cond = new basic_function_call(SystemLibrary.SystemLibrary.int_sm as basic_function_node, null, new local_variable_reference(var, 0, null), new local_variable_reference(len_var, 0, null));
                        //compiled_function_call get_item = new compiled_function_call(item_prop.get_function as compiled_function_node,cpr,null);
                        //get_item.parameters.AddElement(new local_variable_reference(var,0,null));
                        cmc.parameters.AddElement(new simple_array_indexing(cpr, new local_variable_reference(var, 0, null), prm.type.element_type, null));
                        cmc.parameters.AddElement(new int_const_node((prm.type.element_type as short_string_type_node).Length, null));

                        body.statements.AddElement(find_operator(compiler_string_consts.assign_name, new simple_array_indexing(cpr, new local_variable_reference(var, 0, null), prm.type.element_type, null), cmc, null));
                        body.statements.AddElement(new basic_function_call(SystemLibrary.SystemLibrary.int_assign as basic_function_node, null, new local_variable_reference(var, 0, null),
                                                                           new basic_function_call(SystemLibrary.SystemLibrary.int_add as basic_function_node, null, new local_variable_reference(var, 0, null), new int_const_node(1, null))));


                        while_node wn = new while_node(cond, body, null);
                        sl.statements.AddElementFirst(wn);
                        sl.statements.AddElementFirst(new basic_function_call(SystemLibrary.SystemLibrary.int_assign as basic_function_node, null,
                                                                           new local_variable_reference(len_var, 0, null), new compiled_function_call(get_func, cpr, null)));
                    }	
        			
        		}
        	}
        }
Example #6
0
 /// <summary>
 /// Конструктор класса.
 /// </summary>
 /// <param name="whnd">Цикл while внутри которого расположен этот continue.</param>
 /// <param name="loc">Расположение узла.</param>
 public while_continue_node(while_node whnd, location loc) :
     base(null, loc)
 {
     _whnd = whnd;
 }
		private statement_node CreateWhile()
		{
			while_node stmt = new while_node(CreateExpression(),CreateStatement(),null);
			return stmt;
		}
Example #8
0
        /// <summary>
        /// Конструктор класса.
        /// </summary>
        /// <param name="whnd">Узел while из которого ведет этот break.</param>
        /// <param name="loc">Расположение узла.</param>
		public while_break_node(while_node whnd,location loc) :
			base(null,loc)
		{
			_whnd=whnd;
		}
Example #9
0
        /// <summary>
        /// Конструктор класса.
        /// </summary>
        /// <param name="whnd">Цикл while внутри которого расположен этот continue.</param>
        /// <param name="loc">Расположение узла.</param>
		public while_continue_node(while_node whnd,location loc) :
			base(null,loc)
		{
			_whnd=whnd;
		}
Example #10
0
		private type_node create_array_type(ordinal_type_interface oti_indexer, type_node element_type,common_namespace_node _cmn, location loc)
		{
			int arr_length = oti_indexer.ordinal_type_to_int(oti_indexer.upper_value) -
				oti_indexer.ordinal_type_to_int(oti_indexer.lower_value) + 1;

			if (arr_length <= 0)
			{
				throw new SimpleSemanticError(loc, "NEGATIVE_ARRAY_LENGTH_({0})_NOT_ALLOWED", arr_length);
			}

			simple_array sa = new simple_array(element_type, arr_length);
			//sa.length = arr_length;
			//sa.element_type = element_type;

			SymbolTable.Scope top_scope = null;
			if (_cmn != null)
			{
				top_scope = _cmn.scope;
			}
			string name = get_pascal_array_name();
			//if (_cmn.namespace_name != null)
			//    name = _cmn.namespace_name + name;
			common_type_node ctn = new common_type_node(null, name, SemanticTree.type_access_level.tal_public,
			                                            _cmn, convertion_data_and_alghoritms.symbol_table.CreateClassScope(top_scope, null), loc);

			ctn.SetBaseType(SystemLibrary.SystemLibrary.object_type);
			//DarkStar Add
			//loc не нужно мне это!  и некому не нужно!
			//loc = null;
			
			//ctn.internal_is_value = true;

			class_constant_definition cdn1 = new class_constant_definition(compiler_string_consts.lower_array_const_name,
			                                                               oti_indexer.lower_value, loc, ctn, SemanticTree.field_access_level.fal_public);
			ctn.scope.AddSymbol(cdn1.name, new SymbolInfo(cdn1));

			class_constant_definition cdn2 = new class_constant_definition(compiler_string_consts.upper_array_const_name,
			                                                               oti_indexer.upper_value, loc, ctn, SemanticTree.field_access_level.fal_public);
			ctn.scope.AddSymbol(cdn2.name, new SymbolInfo(cdn2));

			class_field int_arr = new class_field(compiler_string_consts.internal_array_name, sa, ctn,
			                                      SemanticTree.polymorphic_state.ps_common, SemanticTree.field_access_level.fal_public,loc);
			ctn.scope.AddSymbol(int_arr.name, new SymbolInfo(int_arr));
			ctn.fields.AddElement(int_arr);

			SystemLibrary.SystemLibrary.init_reference_type(ctn);

			ctn.const_defs.AddElement(cdn1);
			ctn.const_defs.AddElement(cdn2);

			common_method_node get_func = new common_method_node(compiler_string_consts.get_val_pascal_array_name,
			                                                     element_type, /*loc*/new location(0xFFFFFF, 0, 0xFFFFFF, 0, loc.doc), ctn, SemanticTree.polymorphic_state.ps_common, SemanticTree.field_access_level.fal_private,
			                                                     convertion_data_and_alghoritms.symbol_table.CreateScope(ctn.scope));
			common_parameter get_param = new common_parameter(compiler_string_consts.unary_param_name,
			                                                  oti_indexer.lower_value.type, SemanticTree.parameter_type.value, get_func, concrete_parameter_type.cpt_none,
			                                                  null, loc);
			get_func.parameters.AddElement(get_param);

			common_parameter_reference cpr = new common_parameter_reference(get_param, 0, loc);
			expression_node en1 = convertion_data_and_alghoritms.create_simple_function_call(oti_indexer.value_to_int,
			                                                                                 loc, cpr);
			expression_node en2 = new int_const_node(oti_indexer.ordinal_type_to_int(oti_indexer.lower_value), loc);
			expression_node sub_expr = convertion_data_and_alghoritms.create_simple_function_call(
				SystemLibrary.SystemLibrary.int_sub, loc, en1, en2);

			this_node thisnode = new this_node(ctn, loc);

			class_field_reference cfr1 = new class_field_reference(int_arr, thisnode, loc);

			expression_node index_expr = new simple_array_indexing(cfr1, sub_expr, element_type, loc);

			statement_node sn = new return_node(index_expr, /*loc*/new location(0xFFFFFF, 0, 0xFFFFFF, 0, loc.doc));

			get_func.function_code = sn;

			common_method_node set_func = new common_method_node(compiler_string_consts.set_val_pascal_array_name,
			                                                     null, /*loc*/new location(0xFFFFFF, 0, 0xFFFFFF, 0, loc.doc), ctn, SemanticTree.polymorphic_state.ps_common, SemanticTree.field_access_level.fal_private,
			                                                     convertion_data_and_alghoritms.symbol_table.CreateScope(ctn.scope));
			common_parameter set_ind = new common_parameter(compiler_string_consts.left_param_name,
			                                                oti_indexer.lower_value.type, SemanticTree.parameter_type.value, set_func, concrete_parameter_type.cpt_none,
			                                                null, loc);
			set_func.parameters.AddElement(set_ind);
			common_parameter set_val = new common_parameter(compiler_string_consts.right_param_name,
			                                                element_type, SemanticTree.parameter_type.value, set_func, concrete_parameter_type.cpt_none, null, loc);
			set_func.parameters.AddElement(set_val);

			common_parameter_reference cpr2 = new common_parameter_reference(set_ind, 0, loc);
			expression_node en3 = convertion_data_and_alghoritms.create_simple_function_call(oti_indexer.value_to_int,
			                                                                                 loc, cpr2);
			expression_node en4 = new int_const_node(oti_indexer.ordinal_type_to_int(oti_indexer.lower_value), loc);
			expression_node sub_expr2 = convertion_data_and_alghoritms.create_simple_function_call(
				SystemLibrary.SystemLibrary.int_sub, loc, en3, en4);

			class_field_reference cfr2 = new class_field_reference(int_arr, thisnode, loc);

			expression_node index_expr2 = new simple_array_indexing(cfr2, sub_expr2, element_type,loc);

			SymbolInfo si = element_type.find_in_type(compiler_string_consts.assign_name);
			if (si == null)
			{
				throw new NotSupportedError(loc);
				throw new CompilerInternalError("Varable of this type can not be assigned");
			}
			if (si.sym_info.general_node_type != general_node_type.function_node)
			{
				throw new CompilerInternalError("Invalid assign operator");
			}

			expression_node val_ref = new common_parameter_reference(set_val, 0, loc);

			function_node assign = (function_node)si.sym_info;
			statement_node assign_call = convertion_data_and_alghoritms.create_simple_function_call(assign,
			                                                                                        /*loc*/new location(0xFFFFFF, 0, 0xFFFFFF, 0, loc.doc), index_expr2, val_ref);

			set_func.function_code = assign_call;

			ctn.methods.AddElement(get_func);
			ctn.methods.AddElement(set_func);

			common_property_node cpn = new common_property_node(compiler_string_consts.index_property_pascal_array_name,
			                                                    ctn, element_type, get_func, set_func, loc, SemanticTree.field_access_level.fal_public, SemanticTree.polymorphic_state.ps_common);

			common_parameter prop_cp = new common_parameter(compiler_string_consts.unary_param_name, oti_indexer.lower_value.type,
			                                                SemanticTree.parameter_type.value, null, concrete_parameter_type.cpt_none, null, loc);
			cpn.parameters.AddElement(prop_cp);

			ctn.properties.AddElement(cpn);

			ctn.default_property = cpn;

			if (_cmn != null)
			{
				_cmn.types.AddElement(ctn);
			}

			bounded_array_interface bai = new bounded_array_interface(oti_indexer, element_type, cpn, oti_indexer.lower_value.type, int_arr);
			ctn.add_internal_interface(bai);
			ctn.type_special_kind = SemanticTree.type_special_kind.array_wrapper;

            if (element_type.type_special_kind != SemanticTree.type_special_kind.array_wrapper)
            {
                ctn.ImplementingInterfaces.Add(compiled_type_node.get_type_node(NetHelper.NetHelper.FindType(compiler_string_consts.IEnumerableInterfaceName)));
                common_method_node en_cmn = new common_method_node(compiler_string_consts.GetEnumeratorMethodName, compiled_type_node.get_type_node(NetHelper.NetHelper.FindType(compiler_string_consts.IEnumeratorInterfaceName)), null, ctn, SemanticTree.polymorphic_state.ps_virtual, SemanticTree.field_access_level.fal_public, null);

                compiled_function_node en_fnc = NetHelper.NetHelper.FindName(NetHelper.NetHelper.FindType(compiler_string_consts.IEnumerableInterfaceName), compiler_string_consts.GetEnumeratorMethodName).sym_info as compiled_function_node;
                statements_list sl = new statements_list(null);
                sl.statements.AddElement(new return_node(
                    new compiled_function_call(en_fnc, new class_field_reference(int_arr, new this_node(ctn, null), null), null), null));
                en_cmn.function_code = sl;
                en_cmn.newslot_awaited = true;
                ctn.methods.AddElement(en_cmn);

                if (!element_type.IsPointer)
                {
                    List<type_node> generic_args = new List<type_node>();
                    generic_args.Add(element_type);
                    type_node en_tn = compiled_type_node.get_type_node(NetHelper.NetHelper.FindType(compiler_string_consts.IGenericEnumerableInterfaceName)).get_instance(generic_args);
                    ctn.ImplementingInterfaces.Add(en_tn);

                    en_cmn = new common_method_node(compiler_string_consts.GetEnumeratorMethodName, compiled_type_node.get_type_node(NetHelper.NetHelper.FindType(compiler_string_consts.IGenericEnumeratorInterfaceName)).get_instance(generic_args), null, ctn, SemanticTree.polymorphic_state.ps_virtual, SemanticTree.field_access_level.fal_public, null);
                    //en_fnc = en_tn.find_in_type("GetEnumerator").sym_info as function_node;//NetHelper.NetHelper.FindName(NetHelper.NetHelper.FindType(compiler_string_consts.IGenericEnumerableInterfaceName), compiler_string_consts.GetEnumeratorMethodName).sym_info as compiled_function_node;
                    SymbolInfo en_si = en_tn.find_in_type("GetEnumerator");
                    if (en_si.Next != null && (en_si.Next.sym_info as function_node).return_value_type.is_generic_type_instance)
                        en_si = en_si.Next;
                    function_node en_fnc_inst = en_si.sym_info as function_node; ;//.get_instance(generic_args, true, loc);
                    sl = new statements_list(null);
                    if (en_fnc_inst is compiled_function_node)
                        sl.statements.AddElement(new return_node(
                            new compiled_function_call(en_fnc_inst as compiled_function_node, new class_field_reference(int_arr, new this_node(ctn, null), null), null), null));
                    else
                        sl.statements.AddElement(new return_node(
                            new common_method_call(en_fnc_inst as common_method_node, new class_field_reference(int_arr, new this_node(ctn, null), null), null), null));
                    en_cmn.function_code = sl;
                    en_cmn.newslot_awaited = true;
                    ctn.methods.AddElement(en_cmn);
                }
            }
			
			//= operation
			SymbolTable.ClassMethodScope scope = convertion_data_and_alghoritms.symbol_table.CreateClassMethodScope(_cmn.scope,ctn.scope);
        	common_method_node cmn_eq = new common_method_node(compiler_string_consts.GetNETOperName(compiler_string_consts.eq_name),SystemLibrary.SystemLibrary.bool_type,null,ctn,
        	                                                SemanticTree.polymorphic_state.ps_static,SemanticTree.field_access_level.fal_public,scope);
        	cmn_eq.IsOperator = true;
        	common_parameter prm1 = new common_parameter("a",ctn,SemanticTree.parameter_type.value,cmn_eq,concrete_parameter_type.cpt_none,null,null);
        	common_parameter prm2 = new common_parameter("b",ctn,SemanticTree.parameter_type.value,cmn_eq,concrete_parameter_type.cpt_none,null,null);
        	cmn_eq.parameters.AddElement(prm1);
        	cmn_eq.parameters.AddElement(prm2);
        	statements_list body = new statements_list(null);
        	local_variable vdn = new local_variable("$i",SystemLibrary.SystemLibrary.integer_type,cmn_eq,null);//this.convertion_data_and_alghoritms.syntax_tree_visitor.context.create_for_temp_variable(SystemLibrary.SystemLibrary.integer_type, null);
        	cmn_eq.var_definition_nodes_list.AddElement(vdn);
        	expression_node var_ref = new local_variable_reference(vdn,0,null);//this.convertion_data_and_alghoritms.syntax_tree_visitor.create_variable_reference(vdn,null);
        	basic_function_call cond = new basic_function_call(SystemLibrary.SystemLibrary.int_sm as basic_function_node,null);
        	cond.parameters.AddElement(var_ref);
        	cond.parameters.AddElement(new int_const_node(arr_length,null));
        	while_node while_stmt = new while_node(cond,null);
        	statements_list while_body = new statements_list(null);
        	while_stmt.body = while_body;
        	simple_array_indexing left_sar = new simple_array_indexing(new class_field_reference(int_arr, new common_parameter_reference(prm1,0,null), null),var_ref,element_type,null);
        	simple_array_indexing right_sar = new simple_array_indexing(new class_field_reference(int_arr, new common_parameter_reference(prm2,0,null), null),var_ref,element_type,null);
        	expression_node cond2 = SystemLibrary.SystemLibrary.syn_visitor.find_operator(compiler_string_consts.noteq_name,
        		                                                                            left_sar,right_sar,null);
        	if_node if_stmt = new if_node(cond2,new return_node(new bool_const_node(false,null),null),null,null);
        	while_body.statements.AddElement(if_stmt);
        	while_body.statements.AddElement(new basic_function_call(SystemLibrary.SystemLibrary.int_assign as basic_function_node,null
        	                                                   ,var_ref,new basic_function_call(SystemLibrary.SystemLibrary.int_add as basic_function_node,null,var_ref,new int_const_node(1,null))));
        	
        	body.statements.AddElement(while_stmt);
        	body.statements.AddElement(new return_node(new bool_const_node(true,null),null));
        	cmn_eq.function_code = body;
        	cmn_eq.is_overload = true;
        	ctn.methods.AddElement(cmn_eq);
        	ctn.Scope.AddSymbol(compiler_string_consts.eq_name,new SymbolInfo(cmn_eq));
        	
        	//<> operation
			scope = convertion_data_and_alghoritms.symbol_table.CreateClassMethodScope(_cmn.scope,ctn.scope);
        	common_method_node cmn_noteq = new common_method_node(compiler_string_consts.GetNETOperName(compiler_string_consts.noteq_name),SystemLibrary.SystemLibrary.bool_type,null,ctn,
        	                                                SemanticTree.polymorphic_state.ps_static,SemanticTree.field_access_level.fal_public,scope);
        	cmn_noteq.IsOperator = true;
        	prm1 = new common_parameter("a",ctn,SemanticTree.parameter_type.value,cmn_noteq,concrete_parameter_type.cpt_none,null,null);
        	prm2 = new common_parameter("b",ctn,SemanticTree.parameter_type.value,cmn_noteq,concrete_parameter_type.cpt_none,null,null);
        	cmn_noteq.parameters.AddElement(prm1);
        	cmn_noteq.parameters.AddElement(prm2);
        	body = new statements_list(null);
        	vdn = new local_variable("$i",SystemLibrary.SystemLibrary.integer_type,cmn_noteq,null);//this.convertion_data_and_alghoritms.syntax_tree_visitor.context.create_for_temp_variable(SystemLibrary.SystemLibrary.integer_type, null);
        	cmn_noteq.var_definition_nodes_list.AddElement(vdn);
        	var_ref = new local_variable_reference(vdn,0,null);//this.convertion_data_and_alghoritms.syntax_tree_visitor.create_variable_reference(vdn,null);
        	cond = new basic_function_call(SystemLibrary.SystemLibrary.int_sm as basic_function_node,null);
        	cond.parameters.AddElement(var_ref);
        	cond.parameters.AddElement(new int_const_node(arr_length,null));
        	while_stmt = new while_node(cond,null);
        	while_body = new statements_list(null);
        	while_stmt.body = while_body;
        	left_sar = new simple_array_indexing(new class_field_reference(int_arr, new common_parameter_reference(prm1,0,null), null),var_ref,element_type,null);
        	right_sar = new simple_array_indexing(new class_field_reference(int_arr, new common_parameter_reference(prm2,0,null), null),var_ref,element_type,null);
        	cond2 = SystemLibrary.SystemLibrary.syn_visitor.find_operator(compiler_string_consts.noteq_name,
        		                                                                            left_sar,right_sar,null);
        	if_stmt = new if_node(cond2,new return_node(new bool_const_node(true,null),null),null,null);
        	while_body.statements.AddElement(if_stmt);
        	while_body.statements.AddElement(new basic_function_call(SystemLibrary.SystemLibrary.int_assign as basic_function_node,null
        	                                                   ,var_ref,new basic_function_call(SystemLibrary.SystemLibrary.int_add as basic_function_node,null,var_ref,new int_const_node(1,null))));
        	
        	body.statements.AddElement(while_stmt);
        	body.statements.AddElement(new return_node(new bool_const_node(false,null),null));
        	cmn_noteq.function_code = body;
        	cmn_noteq.is_overload = true;
        	ctn.methods.AddElement(cmn_noteq);
        	ctn.Scope.AddSymbol(compiler_string_consts.noteq_name,new SymbolInfo(cmn_noteq));
        	
        	//Equals
        	/*scope = convertion_data_and_alghoritms.symbol_table.CreateClassMethodScope(_cmn.scope,ctn.scope);
        	common_method_node cmn_equals = new common_method_node("Equals",SystemLibrary.SystemLibrary.bool_type,null,ctn,
        	                                                SemanticTree.polymorphic_state.ps_virtual,SemanticTree.field_access_level.fal_public,scope);
        	prm1 = new common_parameter("a",SystemLibrary.SystemLibrary.object_type,SemanticTree.parameter_type.value,cmn_equals,concrete_parameter_type.cpt_none,null,null);
        	
        	cmn_equals.parameters.AddElement(prm1);
        	body = new statements_list(null);
        	vdn = new local_variable("$i",ctn,cmn_equals,null);//this.convertion_data_and_alghoritms.syntax_tree_visitor.context.create_for_temp_variable(SystemLibrary.SystemLibrary.integer_type, null);
        	cmn_equals.var_definition_nodes_list.AddElement(vdn);
        	var_ref = new local_variable_reference(vdn,0,null);//this.convertion_data_and_alghoritms.syntax_tree_visitor.create_variable_reference(vdn,null);
        	as_node _as = new as_node(new common_parameter_reference(prm1,0,null),ctn,null);
        	base_function_call ass_bfc = new basic_function_call(SystemLibrary.SystemLibrary.object_type.find(compiler_string_consts.assign_name).sym_info as basic_function_node,null);
        	ass_bfc.parameters.AddElement(var_ref);
        	ass_bfc.parameters.AddElement(_as);
        	body.statements.AddElement(ass_bfc);
        	common_static_method_call csmc = new common_static_method_call(ctn.find_in_type(compiler_string_consts.eq_name).sym_info as common_method_node,null);
        	csmc.parameters.AddElement(new this_node(ctn,null));
        	csmc.parameters.AddElement(var_ref);
        	body.statements.AddElement(new return_node(csmc,null));
        	ctn.methods.AddElement(cmn_equals);
        	ctn.Scope.AddSymbol("Equals",new SymbolInfo(cmn_equals));*/
        	return ctn;
		}