From 3a7551d0a2ff24dc049eea41ebc7a2e65367bfca Mon Sep 17 00:00:00 2001 From: andrewlord607 Date: Tue, 30 May 2017 23:58:34 +0300 Subject: [PATCH] merge fix --- CodeCompletion/SymTable.cs | 24 +++++++++++++----- ReleaseGenerators/PascalABCNET_ALL.bat | 3 +-- TestSuite/CompilationSamples/Mutual Lock.pas | 2 +- .../TreeConversion/compilation_context.cs | 2 +- bin/Lib/PABCRtl.dll | Bin 566272 -> 566272 bytes 5 files changed, 20 insertions(+), 11 deletions(-) diff --git a/CodeCompletion/SymTable.cs b/CodeCompletion/SymTable.cs index 5e5d31a52..334d27668 100644 --- a/CodeCompletion/SymTable.cs +++ b/CodeCompletion/SymTable.cs @@ -413,12 +413,25 @@ namespace CodeCompletion if (this.used_units != null) for (int i = 0; i < this.used_units.Count; i++) { - if (this.used_units[i] != this) + if (!hasUsesCycle(this)) lst.AddRange(this.used_units[i].GetExtensionMethods(ts)); } return lst; } - + + private bool hasUsesCycle(SymScope unit) + { + if (this.used_units != null) + for (int i = 0; i < this.used_units.Count; i++) + { + if (this.used_units[i] == unit) + return true; + else if (this.used_units[i].hasUsesCycle(unit)) + return true; + } + return false; + } + public virtual bool IsAssembliesChanged() { return false; @@ -2203,7 +2216,7 @@ namespace CodeCompletion if (es == null) return false; if (enum_consts.Count != es.enum_consts.Count) return false; for (int i = 0; i < es.enum_consts.Count; i++) - if (string.Compare(es.enum_consts[i], enum_consts[i], true) != 0) return false; + if (string.Compare(enum_consts[i], this.enum_consts[i], true) != 0) return false; return true; } @@ -5844,9 +5857,7 @@ namespace CodeCompletion if (si == null && names.Count == 0) { if (string.Compare(name, "Create", true) == 0 && this.ctn != typeof(object)) - { si = PascalABCCompiler.NetHelper.NetHelper.GetConstructor(ctn); - } if (si == null) { if (pascal_ext_meths.Count > 0) @@ -5921,6 +5932,7 @@ namespace CodeCompletion { CompiledConstructorScope cms = new CompiledConstructorScope(new SymInfo("Create", SymbolKind.Method, "Create"), (si.First().sym_info as compiled_constructor_node).constructor_info, this); names.Insert(0, cms); + si.InfoUnitList.RemoveAt(0); if(si.InfoUnitList.Count == 0) si = null; CompiledConstructorScope tmp = cms; @@ -6000,9 +6012,7 @@ namespace CodeCompletion if (si == null) { if (string.Compare(name, "Create", true) == 0) - { si = PascalABCCompiler.NetHelper.NetHelper.GetConstructor(ctn); - } if (si == null) { return null; diff --git a/ReleaseGenerators/PascalABCNET_ALL.bat b/ReleaseGenerators/PascalABCNET_ALL.bat index ec26a0c26..08da77e81 100644 --- a/ReleaseGenerators/PascalABCNET_ALL.bat +++ b/ReleaseGenerators/PascalABCNET_ALL.bat @@ -2,5 +2,4 @@ "..\utils\NSIS\Unicode\makensis.exe" PascalABCNETStandart.nsi "..\utils\NSIS\Unicode\makensis.exe" PascalABCNETWithDotNet.nsi PascalABCNETConsoleZIP.bat -PascalABCNETMonoZIP.bat -PAUSE \ No newline at end of file +PascalABCNETMonoZIP.bat \ No newline at end of file diff --git a/TestSuite/CompilationSamples/Mutual Lock.pas b/TestSuite/CompilationSamples/Mutual Lock.pas index 34c44dd45..03e18485a 100644 --- a/TestSuite/CompilationSamples/Mutual Lock.pas +++ b/TestSuite/CompilationSamples/Mutual Lock.pas @@ -1,4 +1,4 @@ -// Демонстрация использования критических секций и возможных взаимоблокировок +// Демонстрация использования критических секций и возможных взаимоблокировок begin {$omp parallel sections} begin diff --git a/TreeConverter/TreeConversion/compilation_context.cs b/TreeConverter/TreeConversion/compilation_context.cs index 6a74bcd77..bf9cd539d 100644 --- a/TreeConverter/TreeConversion/compilation_context.cs +++ b/TreeConverter/TreeConversion/compilation_context.cs @@ -3450,7 +3450,7 @@ namespace PascalABCCompiler.TreeConverter } if (si == null) { - return null; //Никогда не зайдёт + return null; } compiled_function_node cfn_sec = fn as compiled_function_node; diff --git a/bin/Lib/PABCRtl.dll b/bin/Lib/PABCRtl.dll index a16e07b3d07debd5a536264275c33c5946dd3e7b..9fddc9acc7a742867bc97f3c8f746e5d35a8446d 100644 GIT binary patch delta 236 zcmVm*dgoD5T`I@&QnX0}=#>0}=&?0}=+e0}=iW0H m-3Ktj00}=&?0}=+e0}=