remove unused and commented code
This commit is contained in:
parent
2aa214ff3b
commit
9b1a0c76cd
|
|
@ -82,6 +82,14 @@
|
|||
<Project>{af2efd7b-69dd-4b43-af65-b59b29349c23}</Project>
|
||||
<Name>ParserTools</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\SyntaxTree\SyntaxTree.csproj">
|
||||
<Project>{c2cac65a-b2ae-4ccc-b067-e6b8e75df73a}</Project>
|
||||
<Name>SyntaxTree</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\TreeConverter\TreeConverter.csproj">
|
||||
<Project>{1c9c945a-586d-42a2-a06b-65d84fa7ff78}</Project>
|
||||
<Name>TreeConverter</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
|
|
|
|||
|
|
@ -1447,34 +1447,11 @@ namespace PascalABCCompiler.TreeConverter
|
|||
{
|
||||
if (ShortStringTypes.ContainsKey(length))
|
||||
return ShortStringTypes[length];
|
||||
//type_node base_type = SystemLibrary.SystemLibInitializer.ShortStringType.sym_info as type_node;
|
||||
//check_name_free(name, def_loc);
|
||||
SymbolTable.ClassScope scope = convertion_data_and_alghoritms.symbol_table.CreateClassScope(null, SystemLibrary.SystemLibrary.string_type.Scope);
|
||||
short_string_type_node tctn = new short_string_type_node(//SemanticTree.type_access_level.tal_public, _cmn,
|
||||
scope, def_loc, length);
|
||||
//tctn.IsFictive = true;
|
||||
//set_field_access_level(SemanticTree.field_access_level.fal_public);
|
||||
//_cmn.scope.AddSymbol(name, new SymbolInfo(tctn));
|
||||
//tctn.internal_is_value = false;//base_type.is_value;
|
||||
//tctn.is_class = false;//base_type.is_class;
|
||||
//common_property_node cpn = new common_property_node(compiler_string_consts.index_property_pascal_array_name,tctn,SystemLibrary.SystemLibrary.char_type,SystemLibrary.SystemLibInitializer.GetCharInShortStringProcedure.sym_info as function_node,
|
||||
// null,null,SemanticTree.field_access_level.fal_public,SemanticTree.polymorphic_state.ps_common);
|
||||
//tctn.default_property = cpn;
|
||||
//SystemLibrary.SystemLibrary.make_type_conversion(tctn,SystemLibrary.SystemLibrary.string_type,type_compare.less_type,SemanticTree.basic_function_type.none,true);
|
||||
//SystemLibrary.SystemLibrary.make_type_conversion(SystemLibrary.SystemLibrary.string_type,tctn,type_compare.greater_type,SemanticTree.basic_function_type.none,true);
|
||||
//SystemLibrary.SystemLibrary.make_equivalence_operator(tctn);
|
||||
//SystemLibrary.SystemLibrary.make_not_equivalence_operator(tctn);
|
||||
tctn.add_name(compiler_string_consts.assign_name,new SymbolInfo(SystemLibrary.SystemLibrary.make_assign_operator(tctn,PascalABCCompiler.SemanticTree.basic_function_type.objassign)));
|
||||
tctn.add_name(compiler_string_consts.plus_name,new SymbolInfo(SystemLibrary.SystemLibrary.string_add));
|
||||
//tctn.add_name(compiler_string_consts.eq_name,new SymbolInfo(SystemLibrary.SystemLibrary));
|
||||
//tctn.add_name(compiler_string_consts.noteq_name,new SymbolInfo(SystemLibrary.SystemLibrary.string_type.find_in_type(compiler_string_consts.noteq_name).sym_info as function_node));
|
||||
/*tctn.add_name(compiler_string_consts.smeq_name,new SymbolInfo(SystemLibrary.SystemLibrary.string_type.find_in_type(compiler_string_consts.smeq_name).sym_info as function_node));
|
||||
tctn.add_name(compiler_string_consts.sm_name,new SymbolInfo(SystemLibrary.SystemLibrary.string_type.find_in_type(compiler_string_consts.sm_name).sym_info as function_node));
|
||||
tctn.add_name(compiler_string_consts.greq_name,new SymbolInfo(SystemLibrary.SystemLibrary.string_type.find_in_type(compiler_string_consts.greq_name).sym_info as function_node));
|
||||
tctn.add_name(compiler_string_consts.gr_name,new SymbolInfo(SystemLibrary.SystemLibrary.string_type.find_in_type(compiler_string_consts.gr_name).sym_info as function_node));*/
|
||||
//_ctn = tctn;
|
||||
//SystemLibrary.SystemLibrary.init_reference_type(tctn);
|
||||
//converted_namespace.types.AddElement(tctn);
|
||||
tctn.scope.AddSymbol(compiler_string_consts.plusassign_name,new SymbolInfo(make_short_string_plus_assign(tctn)));
|
||||
type_intersection_node inter = new type_intersection_node(type_compare.greater_type);
|
||||
inter.another_to_this = new type_conversion(SystemLibrary.SystemLibrary.char_to_string);
|
||||
|
|
@ -1496,9 +1473,7 @@ namespace PascalABCCompiler.TreeConverter
|
|||
if (top_function != null)
|
||||
tctn.defined_in_scope = top_function.scope;
|
||||
set_field_access_level(SemanticTree.field_access_level.fal_public);
|
||||
//_cmn.scope.AddSymbol(name, new SymbolInfo(tctn));
|
||||
tctn.SetBaseType(SemanticRules.StructBaseType);
|
||||
//_cmn.types.AddElement(tctn);
|
||||
if (_ctn != null) type_stack.Push(_ctn);
|
||||
add_type(name, tctn, def_loc);
|
||||
_ctn = tctn;
|
||||
|
|
@ -1507,10 +1482,6 @@ namespace PascalABCCompiler.TreeConverter
|
|||
tctn.internal_is_value = true;
|
||||
return tctn;
|
||||
|
||||
/*tctn.SetName(BuildName(tctn.name));
|
||||
_cmn.scope.AddSymbol(tctn.name, new SymbolInfo(tctn));
|
||||
_cmn.types.AddElement(tctn);*/
|
||||
|
||||
}
|
||||
|
||||
public void create_generic_indicator(common_type_node generic)
|
||||
|
|
@ -1969,13 +1940,6 @@ _cmn.types.AddElement(tctn);*/
|
|||
tctn.internal_is_value = true;
|
||||
|
||||
add_convertions_to_enum_type(tctn);
|
||||
//SystemLibrary.SystemLibrary.add_funtion_to_type(compiler_string_consts.gr_name, tctn, enum_gr);
|
||||
//SystemLibrary.SystemLibrary.add_funtion_to_type(compiler_string_consts.greq_name, tctn, enum_greq);
|
||||
//SystemLibrary.SystemLibrary.add_funtion_to_type(compiler_string_consts.sm_name, tctn, enum_sm);
|
||||
//SystemLibrary.SystemLibrary.add_funtion_to_type(compiler_string_consts.smeq_name, tctn, enum_smeq);
|
||||
//SystemLibrary.SystemLibrary.add_funtion_to_type(compiler_string_consts.eq_name, tctn, SystemLibrary.SystemLibrary.int_eq);
|
||||
//SystemLibrary.SystemLibrary.add_funtion_to_type(compiler_string_consts.noteq_name, tctn, SystemLibrary.SystemLibrary.int_noteq);
|
||||
//_cmn.types.AddElement(tctn);
|
||||
if (_ctn != null) type_stack.Push(_ctn);
|
||||
add_type(name, tctn, def_loc);
|
||||
_ctn = tctn;
|
||||
|
|
@ -1983,68 +1947,10 @@ _cmn.types.AddElement(tctn);*/
|
|||
return tctn;
|
||||
}
|
||||
|
||||
//(ssyy) эта функция нигде не вызывается из-за изменения концепции конструкторов
|
||||
/*
|
||||
public void make_constructor()
|
||||
{
|
||||
#if (DEBUG)
|
||||
if (converting_block()!=block_type.function_block)
|
||||
{
|
||||
throw new CompilerInternalError("Create constructor call without function");
|
||||
}
|
||||
if (_func_stack.top().node_location_kind!=SemanticTree.node_location_kind.in_class_location)
|
||||
{
|
||||
throw new CompilerInternalError("Create constructor applied to non class method");
|
||||
}
|
||||
#endif
|
||||
common_function_node top_func=_func_stack.top();
|
||||
|
||||
top_func.return_value_type=_ctn;
|
||||
|
||||
common_method_node top_method=(common_method_node)top_func;
|
||||
|
||||
common_method_node cmn=new common_method_node(top_func.name,_ctn,top_method.loc,_ctn,
|
||||
SemanticTree.polymorphic_state.ps_static,_fal,top_func.scope);
|
||||
cmn.is_constructor=true;
|
||||
cmn.is_overload=top_function.is_overload;
|
||||
|
||||
//parameter_list pl = new parameter_list();
|
||||
foreach (common_parameter pr in top_method.parameters)
|
||||
{
|
||||
common_parameter new_par = new common_parameter(pr.name, pr.type, pr.parameter_type, cmn, pr.concrete_parameter_type,
|
||||
pr.default_value, pr.loc);
|
||||
cmn.parameters.AddElement(new_par);
|
||||
}
|
||||
//cmn.parameters.AddRange(top_method.parameters);
|
||||
|
||||
statements_list stl=new statements_list(top_func.loc);
|
||||
cmn.function_code=stl;
|
||||
this_node thn=new this_node(_ctn,top_func.loc);
|
||||
//ssyy -
|
||||
common_method_call csmc=new common_method_call(top_method,thn,top_func.loc);
|
||||
foreach(common_parameter cp in cmn.parameters)
|
||||
{
|
||||
common_parameter_reference cpr=new common_parameter_reference(cp,0,top_func.loc);
|
||||
csmc.parameters.AddElement(cpr);
|
||||
}
|
||||
stl.statements.AddElement(csmc);
|
||||
stl.statements.AddElement(new empty_statement(null));
|
||||
//\ssyy -
|
||||
_ctn.methods.AddElement(cmn);
|
||||
|
||||
top_method.pascal_associated_constructor=cmn;
|
||||
}
|
||||
*/
|
||||
|
||||
public void close_var_definition_list(type_node tp, expression_node inital_value)
|
||||
{
|
||||
if (var_defs.Count==0)
|
||||
return;
|
||||
// foreach (var_definition_node vdn in var_defs)
|
||||
// {
|
||||
// vdn.type = tp;
|
||||
// vdn.inital_value = GetInitalValueForVariable(vdn, inital_value);
|
||||
// }
|
||||
int count = var_defs.Count;
|
||||
for (int i=0; i<count; i++)
|
||||
{
|
||||
|
|
@ -2101,12 +2007,6 @@ _cmn.types.AddElement(tctn);*/
|
|||
{
|
||||
if (vdn.type.type_special_kind == SemanticTree.type_special_kind.short_string)
|
||||
{
|
||||
/*common_namespace_function_call cmc = new common_namespace_function_call(SystemLibrary.SystemLibInitializer.ClipShortStringProcedure.sym_info as common_namespace_function_node,null);
|
||||
cmc.parameters.AddElement(userInitalValue);
|
||||
cmc.parameters.AddElement(new int_const_node((vdn.type as short_string_type_node).Length,null));*/
|
||||
// expression_node cmc = convertion_data_and_alghoritms.create_simple_function_call(SystemLibrary.SystemLibInitializer.ClipShortStringProcedure.sym_info as function_node,null,convertion_data_and_alghoritms.convert_type(userInitalValue,SystemLibrary.SystemLibrary.string_type),new int_const_node((vdn.type as short_string_type_node).Length,null));
|
||||
// expression_node varref2 = convertion_data_and_alghoritms.CreateVariableReference(vdn, null);
|
||||
// userInitalValue = syntax_tree_visitor.find_operator(compiler_string_consts.assign_name, varref2, cmc, null);
|
||||
expression_node varref2 = convertion_data_and_alghoritms.CreateVariableReference(vdn, null);
|
||||
userInitalValue = syntax_tree_visitor.find_operator(compiler_string_consts.assign_name, varref2, userInitalValue, null);
|
||||
}
|
||||
|
|
@ -2134,9 +2034,6 @@ _cmn.types.AddElement(tctn);*/
|
|||
}
|
||||
else if (vdn.type.type_special_kind == SemanticTree.type_special_kind.short_string)
|
||||
{
|
||||
// common_namespace_function_call cmc = new common_namespace_function_call(SystemLibrary.SystemLibInitializer.ClipShortStringProcedure.sym_info as common_namespace_function_node,null);
|
||||
// cmc.parameters.AddElement(userInitalValue);
|
||||
// cmc.parameters.AddElement(new int_const_node((vdn.type as short_string_type_node).Length,null));
|
||||
expression_node cmc = convertion_data_and_alghoritms.create_simple_function_call(SystemLibrary.SystemLibInitializer.ClipShortStringProcedure.sym_info as function_node,null,convertion_data_and_alghoritms.convert_type(userInitalValue,SystemLibrary.SystemLibrary.string_type),new int_const_node((vdn.type as short_string_type_node).Length,null));
|
||||
userInitalValue = cmc;
|
||||
}
|
||||
|
|
@ -2174,50 +2071,11 @@ _cmn.types.AddElement(tctn);*/
|
|||
userInitalValue = SystemLibrary.SystemLibrary.empty_string;
|
||||
break;
|
||||
}
|
||||
/*if (tp.type_special_kind == SemanticTree.type_special_kind.typed_file)
|
||||
userInitalValue = syntax_tree_visitor.get_init_call_for_typed_file(vdn, tp.element_type);
|
||||
else if (tp.type_special_kind == SemanticTree.type_special_kind.set_type)
|
||||
userInitalValue = syntax_tree_visitor.get_init_call_for_set(vdn);
|
||||
else
|
||||
if (tp is short_string_type_node)
|
||||
userInitalValue = syntax_tree_visitor.get_init_call_for_short_string(vdn);
|
||||
else
|
||||
if (tp == SystemLibrary.SystemLibrary.string_type && SemanticRules.InitStringAsEmptyString)
|
||||
userInitalValue = SystemLibrary.SystemLibrary.empty_string;*/
|
||||
return userInitalValue;
|
||||
}
|
||||
|
||||
public SymbolInfo find(string name)
|
||||
{
|
||||
/*switch (converting_block())
|
||||
{
|
||||
case block_type.function_block:
|
||||
{
|
||||
return _func_stack.top().find(name, CurrentScope);
|
||||
}
|
||||
case block_type.type_block:
|
||||
{
|
||||
return _ctn.find(name, CurrentScope);
|
||||
}
|
||||
case block_type.namespace_block:
|
||||
{
|
||||
return _cmn.find(name);
|
||||
}
|
||||
/*case block_type.with_block:
|
||||
{
|
||||
SymbolInfo si = null;
|
||||
for (int i=0; i<with_stack.Count; i++)
|
||||
{
|
||||
si = with_stack[i].Find(name,CurrentScope);
|
||||
if (si != null)
|
||||
{
|
||||
si.with_expr = with_expr_stack[i];
|
||||
return si;
|
||||
}
|
||||
}
|
||||
return _func_stack.top().find(name, CurrentScope);
|
||||
}
|
||||
}*/
|
||||
SymbolTable.Scope curscope = CurrentScope;
|
||||
SymbolInfo si = curscope.Find(name, curscope);
|
||||
if (si == null && _compiled_tn != null && curscope.TopScope != null)
|
||||
|
|
@ -2239,28 +2097,7 @@ _cmn.types.AddElement(tctn);*/
|
|||
public SymbolInfo find_only_in_namespace(string name)
|
||||
{
|
||||
SymbolInfo si = CurrentScope.FindOnlyInScope(name);
|
||||
//(ssyy) Пока закомментировал, иначе не работает. Не знаю, нужна ли вообще здесь конвертация.
|
||||
//if (_ctn != null && _ctn.base_generic_instance != null)
|
||||
//{
|
||||
// return _ctn.base_generic_instance.ConvertSymbolInfo(si);
|
||||
//}
|
||||
return si;
|
||||
/*switch (converting_block())
|
||||
{
|
||||
case block_type.function_block:
|
||||
{
|
||||
return _func_stack.top().find_only_in_namespace(name);
|
||||
}
|
||||
case block_type.type_block:
|
||||
{
|
||||
return _ctn.Scope.FindOnlyInScope(name);
|
||||
}
|
||||
case block_type.namespace_block:
|
||||
{
|
||||
return _cmn.scope.FindOnlyInScope(name);
|
||||
}
|
||||
}*/
|
||||
//return null;
|
||||
}
|
||||
|
||||
public void leave_interface_part()
|
||||
|
|
@ -2383,11 +2220,6 @@ _cmn.types.AddElement(tctn);*/
|
|||
{
|
||||
if (gpa.useful_for_pointers)
|
||||
{
|
||||
/*common_namespace_function_call cnfc = new common_namespace_function_call(
|
||||
SystemLibrary.SystemLibInitializer.CheckCanUsePointerOnTypeProcedure.sym_info as common_namespace_function_node, null);
|
||||
expression_node ex = new typeof_operator(param, null);
|
||||
cnfc.parameters.AddElement(ex);
|
||||
stl.statements.AddElement(cnfc);*/
|
||||
stl.statements.AddElement(CreateTypeCheckCall(SystemLibrary.SystemLibInitializer.CheckCanUsePointerOnTypeProcedure.sym_info, param));
|
||||
}
|
||||
if (gpa.useful_for_binary_files)
|
||||
|
|
@ -2998,10 +2830,6 @@ _cmn.types.AddElement(tctn);*/
|
|||
AddError(cmn.loc, "FUNCTION_PREDEFINITION_WITHOUT_DEFINITION");
|
||||
}
|
||||
}
|
||||
//ssyy
|
||||
//Проверяем, что тип реализует заявленные интерфейсы.
|
||||
//check_implement_interfaces(ctn);
|
||||
//\ssyy
|
||||
}
|
||||
if (ctn.is_generic_type_definition && !ctn.IsInterface && !ctn.IsDelegate)
|
||||
{
|
||||
|
|
@ -3043,17 +2871,6 @@ _cmn.types.AddElement(tctn);*/
|
|||
}
|
||||
}
|
||||
|
||||
/*public void block_defined_labels(List<label_node> lab_list)
|
||||
{
|
||||
foreach (label_node ln in lab_list)
|
||||
{
|
||||
if (ln.is_defined)
|
||||
{
|
||||
ln.goto_blocked = true;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
//\ssyy
|
||||
|
||||
//(ssyy) "Я" бывают разные :)
|
||||
|
|
@ -3195,19 +3012,6 @@ _cmn.types.AddElement(tctn);*/
|
|||
{
|
||||
|
||||
is_find_predefinition=true;
|
||||
//Добавляем все описанные параметры
|
||||
/*
|
||||
foreach(parameter par in compar.parameters)
|
||||
{
|
||||
//Тут, конечно, приведение типа параметра, но оно вроде всегда должно быть такого типа.
|
||||
common_parameter intcpar=(common_parameter)par;
|
||||
common_parameter new_par = new common_parameter(intcpar.name, intcpar.type, intcpar.parameter_type,
|
||||
fn, intcpar.concrete_parameter_type, intcpar.default_value, intcpar.loc);
|
||||
fn.parameters.AddElement(new_par);
|
||||
fn.scope.AddSymbol(new_par.name,new SymbolInfo(new_par));
|
||||
}
|
||||
compar.scope=fn.scope;
|
||||
*/
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -3400,15 +3204,6 @@ _cmn.types.AddElement(tctn);*/
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
compar.parameters.clear();
|
||||
foreach (common_parameter pr in fn.parameters)
|
||||
{
|
||||
pr.common_function = compar;
|
||||
compar.parameters.AddElement(pr);
|
||||
}
|
||||
*/
|
||||
|
||||
_func_stack.push(compar);
|
||||
compar.attributes.AddRange(fn.attributes);
|
||||
//si.sym_info=fn;
|
||||
|
|
@ -3442,15 +3237,6 @@ _cmn.types.AddElement(tctn);*/
|
|||
si=_func_stack.top().scope.FindOnlyInScope(fn.name);
|
||||
_func_stack.push(temp);
|
||||
}
|
||||
//SymbolInfo si=find_only_in_namespace(fn.name);
|
||||
|
||||
//И эта проверка наверно не нужна, но пусть пока повисит
|
||||
//Тем более с ней, наверное, быстрее работает
|
||||
//Лучше удалю пока
|
||||
//if (si.Next==null)
|
||||
//{
|
||||
// return;
|
||||
//}
|
||||
|
||||
while(si!=null)
|
||||
{
|
||||
|
|
@ -3532,9 +3318,6 @@ _cmn.types.AddElement(tctn);*/
|
|||
_cmn.runtime_types.AddElement(comp_tn);
|
||||
}
|
||||
}
|
||||
//_cmn.type_synonyms.Add(new type_synonym(name, tn, loc));
|
||||
//_cmn.scope.AddSymbol(name,new SymbolInfo(tn));
|
||||
//DS MODIFED 22.07.07
|
||||
CurrentScope.AddSymbol(name, new SymbolInfo(tn));
|
||||
if (tn is ref_type_node && converting_block() == block_type.namespace_block)
|
||||
converted_namespace.ref_types.Add(tn as ref_type_node);
|
||||
|
|
|
|||
|
|
@ -299,18 +299,6 @@ namespace PascalABCCompiler.TreeConverter
|
|||
|
||||
switch (fn.semantic_node_type)
|
||||
{
|
||||
/*
|
||||
case semantic_node_type.empty_function_node:
|
||||
{
|
||||
#if (DEBUG)
|
||||
if (exprs.Length!=1)
|
||||
{
|
||||
throw new CompilerInternalError("Epty functions with only single parameter allowed.");
|
||||
}
|
||||
#endif
|
||||
return exprs[0];
|
||||
}
|
||||
*/
|
||||
case semantic_node_type.basic_function_node:
|
||||
{
|
||||
return create_basic_function_call((basic_function_node)fn, loc, exprs);
|
||||
|
|
@ -411,16 +399,6 @@ namespace PascalABCCompiler.TreeConverter
|
|||
{
|
||||
function_node fn = select_function(exprs, si, loc);
|
||||
|
||||
/*
|
||||
if (fn.compile_time_executor != null)
|
||||
{
|
||||
expression_node ex = fn.compile_time_executor(loc, exprs.ToArray());
|
||||
if (ex != null)
|
||||
{
|
||||
return ex;
|
||||
}
|
||||
}
|
||||
*/
|
||||
//allow_procedure = true;
|
||||
if ((!allow_procedure) && (fn.return_value_type == null))
|
||||
{
|
||||
|
|
@ -1577,38 +1555,6 @@ namespace PascalABCCompiler.TreeConverter
|
|||
private void convert_function_call_expressions(function_node fn,expressions_list exprs,
|
||||
possible_type_convertions_list ptcal)
|
||||
{
|
||||
/*if (SystemLibrary.SystemLibrary.syn_visitor.SystemUnitAssigned && fn.name != compiler_string_consts.assign_name && !SystemLibrary.SystemLibrary.syn_visitor.one_way_operation(fn.name) && SystemLibrary.SystemLibrary.syn_visitor.in_check_range_region())
|
||||
{
|
||||
for (int i=0; i<exprs.Count; i++)
|
||||
{
|
||||
if (exprs[i] is statements_expression_node)
|
||||
break;
|
||||
expression_node right = exprs[i];
|
||||
if (fn.parameters.Count <= i)
|
||||
break;
|
||||
if (fn.parameters[i].parameter_type == parameter_type.var)
|
||||
continue;
|
||||
type_node left_type = fn.parameters[i].type;
|
||||
|
||||
if (SystemLibrary.SystemLibrary.syn_visitor.is_range_checkable(left_type) && SystemLibrary.SystemLibrary.syn_visitor.is_range_checkable(exprs[i].type))
|
||||
{
|
||||
ordinal_type_interface oti = left_type.get_internal_interface(internal_interface_kind.ordinal_interface) as ordinal_type_interface;
|
||||
if (left_type != SystemLibrary.SystemLibrary.char_type)
|
||||
if(!(oti.lower_value is enum_const_node) && !(oti.lower_value is char_const_node))
|
||||
right = SystemLibrary.SystemLibrary.syn_visitor.convertion_data_and_alghoritms.convert_type(SystemLibrary.SystemLibrary.syn_visitor.convertion_data_and_alghoritms.create_simple_function_call(SystemLibrary.SystemLibInitializer.CheckRangeFunction.sym_info as common_namespace_function_node, null, SystemLibrary.SystemLibrary.syn_visitor.convertion_data_and_alghoritms.convert_type(right,SystemLibrary.SystemLibrary.int64_type),
|
||||
SystemLibrary.SystemLibrary.syn_visitor.convertion_data_and_alghoritms.convert_type(oti.lower_value,SystemLibrary.SystemLibrary.int64_type),SystemLibrary.SystemLibrary.syn_visitor.convertion_data_and_alghoritms.convert_type(oti.upper_value,SystemLibrary.SystemLibrary.int64_type)),right.type);
|
||||
else if (oti.lower_value is enum_const_node)
|
||||
{
|
||||
right = SystemLibrary.SystemLibrary.syn_visitor.convertion_data_and_alghoritms.explicit_convert_type(SystemLibrary.SystemLibrary.syn_visitor.convertion_data_and_alghoritms.create_simple_function_call(SystemLibrary.SystemLibInitializer.CheckRangeFunction.sym_info as common_namespace_function_node, null, SystemLibrary.SystemLibrary.syn_visitor.convertion_data_and_alghoritms.explicit_convert_type(right,SystemLibrary.SystemLibrary.int64_type),
|
||||
SystemLibrary.SystemLibrary.syn_visitor.convertion_data_and_alghoritms.explicit_convert_type(oti.lower_value,SystemLibrary.SystemLibrary.int64_type),SystemLibrary.SystemLibrary.syn_visitor.convertion_data_and_alghoritms.explicit_convert_type(oti.upper_value,SystemLibrary.SystemLibrary.int64_type)),right.type);
|
||||
}
|
||||
else if (oti.lower_value is char_const_node)
|
||||
right = SystemLibrary.SystemLibrary.syn_visitor.convertion_data_and_alghoritms.create_simple_function_call(SystemLibrary.SystemLibInitializer.CheckCharRangeFunction.sym_info as common_namespace_function_node, null, right, oti.lower_value,oti.upper_value);
|
||||
|
||||
}
|
||||
exprs[i] = right;
|
||||
}
|
||||
}*/
|
||||
for(int i=0;i<exprs.Count;i++)
|
||||
{
|
||||
if ((ptcal.snl != null) && (i >= fn.parameters.Count - 1))
|
||||
|
|
@ -1673,20 +1619,6 @@ namespace PascalABCCompiler.TreeConverter
|
|||
|
||||
}
|
||||
|
||||
//public common_function_node find_eq_method_in_symbol_info(function_node fn,SymbolInfo si)
|
||||
//{
|
||||
// while(si!=null)
|
||||
// {
|
||||
// common_function_node cfn=si.sym_info as common_function_node;
|
||||
// if (function_eq_params(cfn,fn))
|
||||
// {
|
||||
// return cfn;
|
||||
// }
|
||||
// si = si.Next;
|
||||
// }
|
||||
// return null;
|
||||
//}
|
||||
|
||||
private function_node find_eq_return_value_method_in_list(function_node fn, function_node_list funcs)
|
||||
{
|
||||
foreach (function_node f in funcs)
|
||||
|
|
@ -1732,11 +1664,6 @@ namespace PascalABCCompiler.TreeConverter
|
|||
public function_node is_exist_eq_method_in_list(function_node fn,function_node_list funcs)
|
||||
{
|
||||
return find_eq_method_in_list(fn,funcs);
|
||||
/*if (fn==null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;*/
|
||||
}
|
||||
|
||||
public void init_reference_type(type_node ctn)
|
||||
|
|
@ -2104,11 +2031,6 @@ namespace PascalABCCompiler.TreeConverter
|
|||
{
|
||||
fn = find_eq_return_value_method_in_list(fn, funcs);
|
||||
return fn;
|
||||
/*if (fn == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;*/
|
||||
}
|
||||
|
||||
private string get_return_variable_name(string function_name)
|
||||
|
|
|
|||
Loading…
Reference in a new issue