Пример #1
0
 public bounded_array_interface(ordinal_type_interface oti, type_node element_type,
                                common_property_node index_property, type_node index_type, class_field int_array)
 {
     _oti            = oti;
     _element_type   = element_type;
     _index_property = index_property;
     _index_type     = index_type;
     _int_array      = int_array;
 }
Пример #2
0
        /*
        private static void mark_byte_as_ordinal()
        {
            basic_function_node inc_value_method = create_inc_value_method(SemanticTree.basic_function_type.binc, _byte_type);
            basic_function_node dec_value_method = create_dec_value_method(SemanticTree.basic_function_type.bdec, _byte_type);

            basic_function_node inc_method = create_inc_method(SemanticTree.basic_function_type.binc, _byte_type);
            basic_function_node dec_method = create_dec_method(SemanticTree.basic_function_type.bdec, _byte_type);

            SymbolInfo si = _byte_type.find_in_type(compiler_string_consts.greq_name);
            basic_function_node greq = (basic_function_node)si.sym_info;

            si = _byte_type.find(compiler_string_consts.smeq_name);
            basic_function_node loeq = (basic_function_node)si.sym_info;

            constant_node cn_max = new byte_const_node(byte.MaxValue, null);
            constant_node cn_min = new byte_const_node(byte.MinValue, null);

            basic_function_node i2i_method = create_emty_function(byte_type);

            ordinal_type_to_int ordinal_type_to_int = byte_to_int;

            ordinal_type_interface oti = new ordinal_type_interface(inc_method, dec_method, inc_value_method, dec_value_method,
                internal_inc_value, internal_dec_value, loeq, greq, cn_min, cn_max, i2i_method, ordinal_type_to_int);

            _byte_type.add_internal_interface(oti);
        }
        */
        private static void mark_type_as_ordinal(type_node type,
            SemanticTree.basic_function_type inc,SemanticTree.basic_function_type dec,
            SemanticTree.basic_function_type vinc, SemanticTree.basic_function_type vdec,
            constant_node lower_value, constant_node upper_value,
            function_node t2i,ordinal_type_to_int t2i_comp)
        {
            basic_function_node inc_value = create_oti_method(inc, type, SemanticTree.parameter_type.value);
            basic_function_node dec_value = create_oti_method(dec, type, SemanticTree.parameter_type.value);

            basic_function_node inc_var = create_oti_method(vinc, type, SemanticTree.parameter_type.var);
            basic_function_node dec_var = create_oti_method(vdec, type, SemanticTree.parameter_type.var);

            SymbolInfo si = type.find_in_type(compiler_string_consts.greq_name);
            basic_function_node greq = (basic_function_node)si.sym_info;
        
            si = type.find(compiler_string_consts.smeq_name);
            basic_function_node loeq = (basic_function_node)si.sym_info;
			
            si = type.find(compiler_string_consts.sm_name);
            basic_function_node lo = (basic_function_node)si.sym_info;
            
            si = type.find(compiler_string_consts.gr_name);
            basic_function_node gr = (basic_function_node)si.sym_info;
            
            ordinal_type_interface oti = new ordinal_type_interface(inc_value, dec_value, inc_var, dec_var,
                loeq, greq, lo, gr, lower_value, upper_value, t2i, t2i_comp);

            type.add_internal_interface(oti);
        }
        private int_const_node convert_const_to_switch(expression_node switch_expr,
            ordinal_type_interface oti, type_node case_expr_type, location loc)
        {
            convertion_data_and_alghoritms.convert_type(switch_expr, case_expr_type, loc);
            if (switch_expr is int_const_node)
                return switch_expr as int_const_node;
            //switch_expr = convertion_data_and_alghoritms.create_simple_function_call(oti.value_to_int,
            //    loc, switch_expr);
            int_const_node icn = null;//switch_expr as constant_node;

            if (switch_expr is byte_const_node)
                icn = new int_const_node((switch_expr as byte_const_node).constant_value, loc);
            else if (switch_expr is sbyte_const_node)
                icn = new int_const_node(Convert.ToInt32((switch_expr as sbyte_const_node).constant_value), loc);
            else if (switch_expr is short_const_node)
                icn = new int_const_node(Convert.ToInt32((switch_expr as short_const_node).constant_value), loc);
            else if (switch_expr is ushort_const_node)
                icn = new int_const_node(Convert.ToInt32((switch_expr as ushort_const_node).constant_value), loc);
            /*else if (switch_expr is uint_const_node)
                icn = new int_const_node(Convert.ToInt32((switch_expr as uint_const_node).constant_value),loc);
            else if (switch_expr is long_const_node)
                icn = new int_const_node(Convert.ToInt32((switch_expr as long_const_node).constant_value),loc);
            else if (switch_expr is ulong_const_node)
                icn = new int_const_node(Convert.ToInt32((switch_expr as ulong_const_node).constant_value),loc);*/
            else if (switch_expr is bool_const_node)
                icn = new int_const_node(Convert.ToInt32((switch_expr as bool_const_node).constant_value), loc);
            else if (switch_expr is char_const_node)
                icn = new int_const_node(Convert.ToInt32((switch_expr as char_const_node).constant_value), loc);
            else if (switch_expr is enum_const_node)
                icn = new int_const_node((switch_expr as enum_const_node).constant_value, loc);
            else if (switch_expr is static_compiled_variable_reference && (switch_expr as static_compiled_variable_reference).var.compiled_field.IsLiteral)
                icn = new int_const_node((int)(switch_expr as static_compiled_variable_reference).var.compiled_field.GetRawConstantValue(), loc);

            //учти здесь модет быть и long!
            //-DarkStar Add
            if (icn == null)
            {
                AddError(loc, "CONSTANT_EXPRESSION_EXPECTED");
            }
            return icn;
        }
        public override void visit(SyntaxTree.enum_type_definition _enum_type_definition)
        {
            //SSM 15/01/16 - реализация (integer,integer)
            // Если кто-то - не named_type_reference с одним ident, то надо идти по ветке типов - это не м.б.перечисление
            bool is_tuple_type = false;
            foreach (SyntaxTree.enumerator en in _enum_type_definition.enumerators.enumerators)
            {
                if (!((en.name is named_type_reference) && (en.name as named_type_reference).names.Count()==1)) 
                {
                    is_tuple_type = true;
                    break;
                }
            }

            bool is_enum = false;
            if (!is_tuple_type) // Значит, все - идентификаторы и сказать пока ничего нельзя
                foreach (SyntaxTree.enumerator en in _enum_type_definition.enumerators.enumerators)
                {
                    SyntaxTree.ident id = (en.name as named_type_reference).FirstIdent;
                    var si = context.CurrentScope.Find(id.name);
                    if ((si==null) || !(si.sym_info is type_node))
                    {
                        is_enum = true;
                        break;
                    }
                }

            if (!is_enum) // Значит, это определение типа
            {
                var lt = new List<type_definition>();
                for (var iii=0; iii<_enum_type_definition.enumerators.enumerators.Count(); iii++)
                {
                    var en = _enum_type_definition.enumerators.enumerators[iii];
                    var name = en.name;
                    if (en.value != null)
                        AddError(get_location(en.value), "TUPLE_TYPE_ERROR");
                    lt.Add(name);
                }

                var l = new List<ident>();
                l.Add(new ident("?System"));
                l.Add(new ident("Tuple"));

                var tp = new template_param_list(lt);
                // значит, это Tuple - создать его, обойти и выйти
                var ttr = new SyntaxTree.template_type_reference(new named_type_reference(l), tp);
                visit(ttr);
                return;
            }

            //end SSM

            // Если мы здесь - значит, это перечислимый тип

            //throw new NotSupportedError(get_location(_enum_type_definition));
            //ivan added
            int num = 0;
            List<constant_definition_node> cnsts = new List<constant_definition_node>();
            check_if_has_enum_consts(_enum_type_definition);
            foreach (SyntaxTree.enumerator en in _enum_type_definition.enumerators.enumerators)
            {
                SyntaxTree.ident id = (en.name as named_type_reference).FirstIdent; // это - точно идентификаторы

                constant_definition_node cdn = context.add_const_definition(id.name, get_location(id));
                if (en.value == null)
                cdn.const_value = new enum_const_node(num++, null, get_location(id));
                else
                {
                	constant_node cn = convert_strong_to_constant_node(en.value,SystemLibrary.SystemLibrary.integer_type);
                	check_for_strong_constant(cn,get_location(en.value));
                	cdn.const_value = new enum_const_node((cn as int_const_node).constant_value,null,get_location(id));
                }
                cnsts.Add(cdn);
            }
            common_type_node ctn = context.create_enum_type(null, get_location(_enum_type_definition)); //_enum_type_definition.values
            num = 0;
            foreach (SyntaxTree.enumerator en in _enum_type_definition.enumerators.enumerators)
            {
                SyntaxTree.ident id = (en.name as named_type_reference).FirstIdent;
                constant_definition_node cdn = context.add_const_definition(id.name, get_location(id));
                if (en.value == null)
                cdn.const_value = new enum_const_node(num++, null, get_location(id));
                else
                {
                	constant_node cn = convert_strong_to_constant_node(en.value,SystemLibrary.SystemLibrary.integer_type);
                	check_for_strong_constant(cn,get_location(en.value));
                	cdn.const_value = new enum_const_node((cn as int_const_node).constant_value,null,get_location(id));
                }
                cdn.const_value.type = ctn;
            }
            foreach (constant_definition_node cdn in cnsts)
                cdn.const_value.type = ctn;
            internal_interface ii = SystemLibrary.SystemLibrary.integer_type.get_internal_interface(internal_interface_kind.ordinal_interface);
            ordinal_type_interface oti_old = (ordinal_type_interface)ii;
            enum_const_node lower_value = new enum_const_node(0, ctn, ctn.loc);
            enum_const_node upper_value = new enum_const_node(ctn.const_defs.Count - 1, ctn, ctn.loc);
            ordinal_type_interface oti_new = new ordinal_type_interface(oti_old.inc_method, oti_old.dec_method,
                oti_old.inc_value_method, oti_old.dec_value_method,
                oti_old.lower_eq_method, oti_old.greater_eq_method, oti_old.lower_method, oti_old.greater_method, lower_value, upper_value, oti_old.value_to_int, oti_old.ordinal_type_to_int);

            ctn.add_internal_interface(oti_new);
            //foreach (constant_definition_node cdn in cnsts)
            //  cdn.const_value.type = ctn;
            //context.leave_block();
            context.leave_record();
            return_value(ctn);

        }
