From 9f9c2a85bd8d8f57e7bde37110b0d79c41510689 Mon Sep 17 00:00:00 2001 From: Mikhalkovich Stanislav Date: Tue, 23 Apr 2024 20:51:25 +0300 Subject: [PATCH] fix #3086 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CompilerOptions.StandardModules.ContainsKey(currentCompilationUnit.languageName) - проверка convert_semantic_strong - раскомментировал try чтобы лучше перехватывать параметры Exception --- Compiler/Compiler.cs | 2 ++ Configuration/GlobalAssemblyInfo.cs | 2 +- Configuration/Version.defs | 2 +- Release/pabcversion.txt | 2 +- ReleaseGenerators/PascalABCNET_version.nsh | 2 +- .../TreeConversion/compilation_context.cs | 5 +++++ .../TreeConversion/syntax_tree_visitor.cs | 14 ++++++++------ bin/Lib/PABCSystem.xml | 10 +++++----- 8 files changed, 24 insertions(+), 15 deletions(-) diff --git a/Compiler/Compiler.cs b/Compiler/Compiler.cs index 28e4fd407..f9670f1a5 100644 --- a/Compiler/Compiler.cs +++ b/Compiler/Compiler.cs @@ -3038,6 +3038,8 @@ namespace PascalABCCompiler public void AddStandardUnitsToInterfaceUsesSection(SyntaxTree.compilation_unit unitSyntaxTree) { + if (!(CompilerOptions.StandardModules.ContainsKey(currentCompilationUnit.languageName))) + return; if (CompilerOptions.StandardModules[currentCompilationUnit.languageName].Count == 0) return; diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index cc327ca45..3c614f64d 100644 --- a/Configuration/GlobalAssemblyInfo.cs +++ b/Configuration/GlobalAssemblyInfo.cs @@ -15,7 +15,7 @@ internal static class RevisionClass public const string Major = "3"; public const string Minor = "9"; public const string Build = "0"; - public const string Revision = "3458"; + public const string Revision = "3460"; public const string MainVersion = Major + "." + Minor; public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision; diff --git a/Configuration/Version.defs b/Configuration/Version.defs index d32c4c7d6..3a88d6983 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ %COREVERSION%=0 -%REVISION%=3458 +%REVISION%=3460 %MINOR%=9 %MAJOR%=3 diff --git a/Release/pabcversion.txt b/Release/pabcversion.txt index 2fe1353c9..11bde104a 100644 --- a/Release/pabcversion.txt +++ b/Release/pabcversion.txt @@ -1 +1 @@ -3.9.0.3458 +3.9.0.3460 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index 80ca0ad2d..5adf0ef2c 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.9.0.3458' +!define VERSION '3.9.0.3460' diff --git a/TreeConverter/TreeConversion/compilation_context.cs b/TreeConverter/TreeConversion/compilation_context.cs index 5887f9d5c..540d686d6 100644 --- a/TreeConverter/TreeConversion/compilation_context.cs +++ b/TreeConverter/TreeConversion/compilation_context.cs @@ -850,6 +850,11 @@ namespace PascalABCCompiler.TreeConverter for (int i = 1; i < names.names.Count - 1; i++) { List sil = null; + if (di is common_unit_node) + { + sil = (di as common_unit_node).find_only_in_namespace(names.names[i].name); // SSM 23.04.24 fix #3086 + } + else if (di is namespace_node) { sil = (di as namespace_node).find(names.names[i].name); diff --git a/TreeConverter/TreeConversion/syntax_tree_visitor.cs b/TreeConverter/TreeConversion/syntax_tree_visitor.cs index 05bd65d6d..29ad6c2f6 100644 --- a/TreeConverter/TreeConversion/syntax_tree_visitor.cs +++ b/TreeConverter/TreeConversion/syntax_tree_visitor.cs @@ -805,7 +805,7 @@ namespace PascalABCCompiler.TreeConverter //st = prepare_statement(st); statement_node sn = null; - //try + try { sn = ret.visit(st); // SSM 19/01/17 закомментировал две следующие строчки @@ -821,14 +821,16 @@ namespace PascalABCCompiler.TreeConverter ErrorsList.Add(e); return new empty_statement(null); } - } + }*/ catch (Exception e) { - if (ThrowCompilationError) + var s = e.StackTrace; + var runMethodInfo = e.TargetSite; + //if (ThrowCompilationError) throw e; - else - return new empty_statement(null); - }*/ + //else + // return new empty_statement(null); + } //sn.loc=get_location(st); #region MikhailoMMX, обработка критических секций OpenMP diff --git a/bin/Lib/PABCSystem.xml b/bin/Lib/PABCSystem.xml index 1c0cf27a1..24f8586f5 100644 --- a/bin/Lib/PABCSystem.xml +++ b/bin/Lib/PABCSystem.xml @@ -1141,19 +1141,19 @@ -- - + -- - + -- - + -- - + -- - + --