diff --git a/Compiler/PCU/PCUFileFormatVersion.cs b/Compiler/PCU/PCUFileFormatVersion.cs index dddfb3105..33af80b57 100644 --- a/Compiler/PCU/PCUFileFormatVersion.cs +++ b/Compiler/PCU/PCUFileFormatVersion.cs @@ -6,6 +6,6 @@ namespace PascalABCCompiler.PCU { public static class PCUFileFormatVersion { - public static System.Int16 Version = 106; + public static System.Int16 Version = 107; } } diff --git a/Compiler/PCU/PCUReader.cs b/Compiler/PCU/PCUReader.cs index beb432589..b18e7bcd1 100644 --- a/Compiler/PCU/PCUReader.cs +++ b/Compiler/PCU/PCUReader.cs @@ -3873,27 +3873,16 @@ namespace PascalABCCompiler.PCU private expression_node CreateBasicFunctionCall() { - /*SemanticTree.basic_function_type bft = (SemanticTree.basic_function_type)br.ReadInt16(); - type_node _tn = GetTypeReference(); - int num_param = br.ReadInt32(); - basic_function_node bfn = new basic_function_node(bft, _tn, true); - basic_function_call bfc = new basic_function_call(bfn, null); - bfc.ret_type=_tn; - for (int i = 0; i < num_param; i++) - { - expression_node expr=CreateExpression(); - bfc.parameters.AddElement(expr); - bfn.parameters.AddElement(new basic_parameter("p",expr.type, PascalABCCompiler.SemanticTree.parameter_type.value, bfn)); - } - return bfc;*/ SemanticTree.basic_function_type bft = (SemanticTree.basic_function_type)br.ReadInt16(); basic_function_node bfn = PascalABCCompiler.SystemLibrary.SystemLibrary.find_operator(bft); if (bfn == null) throw new CompilerInternalError("[PCUREADER] Function not defined: "+bft.ToString());//Console.WriteLine(bft); type_node _tn = GetTypeReference(); + type_node _conversion_tn = GetTypeReference(); br.ReadInt32(); basic_function_call bfc = new basic_function_call(bfn,null); bfc.ret_type = _tn; + bfc.conversion_type = _conversion_tn; int num_param = bfn.parameters.Count; for (int i=0; i private type_node _tn; - + + private type_node _conversion_tn; + /// /// Конструктор выражения. /// @@ -259,6 +261,18 @@ namespace PascalABCCompiler.TreeRealization _tn = value; } } + + public virtual type_node conversion_type + { + get + { + return _conversion_tn; + } + set + { + _conversion_tn = value; + } + } /// /// Обобщенный тип узла. @@ -303,6 +317,14 @@ namespace PascalABCCompiler.TreeRealization return this.type; } } + + SemanticTree.ITypeNode SemanticTree.IExpressionNode.conversion_type + { + get + { + return this.conversion_type; + } + } } [Serializable]