Пример #5
0
        public static compiled_type_node get_type_node(System.Type st)
		{
            //(ssyy) Обрабатываем параметры generic-типов
            //Сделаю потом, если это понадобится.
            //if (st.IsGenericParameter)
            //{
            //}
            //if (st.Name.EndsWith("&") == true)
            
            //(ssyy) Лучше так
			if (st.IsByRef)
			{
				//return get_type_node(st.Module.GetType(st.FullName.Substring(0,st.FullName.Length-1)));
                return get_type_node(st.GetElementType());
            }
			compiled_type_node ctn;//=compiled_types[st];
            if (compiled_types.TryGetValue(st, out ctn))
			{
                //ctn.reinit_scope();
                return ctn;
			}
			ctn=new compiled_type_node(st);
            
            //Если это не чистить, будет ошибка. Т.к. при следующей компиляции области видимости могут изменится.
            //Но если это чистить то тоже ошибка. нужна еще одна статическая таблица для стандартных типов
			compiled_types[st] = ctn;
			
            ctn.init_constructors();
            ctn.mark_if_delegate();
            ctn.mark_if_array();
            if (st.IsEnum)
            {
                internal_interface ii = SystemLibrary.SystemLibrary.integer_type.get_internal_interface(internal_interface_kind.ordinal_interface);
                ordinal_type_interface oti_old = (ordinal_type_interface)ii;
                enum_const_node lower_value = new enum_const_node(0, ctn, ctn.loc);
                enum_const_node upper_value = new enum_const_node(st.GetFields().Length-2, ctn, ctn.loc);
                ordinal_type_interface oti_new = new ordinal_type_interface(oti_old.inc_method, oti_old.dec_method,
                    oti_old.inc_value_method, oti_old.dec_value_method,
                    oti_old.lower_eq_method, oti_old.greater_eq_method, 
                    oti_old.lower_method, oti_old.greater_method,
                    lower_value, upper_value, oti_old.value_to_int, oti_old.ordinal_type_to_int);

                ctn.add_internal_interface(oti_new);
                SystemLibrary.SystemLibrary.make_binary_operator(compiler_string_consts.gr_name, ctn, SemanticTree.basic_function_type.enumgr, SystemLibrary.SystemLibrary.bool_type);
                SystemLibrary.SystemLibrary.make_binary_operator(compiler_string_consts.greq_name, ctn, SemanticTree.basic_function_type.enumgreq, SystemLibrary.SystemLibrary.bool_type);
                SystemLibrary.SystemLibrary.make_binary_operator(compiler_string_consts.sm_name, ctn, SemanticTree.basic_function_type.enumsm, SystemLibrary.SystemLibrary.bool_type);
                SystemLibrary.SystemLibrary.make_binary_operator(compiler_string_consts.smeq_name, ctn, SemanticTree.basic_function_type.enumsmeq, SystemLibrary.SystemLibrary.bool_type);
                InitEnumOperations(ctn);
            }
            //ctn.init_scope();
            //TODO: Тут надо подумать. Может как-то сделать по другому?
            if (!NetHelper.NetHelper.IsStandType(st))
			{
				SystemLibrary.SystemLibrary.init_reference_type(ctn);
			}
			return ctn;
		}
        public common_type_node GetCommonType(int offset)
        {
            definition_node dn = null;
            if (members.TryGetValue(offset, out dn))
                return dn as common_type_node;
            common_type_node ctn = null;
            int pos = (int)br.BaseStream.Position;
            br.BaseStream.Seek(start_pos + offset, SeekOrigin.Begin);
            br.ReadByte();

            ctn = (common_type_node)CreateInterfaceCommonType(null, offset);

            if (ctn.fields.Count > 0)
            {
                if (ctn.fields[0].type is simple_array)
                {
                    ctn.find(TreeConverter.compiler_string_consts.upper_array_const_name);
                    ctn.find(TreeConverter.compiler_string_consts.lower_array_const_name);
                    constant_node lower_bound = ctn.const_defs[1].const_value;
                    constant_node upper_bound = ctn.const_defs[0].const_value;

                    ordinal_type_interface q = (ordinal_type_interface)lower_bound.type.get_internal_interface(internal_interface_kind.ordinal_interface);
                    ordinal_type_interface n = new ordinal_type_interface(q.inc_method, q.dec_method,
                        q.inc_value_method, q.dec_value_method, q.lower_eq_method, q.greater_eq_method, 
                        q.lower_method, q.greater_method,
                        lower_bound, upper_bound, q.value_to_int, q.ordinal_type_to_int);

                    simple_array sa = ctn.fields[0].type as simple_array;

                    bounded_array_interface bai = new bounded_array_interface(n, sa.element_type, ctn.properties[0],
                        lower_bound.type, ctn.fields[0]);
                    ctn.add_internal_interface(bai);
                    //ctn.internal_type_special_kind = SemanticTree.type_special_kind.bounded_array;
                }
            }

            br.BaseStream.Seek(pos, SeekOrigin.Begin);
            return ctn;
        }
        private void MakeTypeAsOrdinal(common_type_node ctn, int low_val, int upper_val)
        {
            internal_interface ii = SystemLibrary.SystemLibrary.integer_type.get_internal_interface(internal_interface_kind.ordinal_interface);
            ordinal_type_interface oti_old = (ordinal_type_interface)ii;
            enum_const_node lower_value = new enum_const_node(low_val, ctn, ctn.loc);
            enum_const_node upper_value = new enum_const_node(upper_val - 1, ctn, ctn.loc);
            ordinal_type_interface oti_new = new ordinal_type_interface(oti_old.inc_method, oti_old.dec_method,
                oti_old.inc_value_method, oti_old.dec_value_method,
                oti_old.lower_eq_method, oti_old.greater_eq_method, 
                oti_old.lower_method, oti_old.greater_method,
                lower_value, upper_value, oti_old.value_to_int, oti_old.ordinal_type_to_int);

            ctn.add_internal_interface(oti_new);
        }
Пример #8
0
 public bounded_array_interface(ordinal_type_interface oti, type_node element_type,
     common_property_node index_property, type_node index_type, class_field int_array)
 {
     _oti = oti;
     _element_type = element_type;
     _index_property = index_property;
     _index_type = index_type;
     _int_array = int_array;
 }
