diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index 37c8ce1dc..85ffbab6e 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 = "1"; public const string Build = "0"; - public const string Revision = "1254"; + public const string Revision = "1256"; 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 7e06a8034..d80985697 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ %MINOR%=1 -%REVISION%=1254 +%REVISION%=1256 %COREVERSION%=0 %MAJOR%=3 diff --git a/Localization/DefaultLang.resources b/Localization/DefaultLang.resources index 281026567..350e2b5da 100644 Binary files a/Localization/DefaultLang.resources and b/Localization/DefaultLang.resources differ diff --git a/PascalABCNET.axml b/PascalABCNET.axml index 6fe4ed127..5ca16a2d6 100644 --- a/PascalABCNET.axml +++ b/PascalABCNET.axml @@ -746,28 +746,6 @@ - - \TreeConverter\TreeConversion\syntax_tree_visitor.cs - string Consts__Self = YieldHelpers.YieldConsts.Self; - - private bool CheckUnknownIdentNeedsClassCapture ( SyntaxTree . yield_unknown_ident _unk ) - public class syntax_tree_visitor : SyntaxTree . AbstractVisitor - namespace PascalABCCompiler . TreeConverter - - - - - - \yield\syntaxvisitors\yieldvisitors\processyieldscapturedvars.cs - function_header nfh = ObjectCopier.Clone(fh); - - type_declarations GenClassesForYield ( procedure_definition pd , IEnumerable < var_def_statement > fields , IDictionary < string , string > localsMap , IDictionary < string , string > formalParamsMap , IDictionary < var_def_statement , var_def_statement > localsCloneMap , yield_locals_type_map_helper localTypeMapHelper ) - public class ProcessYieldCapturedVarsVisitor : BaseChangeVisitor - namespace SyntaxVisitors - - - - \treeconverter\treeconversion\syntax_tree_visitor.cs visit_program_code(_block.program_code); @@ -790,16 +768,42 @@ - - \Yield\YieldConversionSyntax\YieldDesugarSyntaxTreeConverter.cs - root.visit(new ProcessYieldCapturedVarsVisitor()); - - public syntax_tree_node Convert ( syntax_tree_node root ) - public class YieldDesugarSyntaxTreeConverter : ISyntaxTreeConverter - namespace YieldDesugarSyntaxTreeConverter - - - + + + + \Yield\YieldConversionSyntax\YieldDesugarSyntaxTreeConverter.cs + root.visit(new ProcessYieldCapturedVarsVisitor()); + + public syntax_tree_node Convert ( syntax_tree_node root ) + public class YieldDesugarSyntaxTreeConverter : ISyntaxTreeConverter + namespace YieldDesugarSyntaxTreeConverter + + + + + + \TreeConverter\TreeConversion\syntax_tree_visitor.cs + string Consts__Self = YieldHelpers.YieldConsts.Self; + + private bool CheckUnknownIdentNeedsClassCapture ( SyntaxTree . yield_unknown_ident _unk , out bool isStaticIdent ) + public class syntax_tree_visitor : SyntaxTree . AbstractVisitor + namespace PascalABCCompiler . TreeConverter + + + + + + \yield\syntaxvisitors\yieldvisitors\processyieldscapturedvars.cs + function_header nfh = ObjectCopier.Clone(fh); + + type_declarations GenClassesForYield ( procedure_definition pd , IEnumerable < var_def_statement > fields , IDictionary < string , string > localsMap , IDictionary < string , string > formalParamsMap , IDictionary < var_def_statement , var_def_statement > localsCloneMap , yield_locals_type_map_helper localTypeMapHelper ) + public class ProcessYieldCapturedVarsVisitor : BaseChangeVisitor + namespace SyntaxVisitors + + + + + diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index de1dc805b..f87d1863f 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.1.0.1254' +!define VERSION '3.1.0.1256' diff --git a/SyntaxTree/tree/tree.nin b/SyntaxTree/tree/tree.nin index 9215d8ecd..998c7701c 100644 Binary files a/SyntaxTree/tree/tree.nin and b/SyntaxTree/tree/tree.nin differ diff --git a/TestSuite/CompilationSamples/GraphABC.pas b/TestSuite/CompilationSamples/GraphABC.pas index 97bc0aadf..b83342d50 100644 --- a/TestSuite/CompilationSamples/GraphABC.pas +++ b/TestSuite/CompilationSamples/GraphABC.pas @@ -764,6 +764,15 @@ type procedure SetMathematic; /// Устанавливает левую систему координат (ось OY направлена вниз, ось OX - вправо) procedure SetStandard; + + procedure ScaleOn(scale: real); + + procedure Transform(x,y: real); + + procedure Rotate(angle: real); + + procedure ClearMatrix; + /// X-координата начала координат относительно левого верхнего угла окна property OriginX: integer read GetOriginX write SetOriginX; /// Y-координата начала координат относительно левого верхнего угла окна @@ -1310,6 +1319,42 @@ begin SetTransform(OriginX,OriginY,Angle,ScaleX,ScaleY); end; +procedure GraphABCCoordinate.ScaleOn(scale: real); +begin + lock f do + begin + gr.ScaleTransform(scale,scale); + gbmp.ScaleTransform(scale,scale); + end; +end; + +procedure GraphABCCoordinate.Transform(x,y: real); +begin + lock f do + begin + gr.TranslateTransform(x,y); + gbmp.TranslateTransform(x,y) + end; +end; + +procedure GraphABCCoordinate.Rotate(angle: real); +begin + lock f do + begin + gr.RotateTransform(angle); + gbmp.RotateTransform(angle); + end; +end; + +procedure GraphABCCoordinate.ClearMatrix; +begin + lock f do + begin + gr.Transform := new System.Drawing.Drawing2D.Matrix(); + gbmp.Transform := new System.Drawing.Drawing2D.Matrix(); + end; +end; + procedure GraphABCCoordinate.SetOriginX(x: integer); begin SetOrigin(x,OriginY); diff --git a/TestSuite/CompilationSamples/PABCSystem.pas b/TestSuite/CompilationSamples/PABCSystem.pas index f75377895..db1bc19e9 100644 --- a/TestSuite/CompilationSamples/PABCSystem.pas +++ b/TestSuite/CompilationSamples/PABCSystem.pas @@ -8555,6 +8555,12 @@ begin System.Array.Sort(self,cmp); end; +/// Возвращает индекс последнего элемента массива +function High(self: System.Array); extensionmethod := High(Self); + +/// Возвращает индекс первого элемента массива +function Low(self: System.Array); extensionmethod := Low(Self); + ///-- function CreateSliceFromArrayInternal(Self: array of T; from,step,count: integer): array of T; begin diff --git a/bin/Lib/GraphABC.pas b/bin/Lib/GraphABC.pas index 97bc0aadf..b83342d50 100644 --- a/bin/Lib/GraphABC.pas +++ b/bin/Lib/GraphABC.pas @@ -764,6 +764,15 @@ type procedure SetMathematic; /// Устанавливает левую систему координат (ось OY направлена вниз, ось OX - вправо) procedure SetStandard; + + procedure ScaleOn(scale: real); + + procedure Transform(x,y: real); + + procedure Rotate(angle: real); + + procedure ClearMatrix; + /// X-координата начала координат относительно левого верхнего угла окна property OriginX: integer read GetOriginX write SetOriginX; /// Y-координата начала координат относительно левого верхнего угла окна @@ -1310,6 +1319,42 @@ begin SetTransform(OriginX,OriginY,Angle,ScaleX,ScaleY); end; +procedure GraphABCCoordinate.ScaleOn(scale: real); +begin + lock f do + begin + gr.ScaleTransform(scale,scale); + gbmp.ScaleTransform(scale,scale); + end; +end; + +procedure GraphABCCoordinate.Transform(x,y: real); +begin + lock f do + begin + gr.TranslateTransform(x,y); + gbmp.TranslateTransform(x,y) + end; +end; + +procedure GraphABCCoordinate.Rotate(angle: real); +begin + lock f do + begin + gr.RotateTransform(angle); + gbmp.RotateTransform(angle); + end; +end; + +procedure GraphABCCoordinate.ClearMatrix; +begin + lock f do + begin + gr.Transform := new System.Drawing.Drawing2D.Matrix(); + gbmp.Transform := new System.Drawing.Drawing2D.Matrix(); + end; +end; + procedure GraphABCCoordinate.SetOriginX(x: integer); begin SetOrigin(x,OriginY); diff --git a/bin/Lib/PABCRtl.dll b/bin/Lib/PABCRtl.dll index b952fe181..54d1f54e9 100644 Binary files a/bin/Lib/PABCRtl.dll and b/bin/Lib/PABCRtl.dll differ diff --git a/bin/Lib/PABCSystem.pas b/bin/Lib/PABCSystem.pas index f75377895..db1bc19e9 100644 --- a/bin/Lib/PABCSystem.pas +++ b/bin/Lib/PABCSystem.pas @@ -8555,6 +8555,12 @@ begin System.Array.Sort(self,cmp); end; +/// Возвращает индекс последнего элемента массива +function High(self: System.Array); extensionmethod := High(Self); + +/// Возвращает индекс первого элемента массива +function Low(self: System.Array); extensionmethod := Low(Self); + ///-- function CreateSliceFromArrayInternal(Self: array of T; from,step,count: integer): array of T; begin diff --git a/bin/Lng/Rus/InternalErrorReport.dat b/bin/Lng/Rus/InternalErrorReport.dat index 1b8d75396..9e7417c27 100644 --- a/bin/Lng/Rus/InternalErrorReport.dat +++ b/bin/Lng/Rus/InternalErrorReport.dat @@ -11,13 +11,13 @@ EMAIL_ADRESS=Адреса электронной почты: OK_BUTTON=ОК ERROR_SEND_INFO=8LINES Ваша информация об ошибке, произошедшей в компиляторе, поможет нам в процессе разработки. -Если Вы считаете, что в копиляторе произошла ошибка, то Вы можете оставить сообщение на форуме, либо послать сообщение по электронной почте на любой из адресов, расположенных ниже. +Если Вы считаете, что в компиляторе произошла ошибка, то Вы можете оставить сообщение на форуме, либо послать сообщение по электронной почте на любой из адресов, расположенных ниже. Желательно чтобы ваше описание ошибки содержало: 1. Сообщение о ошибке, либо описание неправильных действий компилятора. 2. Описание последовательности действий, которые привели к ошибке. 3. Исходные коды программы, при компиляции которой произошла ошибка. -4. Информация о версии компилятора, платформе, и т.д., которая находится ниже. Скопируйте текст, находящийся ниже, и вставьте в начало сообщения. +4. Информацию о версии компилятора, платформе и т.д., которая находится ниже. Скопируйте текст, находящийся ниже, и вставьте в начало сообщения. %PREFIX%=VPP_IER_INTERNALERRORREPORT_ COMPILER_INTERNAL_ERROR=Внутренняя ошибка компилятора