pabcnetcclear - /Version:

dotnet5macos; // PVS 01/2022
This commit is contained in:
Mikhalkovich Stanislav 2022-01-27 20:27:40 +03:00
parent 3b8fa5ff34
commit 8308779cfe
10 changed files with 4808 additions and 2326 deletions

View file

@ -15,7 +15,7 @@ internal static class RevisionClass
public const string Major = "3";
public const string Minor = "8";
public const string Build = "2";
public const string Revision = "3061";
public const string Revision = "3063";
public const string MainVersion = Major + "." + Minor;
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;

View file

@ -1,4 +1,4 @@
%MINOR%=8
%REVISION%=3061
%REVISION%=3063
%COREVERSION%=2
%MAJOR%=3

View file

@ -458,7 +458,13 @@ namespace PascalABCCompiler.NETGenerator
bool IsDotnet5()
{
return comp_opt.platformtarget == CompilerOptions.PlatformTarget.dotnet5win || comp_opt.platformtarget == CompilerOptions.PlatformTarget.dotnet5linux || comp_opt.platformtarget == CompilerOptions.PlatformTarget.dotnet5linux;
return
comp_opt.platformtarget ==
CompilerOptions.PlatformTarget.dotnet5win ||
comp_opt.platformtarget ==
CompilerOptions.PlatformTarget.dotnet5linux ||
comp_opt.platformtarget ==
CompilerOptions.PlatformTarget.dotnet5macos; // PVS 01/2022
}
private void BuildDotnet5(string orig_dir, string dir, string publish_dir)

View file

@ -1 +1 @@
3.8.2.3061
3.8.2.3063

View file

@ -1 +1 @@
!define VERSION '3.8.2.3061'
!define VERSION '3.8.2.3063'

View file