Пример #9
0
		public static void add_convertions_to_diap(common_type_node ctn, constant_node lower_value, constant_node upper_value)
		{
			type_node element_type = ctn.base_type;
			if (element_type != SystemLibrary.SystemLibrary.char_type && element_type != SystemLibrary.SystemLibrary.bool_type)
			{
				//element_type.add_name(compiler_string_consts.assign_name,new SymbolInfo(SystemLibrary.SystemLibrary.make_assign_operator(ctn,PascalABCCompiler.SemanticTree.basic_function_type.iassign)));
				/*element_type.add_name(compiler_string_consts.assign_name,new SymbolInfo(SystemLibrary.SystemLibrary.make_assign_operator(ctn,PascalABCCompiler.SemanticTree.basic_function_type.bassign)));
            	element_type.add_name(compiler_string_consts.assign_name,new SymbolInfo(SystemLibrary.SystemLibrary.make_assign_operator(ctn,PascalABCCompiler.SemanticTree.basic_function_type.sassign)));
            	element_type.add_name(compiler_string_consts.assign_name,new SymbolInfo(SystemLibrary.SystemLibrary.make_assign_operator(ctn,PascalABCCompiler.SemanticTree.basic_function_type.sbassign)));
            	element_type.add_name(compiler_string_consts.assign_name,new SymbolInfo(SystemLibrary.SystemLibrary.make_assign_operator(ctn,PascalABCCompiler.SemanticTree.basic_function_type.usassign)));
            	element_type.add_name(compiler_string_consts.assign_name,new SymbolInfo(SystemLibrary.SystemLibrary.make_assign_operator(ctn,PascalABCCompiler.SemanticTree.basic_function_type.uiassign)));
            	element_type.add_name(compiler_string_consts.assign_name,new SymbolInfo(SystemLibrary.SystemLibrary.make_assign_operator(ctn,PascalABCCompiler.SemanticTree.basic_function_type.lassign)));
            	element_type.add_name(compiler_string_consts.assign_name,new SymbolInfo(SystemLibrary.SystemLibrary.make_assign_operator(ctn,PascalABCCompiler.SemanticTree.basic_function_type.ulassign)));*/
			}
			else if (element_type == SystemLibrary.SystemLibrary.char_type)
				element_type.add_generated_name(compiler_string_consts.assign_name,new SymbolInfo(SystemLibrary.SystemLibrary.make_assign_operator(ctn,PascalABCCompiler.SemanticTree.basic_function_type.charassign)));
			else if (element_type == SystemLibrary.SystemLibrary.bool_type)
                element_type.add_generated_name(compiler_string_consts.assign_name, new SymbolInfo(SystemLibrary.SystemLibrary.make_assign_operator(ctn, PascalABCCompiler.SemanticTree.basic_function_type.boolassign)));
			else if (element_type.IsEnum)
			{
                element_type.add_generated_name(compiler_string_consts.assign_name, new SymbolInfo(SystemLibrary.SystemLibrary.make_assign_operator(ctn, PascalABCCompiler.SemanticTree.basic_function_type.iassign)));
                element_type.add_generated_name(compiler_string_consts.assign_name, new SymbolInfo(SystemLibrary.SystemLibrary.make_assign_operator(element_type, PascalABCCompiler.SemanticTree.basic_function_type.iassign)));
			}
			
			if (element_type == SystemLibrary.SystemLibrary.integer_type)
			{
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.integer_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.none,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.byte_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.itob,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.sbyte_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.itosb,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.short_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.itos,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.ushort_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.itous,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.uint_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.itoui,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.int64_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itol,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.uint64_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itoul,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.double_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itod,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.float_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itof,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.char_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.itochar,false);
				
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.byte_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.btoi,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.sbyte_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.sbtoi,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.short_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.stoi,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.ushort_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.ustoi,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.integer_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.none,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.uitoi,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.int64_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ltoi,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint64_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ultoi,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.real_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itod,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.float_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itof,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.char_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.chartoi,false);
				
				//SystemLibrary.SystemLibrary.make_unary_empty_operator(compiler_string_consts.plus_name, ctn, ctn);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.not_name, ctn, SystemLibrary.SystemLibrary.int_not);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.minus_name, ctn, SystemLibrary.SystemLibrary.int_unmin);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.gr_name, ctn, SystemLibrary.SystemLibrary.int_gr);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.greq_name, ctn, SystemLibrary.SystemLibrary.int_greq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.sm_name, ctn, SystemLibrary.SystemLibrary.int_sm);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.smeq_name, ctn, SystemLibrary.SystemLibrary.int_smeq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.eq_name, ctn, SystemLibrary.SystemLibrary.int_eq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.noteq_name, ctn, SystemLibrary.SystemLibrary.int_noteq);

				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.plus_name, ctn, SystemLibrary.SystemLibrary.int_add);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.minus_name, ctn, SystemLibrary.SystemLibrary.int_sub);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.mul_name, ctn, SystemLibrary.SystemLibrary.int_mul);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.idiv_name, ctn, SystemLibrary.SystemLibrary.int_idiv);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.mod_name, ctn, SystemLibrary.SystemLibrary.int_mod);
				
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.and_name, ctn, SystemLibrary.SystemLibrary.int_and);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.or_name, ctn, SystemLibrary.SystemLibrary.int_or);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.xor_name, ctn, SystemLibrary.SystemLibrary.int_xor);
				
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.shl_name, ctn, SystemLibrary.SystemLibrary.int_shl);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.shr_name, ctn, SystemLibrary.SystemLibrary.int_shr);
			}
			else if (element_type == SystemLibrary.SystemLibrary.byte_type)
			{
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(tctn,SystemLibrary.SystemLibrary.byte_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.itob,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.sbyte_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.btosb,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.short_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.btos,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.ushort_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.btous,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.integer_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.btoi,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.uint_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.btoui,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.int64_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.btol,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.uint64_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.btoul,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.double_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.btod,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.float_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.btof,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.char_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.btochar,false);
				
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.byte_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.none,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.sbyte_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.sbtob,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.short_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.stob,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.ushort_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ustob,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.integer_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.uitob,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.uitob,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.int64_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ltob,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint64_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ultob,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.real_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itod,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.float_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itof,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.char_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.chartob,false);
				
				//SystemLibrary.SystemLibrary.make_unary_empty_operator(compiler_string_consts.plus_name, ctn, ctn);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.not_name, ctn, SystemLibrary.SystemLibrary.int_not);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.minus_name, ctn, SystemLibrary.SystemLibrary.int_unmin);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.gr_name, ctn, SystemLibrary.SystemLibrary.int_gr);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.greq_name, ctn, SystemLibrary.SystemLibrary.int_greq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.sm_name, ctn, SystemLibrary.SystemLibrary.int_sm);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.smeq_name, ctn, SystemLibrary.SystemLibrary.int_smeq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.eq_name, ctn, SystemLibrary.SystemLibrary.int_eq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.noteq_name, ctn, SystemLibrary.SystemLibrary.int_noteq);

				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.plus_name, ctn, SystemLibrary.SystemLibrary.int_add);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.minus_name, ctn, SystemLibrary.SystemLibrary.int_sub);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.mul_name, ctn, SystemLibrary.SystemLibrary.int_mul);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.idiv_name, ctn, SystemLibrary.SystemLibrary.int_idiv);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.mod_name, ctn, SystemLibrary.SystemLibrary.int_mod);
				
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.and_name, ctn, SystemLibrary.SystemLibrary.int_and);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.or_name, ctn, SystemLibrary.SystemLibrary.int_or);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.xor_name, ctn, SystemLibrary.SystemLibrary.int_xor);
				
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.shl_name, ctn, SystemLibrary.SystemLibrary.int_shl);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.shr_name, ctn, SystemLibrary.SystemLibrary.int_shr);
			}
			else if (element_type == SystemLibrary.SystemLibrary.sbyte_type)
			{
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.byte_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.sbtob,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(tctn,SystemLibrary.SystemLibrary.sbyte_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.short_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.sbtos,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.ushort_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.sbtous,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.integer_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.sbtoi,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.uint_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.sbtoui,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.int64_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.sbtol,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.uint64_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.sbtoul,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.double_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.sbtod,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.float_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.sbtof,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.char_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.sbtochar,false);
				
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.byte_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.btosb,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.sbyte_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.none,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.short_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.stosb,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.ushort_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ustosb,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.integer_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.uitosb,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.uitosb,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.int64_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ltosb,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint64_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ultosb,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.real_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itod,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.float_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itof,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.char_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.chartosb,false);
				
				//SystemLibrary.SystemLibrary.make_unary_empty_operator(compiler_string_consts.plus_name, ctn, ctn);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.not_name, ctn, SystemLibrary.SystemLibrary.int_not);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.minus_name, ctn, SystemLibrary.SystemLibrary.int_unmin);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.gr_name, ctn, SystemLibrary.SystemLibrary.int_gr);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.greq_name, ctn, SystemLibrary.SystemLibrary.int_greq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.sm_name, ctn, SystemLibrary.SystemLibrary.int_sm);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.smeq_name, ctn, SystemLibrary.SystemLibrary.int_smeq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.eq_name, ctn, SystemLibrary.SystemLibrary.int_eq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.noteq_name, ctn, SystemLibrary.SystemLibrary.int_noteq);

				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.plus_name, ctn, SystemLibrary.SystemLibrary.int_add);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.minus_name, ctn, SystemLibrary.SystemLibrary.int_sub);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.mul_name, ctn, SystemLibrary.SystemLibrary.int_mul);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.idiv_name, ctn, SystemLibrary.SystemLibrary.int_idiv);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.mod_name, ctn, SystemLibrary.SystemLibrary.int_mod);
				
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.and_name, ctn, SystemLibrary.SystemLibrary.int_and);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.or_name, ctn, SystemLibrary.SystemLibrary.int_or);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.xor_name, ctn, SystemLibrary.SystemLibrary.int_xor);
				
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.shl_name, ctn, SystemLibrary.SystemLibrary.int_shl);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.shr_name, ctn, SystemLibrary.SystemLibrary.int_shr);
			}
			else if (element_type == SystemLibrary.SystemLibrary.short_type)
			{
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.byte_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.stob,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.sbyte_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.stosb,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(tctn,SystemLibrary.SystemLibrary.short_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.btos,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.ushort_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.stous,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.integer_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.stoi,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.uint_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.stoui,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.int64_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.stol,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.uint64_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.stoul,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.double_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.stod,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.float_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.stof,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.char_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.stochar,false);
				
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.byte_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.btos,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.sbyte_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.sbtos,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.short_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.none,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.ushort_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.ustos,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.integer_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.uitos,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.uitos,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.int64_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ltos,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint64_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ultos,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.real_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itod,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.float_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itof,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.char_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.chartos,false);
				
				//SystemLibrary.SystemLibrary.make_unary_empty_operator(compiler_string_consts.plus_name, ctn, ctn);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.not_name, ctn, SystemLibrary.SystemLibrary.int_not);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.minus_name, ctn, SystemLibrary.SystemLibrary.int_unmin);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.gr_name, ctn, SystemLibrary.SystemLibrary.int_gr);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.greq_name, ctn, SystemLibrary.SystemLibrary.int_greq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.sm_name, ctn, SystemLibrary.SystemLibrary.int_sm);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.smeq_name, ctn, SystemLibrary.SystemLibrary.int_smeq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.eq_name, ctn, SystemLibrary.SystemLibrary.int_eq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.noteq_name, ctn, SystemLibrary.SystemLibrary.int_noteq);

				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.plus_name, ctn, SystemLibrary.SystemLibrary.int_add);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.minus_name, ctn, SystemLibrary.SystemLibrary.int_sub);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.mul_name, ctn, SystemLibrary.SystemLibrary.int_mul);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.idiv_name, ctn, SystemLibrary.SystemLibrary.int_idiv);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.mod_name, ctn, SystemLibrary.SystemLibrary.int_mod);
				
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.and_name, ctn, SystemLibrary.SystemLibrary.int_and);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.or_name, ctn, SystemLibrary.SystemLibrary.int_or);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.xor_name, ctn, SystemLibrary.SystemLibrary.int_xor);
				
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.shl_name, ctn, SystemLibrary.SystemLibrary.int_shl);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.shr_name, ctn, SystemLibrary.SystemLibrary.int_shr);
			}
			else if (element_type == SystemLibrary.SystemLibrary.ushort_type)
			{
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.byte_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ustob,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.sbyte_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ustosb,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.short_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.ustos,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(tctn,SystemLibrary.SystemLibrary.ushort_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.stous,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.integer_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.ustoi,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.uint_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.ustoui,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.int64_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.ustol,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.uint64_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.ustoul,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.double_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.ustod,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.float_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.ustof,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.char_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ustochar,false);
				
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.byte_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.btous,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.sbyte_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.sbtous,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.short_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.stous,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.ushort_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.none,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.integer_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.uitous,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.uitous,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.int64_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ltous,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint64_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ultous,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.real_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itod,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.float_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itof,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.char_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.chartous,false);
				
				//SystemLibrary.SystemLibrary.make_unary_empty_operator(compiler_string_consts.plus_name, ctn, ctn);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.not_name, ctn, SystemLibrary.SystemLibrary.int_not);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.minus_name, ctn, SystemLibrary.SystemLibrary.int_unmin);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.gr_name, ctn, SystemLibrary.SystemLibrary.int_gr);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.greq_name, ctn, SystemLibrary.SystemLibrary.int_greq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.sm_name, ctn, SystemLibrary.SystemLibrary.int_sm);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.smeq_name, ctn, SystemLibrary.SystemLibrary.int_smeq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.eq_name, ctn, SystemLibrary.SystemLibrary.int_eq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.noteq_name, ctn, SystemLibrary.SystemLibrary.int_noteq);

				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.plus_name, ctn, SystemLibrary.SystemLibrary.int_add);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.minus_name, ctn, SystemLibrary.SystemLibrary.int_sub);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.mul_name, ctn, SystemLibrary.SystemLibrary.int_mul);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.idiv_name, ctn, SystemLibrary.SystemLibrary.int_idiv);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.mod_name, ctn, SystemLibrary.SystemLibrary.int_mod);
				
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.and_name, ctn, SystemLibrary.SystemLibrary.int_and);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.or_name, ctn, SystemLibrary.SystemLibrary.int_or);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.xor_name, ctn, SystemLibrary.SystemLibrary.int_xor);
				
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.shl_name, ctn, SystemLibrary.SystemLibrary.int_shl);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.shr_name, ctn, SystemLibrary.SystemLibrary.int_shr);
			}
			else if (element_type == SystemLibrary.SystemLibrary.uint_type)
			{
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.byte_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.uitob,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.sbyte_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.uitosb,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.short_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.uitos,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.ushort_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.uitous,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.integer_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.uitoi,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(tctn,SystemLibrary.SystemLibrary.uint_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.stoui,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.int64_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.uitol,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.uint64_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.uitoul,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.double_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.uitod,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.float_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.uitof,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.char_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.uitochar,false);
				
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.byte_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.btoui,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.sbyte_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.sbtoui,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.short_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.stoui,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.ushort_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.ustoui,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.integer_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.itoui,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.none,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.int64_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ltoui,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint64_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ultoui,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.real_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itod,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.float_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itof,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.char_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.chartoui,false);
				
				//SystemLibrary.SystemLibrary.make_unary_empty_operator(compiler_string_consts.plus_name, ctn, ctn);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.not_name, ctn, SystemLibrary.SystemLibrary.uint_not);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.minus_name, ctn, SystemLibrary.SystemLibrary.uint_unmin);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.gr_name, ctn, SystemLibrary.SystemLibrary.uint_gr);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.greq_name, ctn, SystemLibrary.SystemLibrary.uint_greq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.sm_name, ctn, SystemLibrary.SystemLibrary.uint_sm);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.smeq_name, ctn, SystemLibrary.SystemLibrary.uint_smeq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.eq_name, ctn, SystemLibrary.SystemLibrary.uint_eq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.noteq_name, ctn, SystemLibrary.SystemLibrary.uint_noteq);

				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.plus_name, ctn, SystemLibrary.SystemLibrary.uint_add);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.minus_name, ctn, SystemLibrary.SystemLibrary.uint_sub);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.mul_name, ctn, SystemLibrary.SystemLibrary.uint_mul);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.idiv_name, ctn, SystemLibrary.SystemLibrary.uint_idiv);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.mod_name, ctn, SystemLibrary.SystemLibrary.uint_mod);
				
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.and_name, ctn, SystemLibrary.SystemLibrary.uint_and);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.or_name, ctn, SystemLibrary.SystemLibrary.uint_or);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.xor_name, ctn, SystemLibrary.SystemLibrary.uint_xor);
				
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.shl_name, ctn, SystemLibrary.SystemLibrary.uint_shl);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.shr_name, ctn, SystemLibrary.SystemLibrary.uint_shr);
			}
			else if (element_type == SystemLibrary.SystemLibrary.int64_type)
			{
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.byte_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ltob,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.sbyte_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ltosb,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.short_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ltos,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.ushort_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ltous,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.integer_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ltoi,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.uint_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ltoui,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(tctn,SystemLibrary.SystemLibrary.long_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.uitol,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.uint64_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ltoul,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.double_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.ltod,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.float_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.ltof,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.char_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ltochar,false);
				
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.byte_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.btol,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.sbyte_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.sbtol,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.short_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.stol,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.ushort_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.ustol,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.integer_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.uitol,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.uitol,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.int64_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.none,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint64_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.ultol,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.real_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itod,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.float_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itof,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.char_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.chartol,false);
				
				//SystemLibrary.SystemLibrary.make_unary_empty_operator(compiler_string_consts.plus_name, ctn, ctn);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.not_name, ctn, SystemLibrary.SystemLibrary.long_not);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.minus_name, ctn, SystemLibrary.SystemLibrary.long_unmin);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.gr_name, ctn, SystemLibrary.SystemLibrary.long_gr);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.greq_name, ctn, SystemLibrary.SystemLibrary.long_greq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.sm_name, ctn, SystemLibrary.SystemLibrary.long_sm);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.smeq_name, ctn, SystemLibrary.SystemLibrary.long_smeq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.eq_name, ctn, SystemLibrary.SystemLibrary.long_eq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.noteq_name, ctn, SystemLibrary.SystemLibrary.long_noteq);

				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.plus_name, ctn, SystemLibrary.SystemLibrary.long_add);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.minus_name, ctn, SystemLibrary.SystemLibrary.long_sub);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.mul_name, ctn, SystemLibrary.SystemLibrary.long_mul);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.idiv_name, ctn, SystemLibrary.SystemLibrary.long_idiv);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.mod_name, ctn, SystemLibrary.SystemLibrary.long_mod);
				
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.and_name, ctn, SystemLibrary.SystemLibrary.long_and);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.or_name, ctn, SystemLibrary.SystemLibrary.long_or);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.xor_name, ctn, SystemLibrary.SystemLibrary.long_xor);
				
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.shl_name, ctn, SystemLibrary.SystemLibrary.long_shl);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.shr_name, ctn, SystemLibrary.SystemLibrary.long_shr);
			}
			else if (element_type == SystemLibrary.SystemLibrary.uint64_type)
			{
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.byte_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ultob,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.sbyte_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ultosb,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.short_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ultos,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.ushort_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ultous,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.integer_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ultoi,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.uint_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ultoui,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.int64_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.ultol,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(tctn,SystemLibrary.SystemLibrary.ulong_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ltoul,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.double_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.ultod,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.float_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.ultof,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.char_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ultochar,false);
				
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.byte_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.btoul,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.sbyte_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.sbtoul,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.short_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.stoul,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.ushort_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.ustoul,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.integer_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.uitoul,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.uitoul,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.int64_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ltoul,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint64_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.none,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.real_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itod,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.float_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itof,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.char_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.chartoul,false);
				
				
				//SystemLibrary.SystemLibrary.make_unary_empty_operator(compiler_string_consts.plus_name, ctn, ctn);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.not_name, ctn, SystemLibrary.SystemLibrary.ulong_not);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.minus_name, ctn, SystemLibrary.SystemLibrary.ulong_unmin);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.gr_name, ctn, SystemLibrary.SystemLibrary.ulong_gr);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.greq_name, ctn, SystemLibrary.SystemLibrary.ulong_greq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.sm_name, ctn, SystemLibrary.SystemLibrary.ulong_sm);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.smeq_name, ctn, SystemLibrary.SystemLibrary.ulong_smeq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.eq_name, ctn, SystemLibrary.SystemLibrary.ulong_eq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.noteq_name, ctn, SystemLibrary.SystemLibrary.ulong_noteq);

				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.plus_name, ctn, SystemLibrary.SystemLibrary.ulong_add);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.minus_name, ctn, SystemLibrary.SystemLibrary.ulong_sub);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.mul_name, ctn, SystemLibrary.SystemLibrary.ulong_mul);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.idiv_name, ctn, SystemLibrary.SystemLibrary.ulong_idiv);

				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.and_name, ctn, SystemLibrary.SystemLibrary.ulong_and);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.or_name, ctn, SystemLibrary.SystemLibrary.ulong_or);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.xor_name, ctn, SystemLibrary.SystemLibrary.ulong_xor);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.mod_name, ctn, SystemLibrary.SystemLibrary.ulong_mod);
				
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.shl_name, ctn, SystemLibrary.SystemLibrary.ulong_shl);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.shr_name, ctn, SystemLibrary.SystemLibrary.ulong_shr);
			}
			else if (element_type == SystemLibrary.SystemLibrary.char_type)
			{
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.byte_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.chartob,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.sbyte_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.chartosb,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.short_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.chartos,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.ushort_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.chartous,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.integer_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.chartoi,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.uint_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.chartoui,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.int64_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.chartol,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.uint64_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.chartoul,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.double_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.chartod,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.float_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.chartof,false);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(tctn,SystemLibrary.SystemLibrary.char_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ultochar,false);
				
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.byte_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.btochar,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.sbyte_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.sbtochar,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.short_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.stochar,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.ushort_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ustochar,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.integer_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.itochar,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.uitochar,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.int64_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ltochar,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint64_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ultochar,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.char_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.none,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.real_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.dtochar,false);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.float_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.chartof,false);
				
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.gr_name, ctn, SystemLibrary.SystemLibrary.char_gr);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.greq_name, ctn, SystemLibrary.SystemLibrary.char_greq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.sm_name, ctn, SystemLibrary.SystemLibrary.char_sm);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.smeq_name, ctn, SystemLibrary.SystemLibrary.char_smeq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.eq_name, ctn, SystemLibrary.SystemLibrary.char_eq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.noteq_name, ctn, SystemLibrary.SystemLibrary.char_noteq);
			}
			else if (element_type.IsEnum)
			{
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,element_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.none);
                SystemLibrary.SystemLibrary.make_generated_type_conversion(element_type, ctn, type_compare.less_type, PascalABCCompiler.SemanticTree.basic_function_type.none,true);
                
                SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.byte_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.itob,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.sbyte_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.itosb,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.short_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.itos,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.integer_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.none,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.ushort_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.itous,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.uint_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.itoui,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.int64_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itol,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.uint64_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itoul,false);
				
				
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.byte_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.btoi,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.sbyte_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.sbtoi,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.short_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.stoi,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.ushort_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.ustoi,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.integer_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.none,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.uitoi,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.int64_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ltoi,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint64_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ultoi,false);
			}
			internal_interface ii = element_type.get_internal_interface(internal_interface_kind.ordinal_interface);
			ordinal_type_interface oti_old = (ordinal_type_interface)ii;

			//TODO: Переделать создание потомков oti.
			ordinal_type_interface oti_new = new ordinal_type_interface(oti_old.inc_method, oti_old.dec_method,
			                                                            oti_old.inc_value_method,oti_old.dec_value_method,
			                                                            oti_old.lower_eq_method, oti_old.greater_eq_method, oti_old.lower_method, oti_old.greater_method, lower_value, upper_value, oti_old.value_to_int, oti_old.ordinal_type_to_int);
			ctn.add_internal_interface(oti_new);
		}
