bug fix #979
This commit is contained in:
parent
6b35a65fa4
commit
eb38416402
|
|
@ -15,7 +15,7 @@ internal static class RevisionClass
|
|||
public const string Major = "3";
|
||||
public const string Minor = "4";
|
||||
public const string Build = "0";
|
||||
public const string Revision = "1706";
|
||||
public const string Revision = "1712";
|
||||
|
||||
public const string MainVersion = Major + "." + Minor;
|
||||
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
%MINOR%=4
|
||||
%REVISION%=1706
|
||||
%REVISION%=1712
|
||||
%COREVERSION%=0
|
||||
%MAJOR%=3
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
// This CSharp output file generated by Gardens Point LEX
|
||||
// Version: 1.1.3.301
|
||||
// Machine: DESKTOP-A6LT9RI
|
||||
// DateTime: 12.07.2018 11:09:32
|
||||
// DateTime: 17.07.2018 15:09:39
|
||||
// UserName: ?????????
|
||||
// GPLEX input file <ABCPascal.lex>
|
||||
// GPLEX frame file <embedded resource>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// GPPG version 1.3.6
|
||||
// Machine: DESKTOP-A6LT9RI
|
||||
// DateTime: 12.07.2018 11:09:33
|
||||
// DateTime: 17.07.2018 15:09:39
|
||||
// UserName: ?????????
|
||||
// Input file <ABCPascal.y>
|
||||
|
||||
|
|
|
|||
|
|
@ -200,5 +200,6 @@ script=
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
!define VERSION '3.4.0.1706'
|
||||
!define VERSION '3.4.0.1712'
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
unit MPI;
|
||||
|
||||
|
|
@ -77,7 +77,7 @@ const
|
|||
MPI_GROUP_NULL = 0;
|
||||
MPI_DATATYPE_NULL = 0;
|
||||
MPI_REQUEST_NULL = 0;
|
||||
MPI_BOTTOM = pointer(0);
|
||||
MPI_BOTTOM: pointer = nil;
|
||||
|
||||
MPI_ERRORS_ARE_FATAL = 119;
|
||||
MPI_ERRORS_RETURN = 120;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Игра Жизнь на торе
|
||||
// Игра Жизнь на торе
|
||||
// Оптимизация хешированием по равномерной сетке
|
||||
|
||||
|
||||
|
|
@ -19,8 +19,9 @@ const
|
|||
y0=21;
|
||||
ClearColor=clBlack;
|
||||
FillColor=clLimeGreen;
|
||||
FiledColor=RGB(0,40,0);
|
||||
FiledColor2=RGB(0,70,0);{}
|
||||
var
|
||||
FiledColor := RGB(0,40,0);
|
||||
FiledColor2 := RGB(0,70,0);{}
|
||||
{ClearColor=clWhite;
|
||||
FillColor=clBlack;
|
||||
FiledColor=clLightGray;
|
||||
|
|
|
|||
|
|
@ -80,12 +80,12 @@ function operator+(p1, p2: Point3D): Point3D; extensionmethod := p3d(p1.X + p2.X
|
|||
function operator-(v: Vector3D): Vector3D; extensionmethod := v3d(-v.x,-v.y,-v.z);
|
||||
|
||||
|
||||
const
|
||||
OrtX = V3D(1, 0, 0);
|
||||
OrtY = V3D(0, 1, 0);
|
||||
OrtZ = V3D(0, 0, 1);
|
||||
Origin: Point3D = P3D(0, 0, 0);
|
||||
EmptyColor = ARGB(0, 0, 0, 0);
|
||||
var
|
||||
OrtX := V3D(1, 0, 0);
|
||||
OrtY := V3D(0, 1, 0);
|
||||
OrtZ := V3D(0, 0, 1);
|
||||
Origin: Point3D := P3D(0, 0, 0);
|
||||
EmptyColor := ARGB(0, 0, 0, 0);
|
||||
|
||||
function ChangeOpacity(Self: GColor; value: integer); extensionmethod := ARGB(value, Self.R, Self.G, Self.B);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
const a = Sin(0);
|
||||
function f := 666;
|
||||
|
||||
const a = f();
|
||||
|
||||
begin
|
||||
end.
|
||||
|
|
@ -13628,7 +13628,15 @@ namespace PascalABCCompiler.TreeConverter
|
|||
private constant_node convert_strong_to_constant_node(SyntaxTree.expression expr)
|
||||
{
|
||||
expression_node exp = convert_strong(expr);
|
||||
return convert_strong_to_constant_node(exp, exp.type);
|
||||
var is_const_section = (expr.Parent != null && (expr.Parent is const_definition));
|
||||
|
||||
var is_userdefined = false;
|
||||
var cnf = exp as common_namespace_function_call;
|
||||
if (cnf != null)
|
||||
{
|
||||
is_userdefined = ! (cnf.function_node.namespace_node.namespace_name.Equals("PABCSystem") || cnf.function_node.namespace_node.namespace_name.Equals("PABCSystem_implementation______"));
|
||||
}
|
||||
return convert_strong_to_constant_node(exp, exp.type, is_const_section && is_userdefined);
|
||||
}
|
||||
|
||||
public expression_node convert_strong_to_constant_or_function_call_for_varinit(expression_node exp)
|
||||
|
|
@ -13737,7 +13745,17 @@ namespace PascalABCCompiler.TreeConverter
|
|||
|
||||
private constant_node convert_strong_to_constant_node(SyntaxTree.expression expr, type_node tn)
|
||||
{
|
||||
return convert_strong_to_constant_node(convert_strong(expr), tn);
|
||||
var exp = convert_strong(expr);
|
||||
var is_const_section = (expr.Parent != null && (expr.Parent is const_definition));
|
||||
|
||||
var is_userdefined = false;
|
||||
var cnf = exp as common_namespace_function_call;
|
||||
if (cnf != null)
|
||||
{
|
||||
is_userdefined = !(cnf.function_node.namespace_node.namespace_name.Equals("PABCSystem") || cnf.function_node.namespace_node.namespace_name.Equals("PABCSystem_implementation______"));
|
||||
}
|
||||
|
||||
return convert_strong_to_constant_node(exp, tn, is_const_section && is_userdefined);
|
||||
}
|
||||
|
||||
private void check_set_for_constant(common_namespace_function_call cnfc)
|
||||
|
|
@ -13763,7 +13781,7 @@ namespace PascalABCCompiler.TreeConverter
|
|||
if (!(en is constant_node /*|| en is statements_expression_node*/)) AddError(en.location, "CONSTANT_EXPRESSION_EXPECTED");
|
||||
}
|
||||
|
||||
private constant_node convert_strong_to_constant_node(expression_node expr, type_node tn)
|
||||
private constant_node convert_strong_to_constant_node(expression_node expr, type_node tn, bool is_const_section_and_userfuncall = false)
|
||||
{
|
||||
location loc = expr.location;
|
||||
constant_node constant = null;
|
||||
|
|
@ -13798,13 +13816,15 @@ namespace PascalABCCompiler.TreeConverter
|
|||
}
|
||||
constant = new common_namespace_function_call_as_constant(cnfc, loc);
|
||||
}
|
||||
/*else if (expr is basic_function_call || expr is common_namespace_function_call) // Ниже вроде есть закомментированный код, делающий это
|
||||
else if (is_const_section_and_userfuncall && (expr is basic_function_call || expr is common_namespace_function_call)) // только в разделе const
|
||||
{
|
||||
AddError(loc, "CONSTANT_EXPRESSION_EXPECTED");
|
||||
}*/
|
||||
}
|
||||
else if (expr is common_namespace_function_call)
|
||||
{
|
||||
common_namespace_function_call cnfc=expr as common_namespace_function_call;
|
||||
foreach (expression_node el in cnfc.parameters)
|
||||
convert_strong_to_constant_node(el, el.type);
|
||||
//if (cnfc.function_node.namespace_node == context.converted_namespace)
|
||||
// AddError(loc, "CONSTANT_EXPRESSION_EXPECTED");
|
||||
// throw new ConstantExpressionExpected(loc);
|
||||
|
|
|
|||
|
|
@ -80,12 +80,12 @@ function operator+(p1, p2: Point3D): Point3D; extensionmethod := p3d(p1.X + p2.X
|
|||
function operator-(v: Vector3D): Vector3D; extensionmethod := v3d(-v.x,-v.y,-v.z);
|
||||
|
||||
|
||||
const
|
||||
OrtX = V3D(1, 0, 0);
|
||||
OrtY = V3D(0, 1, 0);
|
||||
OrtZ = V3D(0, 0, 1);
|
||||
Origin: Point3D = P3D(0, 0, 0);
|
||||
EmptyColor = ARGB(0, 0, 0, 0);
|
||||
var
|
||||
OrtX := V3D(1, 0, 0);
|
||||
OrtY := V3D(0, 1, 0);
|
||||
OrtZ := V3D(0, 0, 1);
|
||||
Origin: Point3D := P3D(0, 0, 0);
|
||||
EmptyColor := ARGB(0, 0, 0, 0);
|
||||
|
||||
function ChangeOpacity(Self: GColor; value: integer); extensionmethod := ARGB(value, Self.R, Self.G, Self.B);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
unit MPI;
|
||||
|
||||
|
|
@ -77,7 +77,7 @@ const
|
|||
MPI_GROUP_NULL = 0;
|
||||
MPI_DATATYPE_NULL = 0;
|
||||
MPI_REQUEST_NULL = 0;
|
||||
MPI_BOTTOM = pointer(0);
|
||||
MPI_BOTTOM: pointer = nil;
|
||||
|
||||
MPI_ERRORS_ARE_FATAL = 119;
|
||||
MPI_ERRORS_RETURN = 120;
|
||||
|
|
|
|||
Loading…
Reference in a new issue