@ -27,7 +27,7 @@ namespace PascalABCCompiler.SyntaxTree
public override string ToString()
{
string typepart = "";
if (SK == SymKind.var || SK == SymKind.field || SK == SymKind.field || SK == SymKind.param)
if (SK == SymKind.var || SK == SymKind.field || SK == SymKind.param)
typepart = ": " + (Td == null ? "NOTYPE" : Td.ToString());
typepart = typepart.Replace("PascalABCCompiler.SyntaxTree.", "");
var attrstr = Attr != 0 ? "[" + Attr.ToString() + "]" : "";

View file

@ -1077,6 +1077,9 @@ type
public static property DEVICE_SUPPORTED_REGISTER_ALLOCATIONS_ARM: DeviceInfo read new DeviceInfo($41EB);
public static property DEVICE_CONTROLLED_TERMINATION_CAPABILITIES_ARM: DeviceInfo read new DeviceInfo($41EE);
public static property DEVICE_CXX_FOR_OPENCL_NUMERIC_VERSION_EXT: DeviceInfo read new DeviceInfo($4230);
public static property DEVICE_SINGLE_FP_ATOMIC_CAPABILITIES_EXT: DeviceInfo read new DeviceInfo($4231);
public static property DEVICE_DOUBLE_FP_ATOMIC_CAPABILITIES_EXT: DeviceInfo read new DeviceInfo($4232);
public static property DEVICE_HALF_FP_ATOMIC_CAPABILITIES_EXT: DeviceInfo read new DeviceInfo($4233);
public static property DEVICE_IP_VERSION_INTEL: DeviceInfo read new DeviceInfo($4250);
public static property DEVICE_ID_INTEL: DeviceInfo read new DeviceInfo($4251);
public static property DEVICE_NUM_SLICES_INTEL: DeviceInfo read new DeviceInfo($4252);
@ -1279,6 +1282,9 @@ type
if self.val = UInt32($41EB) then Result := 'DEVICE_SUPPORTED_REGISTER_ALLOCATIONS_ARM' else
if self.val = UInt32($41EE) then Result := 'DEVICE_CONTROLLED_TERMINATION_CAPABILITIES_ARM' else
if self.val = UInt32($4230) then Result := 'DEVICE_CXX_FOR_OPENCL_NUMERIC_VERSION_EXT' else
if self.val = UInt32($4231) then Result := 'DEVICE_SINGLE_FP_ATOMIC_CAPABILITIES_EXT' else
if self.val = UInt32($4232) then Result := 'DEVICE_DOUBLE_FP_ATOMIC_CAPABILITIES_EXT' else
if self.val = UInt32($4233) then Result := 'DEVICE_HALF_FP_ATOMIC_CAPABILITIES_EXT' else
if self.val = UInt32($4250) then Result := 'DEVICE_IP_VERSION_INTEL' else
if self.val = UInt32($4251) then Result := 'DEVICE_ID_INTEL' else
if self.val = UInt32($4252) then Result := 'DEVICE_NUM_SLICES_INTEL' else
@ -6844,38 +6850,46 @@ type
external 'opencl.dll' name 'clGetDeviceInfo';
public [MethodImpl(MethodImplOptions.AggressiveInlining)] static function GetDeviceInfo(device: cl_device_id; param_name: DeviceInfo; param_value_size: UIntPtr; var param_value: cl_platform_id; param_value_size_ret: IntPtr): ErrorCode :=
z_GetDeviceInfo_ovr_23(device, param_name, param_value_size, param_value, param_value_size_ret);
private static function z_GetDeviceInfo_ovr_24(device: cl_device_id; param_name: DeviceInfo; param_value_size: UIntPtr; var param_value: DevicePartitionProperty; var param_value_size_ret: UIntPtr): ErrorCode;
private static function z_GetDeviceInfo_ovr_24(device: cl_device_id; param_name: DeviceInfo; param_value_size: UIntPtr; var param_value: cl_device_id; var param_value_size_ret: UIntPtr): ErrorCode;
external 'opencl.dll' name 'clGetDeviceInfo';
public [MethodImpl(MethodImplOptions.AggressiveInlining)] static function GetDeviceInfo(device: cl_device_id; param_name: DeviceInfo; param_value_size: UIntPtr; var param_value: cl_device_id; var param_value_size_ret: UIntPtr): ErrorCode :=
z_GetDeviceInfo_ovr_24(device, param_name, param_value_size, param_value, param_value_size_ret);
private static function z_GetDeviceInfo_ovr_25(device: cl_device_id; param_name: DeviceInfo; param_value_size: UIntPtr; var param_value: cl_device_id; param_value_size_ret: IntPtr): ErrorCode;
external 'opencl.dll' name 'clGetDeviceInfo';
public [MethodImpl(MethodImplOptions.AggressiveInlining)] static function GetDeviceInfo(device: cl_device_id; param_name: DeviceInfo; param_value_size: UIntPtr; var param_value: cl_device_id; param_value_size_ret: IntPtr): ErrorCode :=
z_GetDeviceInfo_ovr_25(device, param_name, param_value_size, param_value, param_value_size_ret);
private static function z_GetDeviceInfo_ovr_26(device: cl_device_id; param_name: DeviceInfo; param_value_size: UIntPtr; var param_value: DevicePartitionProperty; var param_value_size_ret: UIntPtr): ErrorCode;
external 'opencl.dll' name 'clGetDeviceInfo';
public [MethodImpl(MethodImplOptions.AggressiveInlining)] static function GetDeviceInfo(device: cl_device_id; param_name: DeviceInfo; param_value_size: UIntPtr; var param_value: DevicePartitionProperty; var param_value_size_ret: UIntPtr): ErrorCode :=
z_GetDeviceInfo_ovr_24(device, param_name, param_value_size, param_value, param_value_size_ret);
private static function z_GetDeviceInfo_ovr_25(device: cl_device_id; param_name: DeviceInfo; param_value_size: UIntPtr; var param_value: DevicePartitionProperty; param_value_size_ret: IntPtr): ErrorCode;
z_GetDeviceInfo_ovr_26(device, param_name, param_value_size, param_value, param_value_size_ret);
private static function z_GetDeviceInfo_ovr_27(device: cl_device_id; param_name: DeviceInfo; param_value_size: UIntPtr; var param_value: DevicePartitionProperty; param_value_size_ret: IntPtr): ErrorCode;
external 'opencl.dll' name 'clGetDeviceInfo';
public [MethodImpl(MethodImplOptions.AggressiveInlining)] static function GetDeviceInfo(device: cl_device_id; param_name: DeviceInfo; param_value_size: UIntPtr; var param_value: DevicePartitionProperty; param_value_size_ret: IntPtr): ErrorCode :=
z_GetDeviceInfo_ovr_25(device, param_name, param_value_size, param_value, param_value_size_ret);
private static function z_GetDeviceInfo_ovr_26(device: cl_device_id; param_name: DeviceInfo; param_value_size: UIntPtr; var param_value: DeviceAffinityDomain; var param_value_size_ret: UIntPtr): ErrorCode;
z_GetDeviceInfo_ovr_27(device, param_name, param_value_size, param_value, param_value_size_ret);
private static function z_GetDeviceInfo_ovr_28(device: cl_device_id; param_name: DeviceInfo; param_value_size: UIntPtr; var param_value: DeviceAffinityDomain; var param_value_size_ret: UIntPtr): ErrorCode;
external 'opencl.dll' name 'clGetDeviceInfo';
public [MethodImpl(MethodImplOptions.AggressiveInlining)] static function GetDeviceInfo(device: cl_device_id; param_name: DeviceInfo; param_value_size: UIntPtr; var param_value: DeviceAffinityDomain; var param_value_size_ret: UIntPtr): ErrorCode :=
z_GetDeviceInfo_ovr_26(device, param_name, param_value_size, param_value, param_value_size_ret);
private static function z_GetDeviceInfo_ovr_27(device: cl_device_id; param_name: DeviceInfo; param_value_size: UIntPtr; var param_value: DeviceAffinityDomain; param_value_size_ret: IntPtr): ErrorCode;
z_GetDeviceInfo_ovr_28(device, param_name, param_value_size, param_value, param_value_size_ret);
private static function z_GetDeviceInfo_ovr_29(device: cl_device_id; param_name: DeviceInfo; param_value_size: UIntPtr; var param_value: DeviceAffinityDomain; param_value_size_ret: IntPtr): ErrorCode;
external 'opencl.dll' name 'clGetDeviceInfo';
public [MethodImpl(MethodImplOptions.AggressiveInlining)] static function GetDeviceInfo(device: cl_device_id; param_name: DeviceInfo; param_value_size: UIntPtr; var param_value: DeviceAffinityDomain; param_value_size_ret: IntPtr): ErrorCode :=
z_GetDeviceInfo_ovr_27(device, param_name, param_value_size, param_value, param_value_size_ret);
private static function z_GetDeviceInfo_ovr_28(device: cl_device_id; param_name: DeviceInfo; param_value_size: UIntPtr; var param_value: DeviceSVMCapabilities; var param_value_size_ret: UIntPtr): ErrorCode;
z_GetDeviceInfo_ovr_29(device, param_name, param_value_size, param_value, param_value_size_ret);
private static function z_GetDeviceInfo_ovr_30(device: cl_device_id; param_name: DeviceInfo; param_value_size: UIntPtr; var param_value: DeviceSVMCapabilities; var param_value_size_ret: UIntPtr): ErrorCode;
external 'opencl.dll' name 'clGetDeviceInfo';
public [MethodImpl(MethodImplOptions.AggressiveInlining)] static function GetDeviceInfo(device: cl_device_id; param_name: DeviceInfo; param_value_size: UIntPtr; var param_value: DeviceSVMCapabilities; var param_value_size_ret: UIntPtr): ErrorCode :=
z_GetDeviceInfo_ovr_28(device, param_name, param_value_size, param_value, param_value_size_ret);
private static function z_GetDeviceInfo_ovr_29(device: cl_device_id; param_name: DeviceInfo; param_value_size: UIntPtr; var param_value: DeviceSVMCapabilities; param_value_size_ret: IntPtr): ErrorCode;
z_GetDeviceInfo_ovr_30(device, param_name, param_value_size, param_value, param_value_size_ret);
private static function z_GetDeviceInfo_ovr_31(device: cl_device_id; param_name: DeviceInfo; param_value_size: UIntPtr; var param_value: DeviceSVMCapabilities; param_value_size_ret: IntPtr): ErrorCode;
external 'opencl.dll' name 'clGetDeviceInfo';
public [MethodImpl(MethodImplOptions.AggressiveInlining)] static function GetDeviceInfo(device: cl_device_id; param_name: DeviceInfo; param_value_size: UIntPtr; var param_value: DeviceSVMCapabilities; param_value_size_ret: IntPtr): ErrorCode :=
z_GetDeviceInfo_ovr_29(device, param_name, param_value_size, param_value, param_value_size_ret);
private static function z_GetDeviceInfo_ovr_30(device: cl_device_id; param_name: DeviceInfo; param_value_size: UIntPtr; param_value: pointer; var param_value_size_ret: UIntPtr): ErrorCode;
z_GetDeviceInfo_ovr_31(device, param_name, param_value_size, param_value, param_value_size_ret);
private static function z_GetDeviceInfo_ovr_32(device: cl_device_id; param_name: DeviceInfo; param_value_size: UIntPtr; param_value: pointer; var param_value_size_ret: UIntPtr): ErrorCode;
external 'opencl.dll' name 'clGetDeviceInfo';
public [MethodImpl(MethodImplOptions.AggressiveInlining)] static function GetDeviceInfo(device: cl_device_id; param_name: DeviceInfo; param_value_size: UIntPtr; param_value: pointer; var param_value_size_ret: UIntPtr): ErrorCode :=
z_GetDeviceInfo_ovr_30(device, param_name, param_value_size, param_value, param_value_size_ret);
private static function z_GetDeviceInfo_ovr_31(device: cl_device_id; param_name: DeviceInfo; param_value_size: UIntPtr; param_value: pointer; param_value_size_ret: IntPtr): ErrorCode;
z_GetDeviceInfo_ovr_32(device, param_name, param_value_size, param_value, param_value_size_ret);
private static function z_GetDeviceInfo_ovr_33(device: cl_device_id; param_name: DeviceInfo; param_value_size: UIntPtr; param_value: pointer; param_value_size_ret: IntPtr): ErrorCode;
external 'opencl.dll' name 'clGetDeviceInfo';
public [MethodImpl(MethodImplOptions.AggressiveInlining)] static function GetDeviceInfo(device: cl_device_id; param_name: DeviceInfo; param_value_size: UIntPtr; param_value: pointer; param_value_size_ret: IntPtr): ErrorCode :=
z_GetDeviceInfo_ovr_31(device, param_name, param_value_size, param_value, param_value_size_ret);
z_GetDeviceInfo_ovr_33(device, param_name, param_value_size, param_value, param_value_size_ret);
// added in cl1.0
private static function z_GetEventInfo_ovr_0(&event: cl_event; param_name: EventInfo; param_value_size: UIntPtr; var param_value: cl_command_queue; var param_value_size_ret: UIntPtr): ErrorCode;

File diff suppressed because it is too large Load diff

View file

@ -119,11 +119,13 @@ namespace PascalABCCompiler
Console.WriteLine(" /Define:<name>");
Console.WriteLine(" /Output:<[path\\]name>");
Console.WriteLine(" /SearchDir:<path>");
Console.WriteLine(" /Version:");
Console.WriteLine();
Console.WriteLine("/Help show this message");
Console.WriteLine("/Output:<[path\\]name> compile into an executable called \"name\" and save it in \"path\" directory");
Console.WriteLine("/Debug:0 generates code with all .NET optimizations");
Console.WriteLine("/SearchDir:<path> add \"path\" to list of standart unit search directories. Last added paths would be searched first");
Console.WriteLine("/Version: outputs PascalABC.NET version");
}
public static int Main(string[] args)
@ -133,6 +135,7 @@ namespace PascalABCCompiler
// Пока сделаю только директивы /Help /H /? и /Debug=0(1)
// Имя директивы - это одно слово. Равенства может не быть - тогда value директивы равно null
// Вычленяем первое равенство и делим директиву: до него - name, после него - value. Если name или value - пустые строки, то ошибка
// 2022 г. К сожалению, директива с / конкурирует с именами каталогов в Linux. Надо писать новый консольный компилятор
DateTime ldt = DateTime.Now;
PascalABCCompiler.StringResourcesLanguage.LoadDefaultConfig();
@ -183,6 +186,10 @@ namespace PascalABCCompiler
case "?":
OutputHelp();
return 0;
case "version":
Console.WriteLine(PascalABCCompiler.Compiler.Version);
return 0;
default:
Console.WriteLine("Filename is absent. Nothing to compile");
return 4;

View file

@ -36,8 +36,7 @@
<RemoteDebugMachine>
</RemoteDebugMachine>
<StartAction>Project</StartAction>
<StartArguments>
</StartArguments>
<StartArguments>/version:</StartArguments>
<StartPage>
</StartPage>
<StartProgram>