Пример #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;
		}
Пример #11
0
		public type_node get_array_type(ordinal_type_interface oti_indexer, type_node element_type,common_namespace_node _cmn,location loc)
		{
			/*
            System.Collections.Generic.Dictionary<type_node, type_node> ht;
            if (!(pascal_arrays.TryGetValue(oti_indexer, out ht)))
            {
                ht = new System.Collections.Generic.Dictionary<type_node, type_node>();
                pascal_arrays[oti_indexer] = ht;
                type_node ret = create_array_type(oti_indexer, element_type, _cmn,loc);
                ht[element_type] = ret;
                return ret;
            }
            type_node tn;
            if (!(ht.TryGetValue(element_type, out tn)))
            {
                type_node ret = create_array_type(oti_indexer, element_type, _cmn,loc);
                ht[element_type] = ret;
                return ret;
            }
            return tn;
			 */
			type_node ret = create_array_type(oti_indexer, element_type, _cmn, loc);
			return ret;
		}
Пример #12
0
		//TODO: Усовершенствовать. Как должны выглядеть типы-диапазоны для net-кода. Изменить методы inc и dec так, чтобы они генерировали исключения в случае выхода за границы типа диапазона.
		private type_node create_diap_type(type_node element_type, constant_node lower_value, constant_node upper_value,common_namespace_node _cmn)
		{
			SymbolTable.Scope top_scope = null;
			if (_cmn != null)
			{
				top_scope = _cmn.scope;
			}
			//basic_type_node btn=new basic_type_node(element_type.name+"_diap");
			common_type_node ctn = new common_type_node(element_type, get_diap_type_name(lower_value, upper_value, element_type.name), SemanticTree.type_access_level.tal_internal,
			                                            _cmn, convertion_data_and_alghoritms.symbol_table.CreateClassScope(top_scope, null), null);
			ctn.type_special_kind = PascalABCCompiler.SemanticTree.type_special_kind.diap_type;
			ctn.internal_is_value = true;
			internal_interface ii = element_type.get_internal_interface(internal_interface_kind.ordinal_interface);
			ordinal_type_interface oti_old = (ordinal_type_interface)ii;

			//TODO: Переделать создание потомков oti.
			ordinal_type_interface oti_new = new ordinal_type_interface(oti_old.inc_method, oti_old.dec_method,
			                                                            oti_old.inc_value_method,oti_old.dec_value_method,
			                                                            oti_old.lower_eq_method, oti_old.greater_eq_method, 
			                                                            oti_old.lower_method, oti_old.greater_method,
			                                                            lower_value, upper_value, oti_old.value_to_int, oti_old.ordinal_type_to_int);
			//type_table.add_type_conversion_from_defined(ctn,SystemLibrary.SystemLibrary.integer_type,new basic_function_node(PascalABCCompiler.SemanticTree.basic_function_type.none,ctn,true,"diaptoord"),type_compare.less_type,true);
			//type_table.add_type_conversion_from_defined(SystemLibrary.SystemLibrary.integer_type,ctn,new basic_function_node(PascalABCCompiler.SemanticTree.basic_function_type.none,ctn,true,"ordtodiap"),type_compare.less_type,true);
			//element_type.add_name(compiler_string_consts.assign_name,new SymbolInfo(SystemLibrary.SystemLibrary.make_assign_operator(ctn,PascalABCCompiler.SemanticTree.basic_function_type.iassign)));
			//type_table.add_type_conversion_from_defined(ctn,SystemLibrary.SystemLibrary.byte_type,new basic_function_node(PascalABCCompiler.SemanticTree.basic_function_type.none,ctn,true,"diaptoord"),type_compare.less_type,true);
			//type_table.add_type_conversion_from_defined(SystemLibrary.SystemLibrary.byte_type,ctn,new basic_function_node(PascalABCCompiler.SemanticTree.basic_function_type.none,ctn,true,"ordtodiap"),type_compare.less_type,true);
			
			//type_table.add_type_conversion_from_defined(ctn,element_type,new basic_function_node(PascalABCCompiler.SemanticTree.basic_function_type.none,element_type,false,"diaptoord"),type_compare.less_type,true);
			//type_table.add_type_conversion_from_defined(ctn,SystemLibrary.SystemLibrary.integer_type,new basic_function_node(PascalABCCompiler.SemanticTree.basic_function_type.none,ctn,true,"diaptoord"),type_compare.less_type,true);
			
			if (element_type != SystemLibrary.SystemLibrary.char_type && element_type != SystemLibrary.SystemLibrary.bool_type)
			{
				element_type.add_generated_name(compiler_string_consts.assign_name,new SymbolInfo(SystemLibrary.SystemLibrary.make_assign_operator(ctn,PascalABCCompiler.SemanticTree.basic_function_type.iassign)));
				/*element_type.add_name(compiler_string_consts.assign_name,new SymbolInfo(SystemLibrary.SystemLibrary.make_assign_operator(ctn,PascalABCCompiler.SemanticTree.basic_function_type.bassign)));
            	element_type.add_name(compiler_string_consts.assign_name,new SymbolInfo(SystemLibrary.SystemLibrary.make_assign_operator(ctn,PascalABCCompiler.SemanticTree.basic_function_type.sassign)));
            	element_type.add_name(compiler_string_consts.assign_name,new SymbolInfo(SystemLibrary.SystemLibrary.make_assign_operator(ctn,PascalABCCompiler.SemanticTree.basic_function_type.sbassign)));
            	element_type.add_name(compiler_string_consts.assign_name,new SymbolInfo(SystemLibrary.SystemLibrary.make_assign_operator(ctn,PascalABCCompiler.SemanticTree.basic_function_type.usassign)));
            	element_type.add_name(compiler_string_consts.assign_name,new SymbolInfo(SystemLibrary.SystemLibrary.make_assign_operator(ctn,PascalABCCompiler.SemanticTree.basic_function_type.uiassign)));
            	element_type.add_name(compiler_string_consts.assign_name,new SymbolInfo(SystemLibrary.SystemLibrary.make_assign_operator(ctn,PascalABCCompiler.SemanticTree.basic_function_type.lassign)));
            	element_type.add_name(compiler_string_consts.assign_name,new SymbolInfo(SystemLibrary.SystemLibrary.make_assign_operator(ctn,PascalABCCompiler.SemanticTree.basic_function_type.ulassign)));*/
			}
			else if (element_type == SystemLibrary.SystemLibrary.char_type)
                element_type.add_generated_name(compiler_string_consts.assign_name, new SymbolInfo(SystemLibrary.SystemLibrary.make_assign_operator(ctn, PascalABCCompiler.SemanticTree.basic_function_type.charassign)));
			else if (element_type == SystemLibrary.SystemLibrary.bool_type)
                element_type.add_generated_name(compiler_string_consts.assign_name, new SymbolInfo(SystemLibrary.SystemLibrary.make_assign_operator(ctn, PascalABCCompiler.SemanticTree.basic_function_type.boolassign)));
			else if (element_type.IsEnum)
			{
                element_type.add_generated_name(compiler_string_consts.assign_name, new SymbolInfo(SystemLibrary.SystemLibrary.make_assign_operator(ctn, PascalABCCompiler.SemanticTree.basic_function_type.iassign)));
                element_type.add_generated_name(compiler_string_consts.assign_name, new SymbolInfo(SystemLibrary.SystemLibrary.make_assign_operator(element_type, PascalABCCompiler.SemanticTree.basic_function_type.iassign)));
			}
			if (element_type == SystemLibrary.SystemLibrary.integer_type)
			{
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.byte_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.itob,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.sbyte_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.itosb,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.short_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.itos,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.ushort_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.itous,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.uint_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.itoui,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.int64_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itol,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.uint64_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itoul,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.double_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itod,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.float_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itof,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.char_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.itochar,false);
				
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.byte_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.btoi,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.sbyte_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.sbtoi,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.short_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.stoi,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.ushort_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.ustoi,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.integer_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.none,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.uitoi,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.int64_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ltoi,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint64_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ultoi,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.real_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itod,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.float_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itof,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.char_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.chartoi,false);
				
				//SystemLibrary.SystemLibrary.make_unary_empty_operator(compiler_string_consts.plus_name, ctn, ctn);
                SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.not_name, ctn, SystemLibrary.SystemLibrary.int_not);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.minus_name, ctn, SystemLibrary.SystemLibrary.int_unmin);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.gr_name, ctn, SystemLibrary.SystemLibrary.int_gr);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.greq_name, ctn, SystemLibrary.SystemLibrary.int_greq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.sm_name, ctn, SystemLibrary.SystemLibrary.int_sm);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.smeq_name, ctn, SystemLibrary.SystemLibrary.int_smeq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.eq_name, ctn, SystemLibrary.SystemLibrary.int_eq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.noteq_name, ctn, SystemLibrary.SystemLibrary.int_noteq);

				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.plus_name, ctn, SystemLibrary.SystemLibrary.int_add);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.minus_name, ctn, SystemLibrary.SystemLibrary.int_sub);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.mul_name, ctn, SystemLibrary.SystemLibrary.int_mul);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.idiv_name, ctn, SystemLibrary.SystemLibrary.int_idiv);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.mod_name, ctn, SystemLibrary.SystemLibrary.int_mod);
				
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.and_name, ctn, SystemLibrary.SystemLibrary.int_and);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.or_name, ctn, SystemLibrary.SystemLibrary.int_or);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.xor_name, ctn, SystemLibrary.SystemLibrary.int_xor);
				
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.shl_name, ctn, SystemLibrary.SystemLibrary.int_shl);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.shr_name, ctn, SystemLibrary.SystemLibrary.int_shr);
			}
			else if (element_type == SystemLibrary.SystemLibrary.byte_type)
			{
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(tctn,SystemLibrary.SystemLibrary.byte_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.itob,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.sbyte_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.btosb,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.short_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.btos,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.ushort_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.btous,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.integer_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.btoi,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.uint_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.btoui,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.int64_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.btol,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.uint64_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.btoul,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.double_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.btod,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.float_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.btof,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.char_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.btochar,false);
				
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.byte_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.none,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.sbyte_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.sbtob,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.short_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.stob,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.ushort_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ustob,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.integer_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.uitob,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.uitob,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.int64_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ltob,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint64_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ultob,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.real_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itod,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.float_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itof,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.char_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.chartob,false);
				
				//SystemLibrary.SystemLibrary.make_unary_empty_operator(compiler_string_consts.plus_name, ctn, ctn);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.not_name, ctn, SystemLibrary.SystemLibrary.int_not);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.minus_name, ctn, SystemLibrary.SystemLibrary.int_unmin);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.gr_name, ctn, SystemLibrary.SystemLibrary.int_gr);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.greq_name, ctn, SystemLibrary.SystemLibrary.int_greq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.sm_name, ctn, SystemLibrary.SystemLibrary.int_sm);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.smeq_name, ctn, SystemLibrary.SystemLibrary.int_smeq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.eq_name, ctn, SystemLibrary.SystemLibrary.int_eq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.noteq_name, ctn, SystemLibrary.SystemLibrary.int_noteq);

				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.plus_name, ctn, SystemLibrary.SystemLibrary.int_add);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.minus_name, ctn, SystemLibrary.SystemLibrary.int_sub);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.mul_name, ctn, SystemLibrary.SystemLibrary.int_mul);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.idiv_name, ctn, SystemLibrary.SystemLibrary.int_idiv);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.mod_name, ctn, SystemLibrary.SystemLibrary.int_mod);
				
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.and_name, ctn, SystemLibrary.SystemLibrary.int_and);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.or_name, ctn, SystemLibrary.SystemLibrary.int_or);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.xor_name, ctn, SystemLibrary.SystemLibrary.int_xor);
				
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.shl_name, ctn, SystemLibrary.SystemLibrary.int_shl);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.shr_name, ctn, SystemLibrary.SystemLibrary.int_shr);
			}
			else if (element_type == SystemLibrary.SystemLibrary.sbyte_type)
			{
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.byte_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.sbtob,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(tctn,SystemLibrary.SystemLibrary.sbyte_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.short_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.sbtos,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.ushort_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.sbtous,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.integer_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.sbtoi,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.uint_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.sbtoui,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.int64_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.sbtol,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.uint64_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.sbtoul,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.double_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.sbtod,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.float_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.sbtof,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.char_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.sbtochar,false);
				
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.byte_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.btosb,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.sbyte_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.none,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.short_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.stosb,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.ushort_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ustosb,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.integer_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.uitosb,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.uitosb,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.int64_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ltosb,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint64_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ultosb,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.real_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itod,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.float_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itof,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.char_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.chartosb,false);
				
				//SystemLibrary.SystemLibrary.make_unary_empty_operator(compiler_string_consts.plus_name, ctn, ctn);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.not_name, ctn, SystemLibrary.SystemLibrary.int_not);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.minus_name, ctn, SystemLibrary.SystemLibrary.int_unmin);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.gr_name, ctn, SystemLibrary.SystemLibrary.int_gr);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.greq_name, ctn, SystemLibrary.SystemLibrary.int_greq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.sm_name, ctn, SystemLibrary.SystemLibrary.int_sm);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.smeq_name, ctn, SystemLibrary.SystemLibrary.int_smeq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.eq_name, ctn, SystemLibrary.SystemLibrary.int_eq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.noteq_name, ctn, SystemLibrary.SystemLibrary.int_noteq);

				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.plus_name, ctn, SystemLibrary.SystemLibrary.int_add);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.minus_name, ctn, SystemLibrary.SystemLibrary.int_sub);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.mul_name, ctn, SystemLibrary.SystemLibrary.int_mul);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.idiv_name, ctn, SystemLibrary.SystemLibrary.int_idiv);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.mod_name, ctn, SystemLibrary.SystemLibrary.int_mod);
				
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.and_name, ctn, SystemLibrary.SystemLibrary.int_and);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.or_name, ctn, SystemLibrary.SystemLibrary.int_or);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.xor_name, ctn, SystemLibrary.SystemLibrary.int_xor);
				
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.shl_name, ctn, SystemLibrary.SystemLibrary.int_shl);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.shr_name, ctn, SystemLibrary.SystemLibrary.int_shr);
			}
			else if (element_type == SystemLibrary.SystemLibrary.short_type)
			{
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.byte_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.stob,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.sbyte_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.stosb,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(tctn,SystemLibrary.SystemLibrary.short_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.btos,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.ushort_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.stous,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.integer_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.stoi,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.uint_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.stoui,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.int64_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.stol,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.uint64_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.stoul,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.double_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.stod,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.float_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.stof,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.char_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.stochar,false);
				
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.byte_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.btos,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.sbyte_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.sbtos,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.short_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.none,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.ushort_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.ustos,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.integer_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.uitos,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.uitos,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.int64_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ltos,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint64_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ultos,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.real_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itod,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.float_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itof,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.char_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.chartos,false);
				
				//SystemLibrary.SystemLibrary.make_unary_empty_operator(compiler_string_consts.plus_name, ctn, ctn);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.not_name, ctn, SystemLibrary.SystemLibrary.int_not);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.minus_name, ctn, SystemLibrary.SystemLibrary.int_unmin);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.gr_name, ctn, SystemLibrary.SystemLibrary.int_gr);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.greq_name, ctn, SystemLibrary.SystemLibrary.int_greq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.sm_name, ctn, SystemLibrary.SystemLibrary.int_sm);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.smeq_name, ctn, SystemLibrary.SystemLibrary.int_smeq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.eq_name, ctn, SystemLibrary.SystemLibrary.int_eq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.noteq_name, ctn, SystemLibrary.SystemLibrary.int_noteq);

				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.plus_name, ctn, SystemLibrary.SystemLibrary.int_add);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.minus_name, ctn, SystemLibrary.SystemLibrary.int_sub);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.mul_name, ctn, SystemLibrary.SystemLibrary.int_mul);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.idiv_name, ctn, SystemLibrary.SystemLibrary.int_idiv);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.mod_name, ctn, SystemLibrary.SystemLibrary.int_mod);
				
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.and_name, ctn, SystemLibrary.SystemLibrary.int_and);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.or_name, ctn, SystemLibrary.SystemLibrary.int_or);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.xor_name, ctn, SystemLibrary.SystemLibrary.int_xor);
				
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.shl_name, ctn, SystemLibrary.SystemLibrary.int_shl);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.shr_name, ctn, SystemLibrary.SystemLibrary.int_shr);
			}
			else if (element_type == SystemLibrary.SystemLibrary.ushort_type)
			{
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.byte_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ustob,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.sbyte_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ustosb,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.short_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.ustos,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(tctn,SystemLibrary.SystemLibrary.ushort_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.stous,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.integer_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.ustoi,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.uint_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.ustoui,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.int64_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.ustol,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.uint64_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.ustoul,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.double_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.ustod,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.float_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.ustof,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.char_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ustochar,false);
				
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.byte_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.btous,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.sbyte_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.sbtous,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.short_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.stous,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.ushort_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.none,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.integer_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.uitous,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.uitous,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.int64_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ltous,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint64_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ultous,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.real_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itod,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.float_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itof,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.char_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.chartous,false);
				
				//SystemLibrary.SystemLibrary.make_unary_empty_operator(compiler_string_consts.plus_name, ctn, ctn);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.not_name, ctn, SystemLibrary.SystemLibrary.int_not);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.minus_name, ctn, SystemLibrary.SystemLibrary.int_unmin);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.gr_name, ctn, SystemLibrary.SystemLibrary.int_gr);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.greq_name, ctn, SystemLibrary.SystemLibrary.int_greq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.sm_name, ctn, SystemLibrary.SystemLibrary.int_sm);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.smeq_name, ctn, SystemLibrary.SystemLibrary.int_smeq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.eq_name, ctn, SystemLibrary.SystemLibrary.int_eq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.noteq_name, ctn, SystemLibrary.SystemLibrary.int_noteq);

				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.plus_name, ctn, SystemLibrary.SystemLibrary.int_add);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.minus_name, ctn, SystemLibrary.SystemLibrary.int_sub);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.mul_name, ctn, SystemLibrary.SystemLibrary.int_mul);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.idiv_name, ctn, SystemLibrary.SystemLibrary.int_idiv);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.mod_name, ctn, SystemLibrary.SystemLibrary.int_mod);
				
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.and_name, ctn, SystemLibrary.SystemLibrary.int_and);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.or_name, ctn, SystemLibrary.SystemLibrary.int_or);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.xor_name, ctn, SystemLibrary.SystemLibrary.int_xor);
				
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.shl_name, ctn, SystemLibrary.SystemLibrary.int_shl);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.shr_name, ctn, SystemLibrary.SystemLibrary.int_shr);
			}
			else if (element_type == SystemLibrary.SystemLibrary.uint_type)
			{
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.byte_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.uitob,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.sbyte_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.uitosb,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.short_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.uitos,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.ushort_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.uitous,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.integer_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.uitoi,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(tctn,SystemLibrary.SystemLibrary.uint_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.stoui,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.int64_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.uitol,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.uint64_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.uitoul,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.double_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.uitod,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.float_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.uitof,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.char_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.uitochar,false);
				
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.byte_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.btoui,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.sbyte_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.sbtoui,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.short_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.stoui,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.ushort_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.ustoui,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.integer_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.itoui,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.none,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.int64_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ltoui,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint64_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ultoui,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.real_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itod,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.float_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itof,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.char_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.chartoui,false);
				
				//SystemLibrary.SystemLibrary.make_unary_empty_operator(compiler_string_consts.plus_name, ctn, ctn);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.not_name, ctn, SystemLibrary.SystemLibrary.uint_not);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.minus_name, ctn, SystemLibrary.SystemLibrary.uint_unmin);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.gr_name, ctn, SystemLibrary.SystemLibrary.uint_gr);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.greq_name, ctn, SystemLibrary.SystemLibrary.uint_greq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.sm_name, ctn, SystemLibrary.SystemLibrary.uint_sm);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.smeq_name, ctn, SystemLibrary.SystemLibrary.uint_smeq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.eq_name, ctn, SystemLibrary.SystemLibrary.uint_eq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.noteq_name, ctn, SystemLibrary.SystemLibrary.uint_noteq);

				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.plus_name, ctn, SystemLibrary.SystemLibrary.uint_add);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.minus_name, ctn, SystemLibrary.SystemLibrary.uint_sub);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.mul_name, ctn, SystemLibrary.SystemLibrary.uint_mul);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.idiv_name, ctn, SystemLibrary.SystemLibrary.uint_idiv);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.mod_name, ctn, SystemLibrary.SystemLibrary.uint_mod);
				
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.and_name, ctn, SystemLibrary.SystemLibrary.uint_and);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.or_name, ctn, SystemLibrary.SystemLibrary.uint_or);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.xor_name, ctn, SystemLibrary.SystemLibrary.uint_xor);
				
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.shl_name, ctn, SystemLibrary.SystemLibrary.uint_shl);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.shr_name, ctn, SystemLibrary.SystemLibrary.uint_shr);
			}
			else if (element_type == SystemLibrary.SystemLibrary.int64_type)
			{
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.byte_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ltob,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.sbyte_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ltosb,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.short_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ltos,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.ushort_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ltous,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.integer_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ltoi,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.uint_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ltoui,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(tctn,SystemLibrary.SystemLibrary.long_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.uitol,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.uint64_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ltoul,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.double_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.ltod,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.float_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.ltof,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.char_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ltochar,false);
				
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.byte_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.btol,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.sbyte_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.sbtol,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.short_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.stol,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.ushort_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.ustol,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.integer_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.uitol,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.uitol,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.int64_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.none,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint64_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.ultol,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.real_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itod,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.float_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itof,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.char_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.chartol,false);
				
				//SystemLibrary.SystemLibrary.make_unary_empty_operator(compiler_string_consts.plus_name, ctn, ctn);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.not_name, ctn, SystemLibrary.SystemLibrary.long_not);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.minus_name, ctn, SystemLibrary.SystemLibrary.long_unmin);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.gr_name, ctn, SystemLibrary.SystemLibrary.long_gr);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.greq_name, ctn, SystemLibrary.SystemLibrary.long_greq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.sm_name, ctn, SystemLibrary.SystemLibrary.long_sm);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.smeq_name, ctn, SystemLibrary.SystemLibrary.long_smeq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.eq_name, ctn, SystemLibrary.SystemLibrary.long_eq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.noteq_name, ctn, SystemLibrary.SystemLibrary.long_noteq);

				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.plus_name, ctn, SystemLibrary.SystemLibrary.long_add);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.minus_name, ctn, SystemLibrary.SystemLibrary.long_sub);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.mul_name, ctn, SystemLibrary.SystemLibrary.long_mul);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.idiv_name, ctn, SystemLibrary.SystemLibrary.long_idiv);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.mod_name, ctn, SystemLibrary.SystemLibrary.long_mod);
				
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.and_name, ctn, SystemLibrary.SystemLibrary.long_and);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.or_name, ctn, SystemLibrary.SystemLibrary.long_or);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.xor_name, ctn, SystemLibrary.SystemLibrary.long_xor);
				
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.shl_name, ctn, SystemLibrary.SystemLibrary.long_shl);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.shr_name, ctn, SystemLibrary.SystemLibrary.long_shr);
			}
			else if (element_type == SystemLibrary.SystemLibrary.uint64_type)
			{
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.byte_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ultob,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.sbyte_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ultosb,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.short_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ultos,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.ushort_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ultous,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.integer_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ultoi,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.uint_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ultoui,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.int64_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.ultol,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(tctn,SystemLibrary.SystemLibrary.ulong_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ltoul,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.double_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.ultod,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.float_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.ultof,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.char_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ultochar,false);
				
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.byte_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.btoul,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.sbyte_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.sbtoul,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.short_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.stoul,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.ushort_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.ustoul,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.integer_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.uitoul,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.uitoul,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.int64_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ltoul,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint64_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.none,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.real_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itod,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.float_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itof,true);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.char_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.chartoul,false);
				
				
				//SystemLibrary.SystemLibrary.make_unary_empty_operator(compiler_string_consts.plus_name, ctn, ctn);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.not_name, ctn, SystemLibrary.SystemLibrary.ulong_not);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.minus_name, ctn, SystemLibrary.SystemLibrary.ulong_unmin);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.gr_name, ctn, SystemLibrary.SystemLibrary.ulong_gr);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.greq_name, ctn, SystemLibrary.SystemLibrary.ulong_greq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.sm_name, ctn, SystemLibrary.SystemLibrary.ulong_sm);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.smeq_name, ctn, SystemLibrary.SystemLibrary.ulong_smeq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.eq_name, ctn, SystemLibrary.SystemLibrary.ulong_eq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.noteq_name, ctn, SystemLibrary.SystemLibrary.ulong_noteq);

				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.plus_name, ctn, SystemLibrary.SystemLibrary.ulong_add);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.minus_name, ctn, SystemLibrary.SystemLibrary.ulong_sub);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.mul_name, ctn, SystemLibrary.SystemLibrary.ulong_mul);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.idiv_name, ctn, SystemLibrary.SystemLibrary.ulong_idiv);

				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.and_name, ctn, SystemLibrary.SystemLibrary.ulong_and);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.or_name, ctn, SystemLibrary.SystemLibrary.ulong_or);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.xor_name, ctn, SystemLibrary.SystemLibrary.ulong_xor);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.mod_name, ctn, SystemLibrary.SystemLibrary.ulong_mod);
				
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.shl_name, ctn, SystemLibrary.SystemLibrary.ulong_shl);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.shr_name, ctn, SystemLibrary.SystemLibrary.ulong_shr);
			}
			else if (element_type == SystemLibrary.SystemLibrary.char_type)
			{
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.byte_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.chartob,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.sbyte_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.chartosb,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.short_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.chartos,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.ushort_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.chartous,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.integer_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.chartoi,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.uint_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.chartoui,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.int64_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.chartol,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.uint64_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.chartoul,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.double_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.chartod,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.float_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.chartof,false);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(tctn,SystemLibrary.SystemLibrary.char_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ultochar,false);
				
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.byte_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.btochar,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.sbyte_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.sbtochar,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.short_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.stochar,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.ushort_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ustochar,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.integer_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.itochar,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.uitochar,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.int64_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ltochar,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint64_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ultochar,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.char_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.none,true);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.real_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.dtochar,false);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.float_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.chartof,false);
				
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.gr_name, ctn, SystemLibrary.SystemLibrary.char_gr);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.greq_name, ctn, SystemLibrary.SystemLibrary.char_greq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.sm_name, ctn, SystemLibrary.SystemLibrary.char_sm);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.smeq_name, ctn, SystemLibrary.SystemLibrary.char_smeq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.eq_name, ctn, SystemLibrary.SystemLibrary.char_eq);
				SystemLibrary.SystemLibrary.add_generated_funtion_to_type(compiler_string_consts.noteq_name, ctn, SystemLibrary.SystemLibrary.char_noteq);
			}
			else if (element_type.IsEnum)
			{
				SystemLibrary.SystemLibrary.make_generated_type_conversion(element_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.none,true);
				
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.byte_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.itob,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.sbyte_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.itosb,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.short_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.itos,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.integer_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.none,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.ushort_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.itous,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.uint_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.itoui,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.int64_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itol,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,SystemLibrary.SystemLibrary.uint64_type,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.itoul,false);
				
				
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.byte_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.btoi,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.sbyte_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.sbtoi,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.short_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.stoi,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.ushort_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.ustoi,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.integer_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.none,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.uitoi,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.int64_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ltoi,false);
				SystemLibrary.SystemLibrary.make_generated_type_conversion(SystemLibrary.SystemLibrary.uint64_type,ctn,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.ultoi,false);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(ctn,element_type,type_compare.greater_type,PascalABCCompiler.SemanticTree.basic_function_type.none);
				//SystemLibrary.SystemLibrary.make_generated_type_conversion(element_type,ctn,type_compare.less_type,PascalABCCompiler.SemanticTree.basic_function_type.none);
			}
			
			/*if (element_type != SystemLibrary.SystemLibrary.char_type && element_type != SystemLibrary.SystemLibrary.bool_type)
            {
            	//if (SystemLibrary.SystemLibrary.sbyte_type != element_type)
            	//type_table.add_type_conversion_from_defined(ctn,SystemLibrary.SystemLibrary.sbyte_type,new basic_function_node(PascalABCCompiler.SemanticTree.basic_function_type.none,ctn,true,"diaptoord"),type_compare.less_type,true);
            	if (SystemLibrary.SystemLibrary.byte_type != element_type)
				type_table.add_type_conversion_from_defined(ctn,SystemLibrary.SystemLibrary.byte_type,new basic_function_node(PascalABCCompiler.SemanticTree.basic_function_type.none,ctn,true,"diaptoord"),type_compare.less_type,true);
            	
            	if (SystemLibrary.SystemLibrary.short_type != element_type)
            	type_table.add_type_conversion_from_defined(ctn,SystemLibrary.SystemLibrary.short_type,new basic_function_node(PascalABCCompiler.SemanticTree.basic_function_type.none,ctn,true,"diaptoord"),type_compare.less_type,true);
            	if (SystemLibrary.SystemLibrary.ushort_type != element_type)
            	type_table.add_type_conversion_from_defined(ctn,SystemLibrary.SystemLibrary.ushort_type,new basic_function_node(PascalABCCompiler.SemanticTree.basic_function_type.none,ctn,true,"diaptoord"),type_compare.less_type,true);
            	if (SystemLibrary.SystemLibrary.integer_type != element_type)
            	type_table.add_type_conversion_from_defined(ctn,SystemLibrary.SystemLibrary.integer_type,new basic_function_node(PascalABCCompiler.SemanticTree.basic_function_type.none,ctn,true,"diaptoord"),type_compare.less_type,true);
            	if (SystemLibrary.SystemLibrary.uint_type != element_type)
            	type_table.add_type_conversion_from_defined(ctn,SystemLibrary.SystemLibrary.uint_type,new basic_function_node(PascalABCCompiler.SemanticTree.basic_function_type.none,ctn,true,"diaptoord"),type_compare.less_type,true);
            	if (SystemLibrary.SystemLibrary.long_type != element_type)
            	type_table.add_type_conversion_from_defined(ctn,SystemLibrary.SystemLibrary.long_type,new basic_function_node(PascalABCCompiler.SemanticTree.basic_function_type.none,ctn,true,"diaptoord"),type_compare.less_type,true);
            	if (SystemLibrary.SystemLibrary.ulong_type != element_type)
            	type_table.add_type_conversion_from_defined(ctn,SystemLibrary.SystemLibrary.ulong_type,new basic_function_node(PascalABCCompiler.SemanticTree.basic_function_type.none,ctn,true,"diaptoord"),type_compare.less_type,true);
            }
             if (element_type != SystemLibrary.SystemLibrary.char_type && element_type != SystemLibrary.SystemLibrary.bool_type)
            {
            	//type_table.add_type_conversion_from_defined(SystemLibrary.SystemLibrary.integer_type,ctn,new basic_function_node(PascalABCCompiler.SemanticTree.basic_function_type.none,ctn,true,"ordtodiap"),type_compare.less_type,true);
            	//if (SystemLibrary.SystemLibrary.byte_type != element_type)
            	//type_table.add_type_conversion_from_defined(SystemLibrary.SystemLibrary.sbyte_type,ctn,new basic_function_node(PascalABCCompiler.SemanticTree.basic_function_type.none,ctn,true,"ordtodiap"),type_compare.less_type,true);
            	type_table.add_type_conversion_from_defined(SystemLibrary.SystemLibrary.byte_type,ctn,new basic_function_node(PascalABCCompiler.SemanticTree.basic_function_type.none,ctn,true,"ordtodiap"),type_compare.less_type,true);
            	//if (SystemLibrary.SystemLibrary.sbyte_type != element_type)
            	//if (SystemLibrary.SystemLibrary.short_type != element_type)
            	type_table.add_type_conversion_from_defined(SystemLibrary.SystemLibrary.short_type,ctn,new basic_function_node(PascalABCCompiler.SemanticTree.basic_function_type.none,ctn,true,"ordtodiap"),type_compare.less_type,true);
            	//if (SystemLibrary.SystemLibrary.ushort_type != element_type)
            	type_table.add_type_conversion_from_defined(SystemLibrary.SystemLibrary.ushort_type,ctn,new basic_function_node(PascalABCCompiler.SemanticTree.basic_function_type.none,ctn,true,"ordtodiap"),type_compare.less_type,true);
            	//if (SystemLibrary.SystemLibrary.integer_type != element_type)
            	type_table.add_type_conversion_from_defined(SystemLibrary.SystemLibrary.integer_type,ctn,new basic_function_node(PascalABCCompiler.SemanticTree.basic_function_type.none,ctn,true,"ordtodiap"),type_compare.less_type,true);
            	//if (SystemLibrary.SystemLibrary.uint_type != element_type)
            	type_table.add_type_conversion_from_defined(SystemLibrary.SystemLibrary.uint_type,ctn,new basic_function_node(PascalABCCompiler.SemanticTree.basic_function_type.none,ctn,true,"ordtodiap"),type_compare.less_type,true);
            	//if (SystemLibrary.SystemLibrary.long_type != element_type)
            	type_table.add_type_conversion_from_defined(SystemLibrary.SystemLibrary.long_type,ctn,new basic_function_node(PascalABCCompiler.SemanticTree.basic_function_type.none,ctn,true,"ordtodiap"),type_compare.less_type,true);
            	//if (SystemLibrary.SystemLibrary.ulong_type != element_type)
            	type_table.add_type_conversion_from_defined(SystemLibrary.SystemLibrary.ulong_type,ctn,new basic_function_node(PascalABCCompiler.SemanticTree.basic_function_type.none,ctn,true,"ordtodiap"),type_compare.less_type,true);
            }
            else
            type_table.add_type_conversion_from_defined(element_type,ctn,new basic_function_node(PascalABCCompiler.SemanticTree.basic_function_type.none,ctn,true,"ordtodiap"),type_compare.less_type,true);
			 */
			//            common_namespace_function_node cnfn = new common_namespace_function_node("Inc$"+pascal_arrays_num++,null,this.convertion_data_and_alghoritms.syntax_tree_visitor.context.converted_namespace,null);
			//            cnfn.parameters.AddElement(new common_parameter("value",ctn,PascalABCCompiler.SemanticTree.parameter_type.var,cnfn,concrete_parameter_type.cpt_var,null,null));
			//            cnfn.is_overload = true;
			//this.convertion_data_and_alghoritms.syntax_tree_visitor.context.converted_namespace.functions.AddElement(cnfn);
			// if (SystemLibrary.SystemLibrary.system_unit.namespaces.Count > 0)
			// 	SystemLibrary.SystemLibrary.system_unit.namespaces[0].functions.AddElement(cnfn);
			// (SystemLibrary.SystemLibrary.system_unit.scope.Find(PascalABCCompiler.TreeConverter.compiler_string_consts.system_unit_name).sym_info as common_namespace_node).functions.AddElement(cnfn);
			// else
			// 	this.convertion_data_and_alghoritms.syntax_tree_visitor.context.converted_namespace.functions.AddElement(cnfn);
			//            statements_list sl = new statements_list(null);
			//            PascalABCCompiler.SemanticTree.basic_function_type bft = PascalABCCompiler.SemanticTree.basic_function_type.iinc;
			//            if (element_type == SystemLibrary.SystemLibrary.byte_type)
			//            	bft = PascalABCCompiler.SemanticTree.basic_function_type.binc;
			//            else if (element_type == SystemLibrary.SystemLibrary.sbyte_type)
			//            	bft = PascalABCCompiler.SemanticTree.basic_function_type.sbinc;
			//            else if (element_type == SystemLibrary.SystemLibrary.short_type)
			//            	bft = PascalABCCompiler.SemanticTree.basic_function_type.sinc;
			//            else if (element_type == SystemLibrary.SystemLibrary.ushort_type)
			//            	bft = PascalABCCompiler.SemanticTree.basic_function_type.usinc;
			//            else if (element_type == SystemLibrary.SystemLibrary.uint_type)
			//            	bft = PascalABCCompiler.SemanticTree.basic_function_type.uiinc;
			//            else if (element_type == SystemLibrary.SystemLibrary.long_type)
			//            	bft = PascalABCCompiler.SemanticTree.basic_function_type.linc;
			//            else if (element_type == SystemLibrary.SystemLibrary.ulong_type)
			//            	bft = PascalABCCompiler.SemanticTree.basic_function_type.ulinc;
			//            else if (element_type == SystemLibrary.SystemLibrary.char_type)
			//            	bft = PascalABCCompiler.SemanticTree.basic_function_type.cinc;
			//            else if (element_type == SystemLibrary.SystemLibrary.bool_type)
			//            	bft = PascalABCCompiler.SemanticTree.basic_function_type.boolinc;
			//            basic_function_call bfc = new basic_function_call(new basic_function_node(bft,element_type,true),null);
			//            bfc.parameters.AddElement(new common_parameter_reference(cnfn.parameters[0] as common_parameter,0,null));
			//            sl.statements.AddElement(bfc);
			//            cnfn.function_code = sl;
			//            SymbolInfo si = this.convertion_data_and_alghoritms.syntax_tree_visitor.context.converted_namespace.scope.Find("Inc");
			//            while (si.Next != null)
			//            	si = si.Next;
			//            si.Next = new SymbolInfo(cnfn);
			//            si.Next.access_level = access_level.al_internal;
			//            si.Next.symbol_kind = symbol_kind.sk_overload_procedure;
			//            //SystemLibrary.SystemLibrary.system_unit.scope.AddSymbol("Inc",new SymbolInfo(cnfn));
//
			//            cnfn = new common_namespace_function_node("Dec$"+pascal_arrays_num++,null,this.convertion_data_and_alghoritms.syntax_tree_visitor.context.converted_namespace,null);
			//            cnfn.parameters.AddElement(new common_parameter("value",ctn,PascalABCCompiler.SemanticTree.parameter_type.var,cnfn,concrete_parameter_type.cpt_var,null,null));
			//            //this.convertion_data_and_alghoritms.syntax_tree_visitor.context.converted_namespace.functions.AddElement(cnfn);
			//            if (SystemLibrary.SystemLibrary.system_unit.namespaces.Count > 0)
			//            	SystemLibrary.SystemLibrary.system_unit.namespaces[0].functions.AddElement(cnfn);
			//            else
			//            	this.convertion_data_and_alghoritms.syntax_tree_visitor.context.converted_namespace.functions.AddElement(cnfn);
			//            sl = new statements_list(null);
			//            bft = PascalABCCompiler.SemanticTree.basic_function_type.idec;
			//            if (element_type == SystemLibrary.SystemLibrary.byte_type)
			//            	bft = PascalABCCompiler.SemanticTree.basic_function_type.bdec;
			//            else if (element_type == SystemLibrary.SystemLibrary.sbyte_type)
			//            	bft = PascalABCCompiler.SemanticTree.basic_function_type.sbdec;
			//            else if (element_type == SystemLibrary.SystemLibrary.short_type)
			//            	bft = PascalABCCompiler.SemanticTree.basic_function_type.sdec;
			//            else if (element_type == SystemLibrary.SystemLibrary.ushort_type)
			//            	bft = PascalABCCompiler.SemanticTree.basic_function_type.usdec;
			//            else if (element_type == SystemLibrary.SystemLibrary.uint_type)
			//            	bft = PascalABCCompiler.SemanticTree.basic_function_type.uidec;
			//            else if (element_type == SystemLibrary.SystemLibrary.long_type)
			//            	bft = PascalABCCompiler.SemanticTree.basic_function_type.ldec;
			//            else if (element_type == SystemLibrary.SystemLibrary.ulong_type)
			//            	bft = PascalABCCompiler.SemanticTree.basic_function_type.uldec;
			//            else if (element_type == SystemLibrary.SystemLibrary.char_type)
			//            	bft = PascalABCCompiler.SemanticTree.basic_function_type.cdec;
			//            else if (element_type == SystemLibrary.SystemLibrary.bool_type)
			//            	bft = PascalABCCompiler.SemanticTree.basic_function_type.booldec;
			//            bfc = new basic_function_call(new basic_function_node(bft,element_type,true),null);
			//            bfc.parameters.AddElement(new common_parameter_reference(cnfn.parameters[0] as common_parameter,0,null));
			//            sl.statements.AddElement(bfc);
			//            cnfn.function_code = sl;
//
			//           SystemLibrary.SystemLibrary.system_unit.scope.AddSymbol("Dec",new SymbolInfo(cnfn));
			// if (element_type == SystemLibrary.SystemLibrary.integer_type)
			// element_type.add_name(compiler_string_consts.assign_name,new SymbolInfo(SystemLibrary.SystemLibrary.make_assign_operator(ctn,PascalABCCompiler.SemanticTree.basic_function_type.iassign)));
			// else if (element_type == SystemLibrary.SystemLibrary.byte_type)
			// element_type.add_name(compiler_string_consts.assign_name,new SymbolInfo(SystemLibrary.SystemLibrary.make_assign_operator(ctn,PascalABCCompiler.SemanticTree.basic_function_type.bassign)));
			/*element_type.add_name(compiler_string_consts.assign_name,new SymbolInfo(SystemLibrary.SystemLibrary.make_assign_operator(ctn,PascalABCCompiler.SemanticTree.basic_function_type.sassign)));
            	element_type.add_name(compiler_string_consts.assign_name,new SymbolInfo(SystemLibrary.SystemLibrary.make_assign_operator(ctn,PascalABCCompiler.SemanticTree.basic_function_type.sbassign)));
            	element_type.add_name(compiler_string_consts.assign_name,new SymbolInfo(SystemLibrary.SystemLibrary.make_assign_operator(ctn,PascalABCCompiler.SemanticTree.basic_function_type.usassign)));
            	element_type.add_name(compiler_string_consts.assign_name,new SymbolInfo(SystemLibrary.SystemLibrary.make_assign_operator(ctn,PascalABCCompiler.SemanticTree.basic_function_type.uiassign)));
            	element_type.add_name(compiler_string_consts.assign_name,new SymbolInfo(SystemLibrary.SystemLibrary.make_assign_operator(ctn,PascalABCCompiler.SemanticTree.basic_function_type.lassign)));
            	element_type.add_name(compiler_string_consts.assign_name,new SymbolInfo(SystemLibrary.SystemLibrary.make_assign_operator(ctn,PascalABCCompiler.SemanticTree.basic_function_type.ulassign)));*/
			// else if (element_type == SystemLibrary.SystemLibrary.char_type)
			// 	element_type.add_name(compiler_string_consts.assign_name,new SymbolInfo(SystemLibrary.SystemLibrary.make_assign_operator(ctn,PascalABCCompiler.SemanticTree.basic_function_type.charassign)));
			// else if (element_type == SystemLibrary.SystemLibrary.bool_type)
			// 	element_type.add_name(compiler_string_consts.assign_name,new SymbolInfo(SystemLibrary.SystemLibrary.make_assign_operator(ctn,PascalABCCompiler.SemanticTree.basic_function_type.boolassign)));
			
			ctn.add_internal_interface(oti_new);
			this.convertion_data_and_alghoritms.syntax_tree_visitor.context.converted_namespace.types.AddElement(ctn);
			return ctn;
		}
Пример #13
0
        public override void visit(SyntaxTree.enum_type_definition _enum_type_definition)
        {
            //throw new NotSupportedError(get_location(_enum_type_definition));
            //ivan added
            int num = 0;
            List<constant_definition_node> cnsts = new List<constant_definition_node>();
            check_if_has_enum_consts(_enum_type_definition);
            foreach (SyntaxTree.enumerator en in _enum_type_definition.enumerators.enumerators)
            {
                SyntaxTree.ident id = en.name;
                constant_definition_node cdn = context.add_const_definition(id.name, get_location(id));
                if (en.value == null)
                cdn.const_value = new enum_const_node(num++, null, get_location(id));
                else
                {
                	constant_node cn = convert_strong_to_constant_node(en.value,SystemLibrary.SystemLibrary.integer_type);
                	check_for_strong_constant(cn,get_location(en.value));
                	cdn.const_value = new enum_const_node((cn as int_const_node).constant_value,null,get_location(id));
                }
                cnsts.Add(cdn);
            }
            common_type_node ctn = context.create_enum_type(null, get_location(_enum_type_definition)); //_enum_type_definition.values
            num = 0;
            foreach (SyntaxTree.enumerator en in _enum_type_definition.enumerators.enumerators)
            {
                SyntaxTree.ident id = en.name;
                constant_definition_node cdn = context.add_const_definition(id.name, get_location(id));
                if (en.value == null)
                cdn.const_value = new enum_const_node(num++, null, get_location(id));
                else
                {
                	constant_node cn = convert_strong_to_constant_node(en.value,SystemLibrary.SystemLibrary.integer_type);
                	check_for_strong_constant(cn,get_location(en.value));
                	cdn.const_value = new enum_const_node((cn as int_const_node).constant_value,null,get_location(id));
                }
                cdn.const_value.type = ctn;
            }
            foreach (constant_definition_node cdn in cnsts)
                cdn.const_value.type = ctn;
            internal_interface ii = SystemLibrary.SystemLibrary.integer_type.get_internal_interface(internal_interface_kind.ordinal_interface);
            ordinal_type_interface oti_old = (ordinal_type_interface)ii;
            enum_const_node lower_value = new enum_const_node(0, ctn, ctn.loc);
            enum_const_node upper_value = new enum_const_node(ctn.const_defs.Count - 1, ctn, ctn.loc);
            ordinal_type_interface oti_new = new ordinal_type_interface(oti_old.inc_method, oti_old.dec_method,
                oti_old.inc_value_method, oti_old.dec_value_method,
                oti_old.lower_eq_method, oti_old.greater_eq_method, oti_old.lower_method, oti_old.greater_method, lower_value, upper_value, oti_old.value_to_int, oti_old.ordinal_type_to_int);

            ctn.add_internal_interface(oti_new);
            //foreach (constant_definition_node cdn in cnsts)
            //  cdn.const_value.type = ctn;
            //context.leave_block();
            context.leave_record();
            return_value(ctn);

        }