Explorar o código

Changes from v1.4.07 -> 1.4.08

John Gough %!s(int64=6) %!d(string=hai) anos
pai
achega
0382f48029

+ 11 - 8
gpcp/Browse.cp

@@ -311,7 +311,7 @@ MODULE Browse;
     multiMods : BOOLEAN;
     args, argNo  : INTEGER;
     fileName, modName  : CharOpen;
-    printFNames, doAll, verbatim, verbose, unwind, hexCon, alpha : BOOLEAN;
+    printFNames, doAll, verbatim, verbose, unwind, hexCon, alpha, isHtml : BOOLEAN;
     doJS  : BOOLEAN;
     file  : GPBinFiles.FILE;
     sSym  : INTEGER;
@@ -922,7 +922,7 @@ MODULE Browse;
     GetSym();				(* Get past recSy rAtt	 *)
     IF (sSym = falSy) THEN
       INCL(rec.xAttr, Symbols.isFn);
-      INCL(rec.xAttr, Symbols.noNew);   (* remvove if ctor found *)
+      INCL(rec.xAttr, Symbols.noNew);   (* remove if ctor found  *)
       GetSym();
     ELSIF (sSym = truSy) THEN
       INCL(rec.xAttr, Symbols.fnInf);   (* This is an interface  *)
@@ -1205,7 +1205,7 @@ MODULE Browse;
 (* ============================================ *)
 
   PROCEDURE GetProc() : ProcDesc;
-  (* Procedure  = prcSy Name [String] [trySy] FormalType.  *)
+  (* Procedure  = prcSy Name [String] [truSy] FormalType.  *)
   VAR
     procDesc : ProcDesc;
   BEGIN
@@ -2210,18 +2210,20 @@ END WriteLinefold;
      (* ##### *)
       output.WriteString(")"); 
     END;
-   (* should only apply for html output? *)
-    IF Symbols.isFn IN r.xAttr THEN
+
+   (* should only apply for html output *)
+    IF (Symbols.isFn IN r.xAttr) & isHtml THEN
       output.WriteLinefold(indent);
       output.WriteString(prFx);
       output.WriteComment(MkComment(r.xAttr));
     END;
     
     IF r.methods.list # NIL THEN
-      output.WriteLinefold(indent);
-      IF r.declarer # NIL THEN 
+      IF r.declarer # NIL THEN
+	    output.WriteLinefold(indent);
         output.MethRef(r.declarer.name);
       ELSIF (r.ptrType # NIL) & (r.ptrType.declarer # NIL) THEN
+	    output.WriteLinefold(indent);
         output.MethRef(r.ptrType.declarer.name);
       END;
     END;
@@ -2867,6 +2869,7 @@ BEGIN
     END;
     IF argNo < args THEN ProgArgs.GetArg(argNo,option) ELSE RETURN argNo END;
   END;
+  IF htmlOutput THEN isHtml := TRUE END;
   RETURN argNo;
 END ParseOptions;
 
@@ -2902,7 +2905,7 @@ END ParseOptions;
               GPTextFiles.createFile(fNamePtr^);
           ELSE
             fNamePtr := mkPathName(fNamePtr^);
-          output(FileOutput).file := 
+            output(FileOutput).file := 
               GPTextFiles.createPath(fNamePtr);
           END;
           IF verbose THEN

+ 1 - 1
gpcp/CPascalErrors.cp

@@ -655,7 +655,7 @@ MODULE CPascalErrors;
     | 311: msg := LitValue.strToCharOpen('Access to variable <' 
 		       + s1 + '> will be inefficient');
     | 220,
-      312: msg := LitValue.strToCharOpen("Matches with - " + s1);
+      312: msg := LitValue.strToCharOpen("Also matches with - " + s1);
     | 313: msg := LitValue.strToCharOpen("Bound to - " + s1);
     END;
     IF ~nowarn OR                        (* If warnings are on OR  *)

+ 19 - 0
gpcp/CPascalP.cp

@@ -2636,6 +2636,24 @@ VAR
   PROCEDURE StaticStuff(recT   : Ty.Record;
                         defScp : Sy.Scope;
                         vMod   : INTEGER);  (* vMod ??? *)
+   (* ----------------------------------------- *)
+    PROCEDURE CheckIsConstructor(rec : Ty.Record; prcD : Id.Procs);
+	 (* --------------------- *)
+	  PROCEDURE isConstB() : BOOLEAN;
+      BEGIN
+	    IF ~(nextT.sym = T.identSym) THEN RETURN FALSE END;
+		RETURN NameHash.enterSubStr(nextT.pos, nextT.len) = Bi.constB;
+	  END isConstB;
+	 (* --------------------- *)
+	BEGIN
+	  Get;
+	  IF isConstB() THEN 
+	    Get; (* read past "CONSTRUCTOR" *)
+		prcD.SetKind(Id.ctorP);
+	  ELSE 
+	    prcD.IdError(6);
+	  END;
+	END CheckIsConstructor;
    (* ----------------------------------------- *)
     PROCEDURE StaticProc(rec : Ty.Record; scp : Sy.Scope);
       VAR prcD : Id.Procs;
@@ -2662,6 +2680,7 @@ VAR
       IF prcD.vMod # Sy.prvMode THEN INCL(prcD.pAttr, Id.public) END;
       IF nextT.sym = T.lparenSym THEN
         FormalParameters(prcT, prcD, scp);
+		IF nextT.sym = T.commaSym THEN CheckIsConstructor(rec, prcD) END;
       END;
       prcD.type := prcT;
       Ty.InsertInRec(prcD,rec,FALSE,oId,ok);

+ 53 - 7
gpcp/ClsToType.cp

@@ -152,11 +152,22 @@ MODULE ClsToType;
   END isGenericClass;
 
  (* ------------------------------------------------ *)
-
+ (* This method detects generic types that appear as *)
+ (* byRef values that point to generic types. These  *)
+ (* types have isGenericType false!                  *)
+ (* ------------------------------------------------ *)
   PROCEDURE isGenericType(typ : Sys.Type) : BOOLEAN;
+   (* --------------------------------- *)
+    PROCEDURE hasBackTick(n : RTS.NativeString) : BOOLEAN;
+	BEGIN
+	  RETURN n.Contains(MKSTR("`"));
+	END hasBackTick;
+   (* --------------------------------- *)
   BEGIN 
     IF typ.get_IsArray() THEN 
       RETURN isGenericType(typ.GetElementType());
+    ELSIF typ.get_HasElementType() & hasBackTick(typ.get_Name()) THEN
+	  RETURN TRUE;
     ELSE
       RETURN typ.get_IsGenericType();
     END;
@@ -237,6 +248,7 @@ MODULE ClsToType;
 
   PROCEDURE gpName(typ : Sys.Type) : RTS.NativeString;
     VAR name : RTS.NativeString;
+   (* --------------------------------- *)
    (* ----- Trim the trailing '&' ----- *)
     PROCEDURE trimAmp(n : RTS.NativeString) : RTS.NativeString;
     BEGIN
@@ -291,6 +303,16 @@ MODULE ClsToType;
     Glb.Message(str^ + gpSpce(cls) + "." + gpName(cls));
   END SayWhy;
 
+ (* ------------------------------------------------ *)
+
+  PROCEDURE SayWhyBase(bas : Sys.Type; cls : Sys.Type);
+    VAR str : Glb.CharOpen;
+  BEGIN
+    str := BOX(" Hiding class with generic base type -- ");
+    Glb.Message(str^ + gpSpce(cls) + "." + gpName(cls));
+	Glb.Message(" ... Base type is == " + gpSpce(bas) + "." + gpName(bas));
+  END SayWhyBase;
+
  (* ------------------------------------------------ *)
 
   PROCEDURE getBaseKind(typ : Sys.Type) : INTEGER;
@@ -616,14 +638,25 @@ MODULE ClsToType;
 
   PROCEDURE modeFromMbrAtt(att : SET) : INTEGER;
   BEGIN
-    CASE ORD(att * {0,1,2,5}) OF
+    CASE ORD(att * {0,1,2}) OF
     | 4, 5 : RETURN Sy.protect;
     | 6    : RETURN Sy.pubMode;
-	| 26H  : RETURN Sy.rdoMode; (* Actually InitOnly for static fields *)
     ELSE     RETURN Sy.prvMode;
     END;
   END modeFromMbrAtt;
 
+ (* ------------------------------------------------ *)
+
+  PROCEDURE modeFromFldAtt(att : SET) : INTEGER;
+  BEGIN
+    CASE ORD(att * {0,1,2,5}) OF
+    | 4, 5 : RETURN Sy.protect;
+    | 6    : RETURN Sy.pubMode;
+	| 26H  : RETURN Sy.rdoMode; (* Actually InitOnly for fields *)
+    ELSE     RETURN Sy.prvMode;
+    END;
+  END modeFromFldAtt;
+
  (* ------------------------------------------------ *)
 
   PROCEDURE mkParam(IN nam : ARRAY OF CHAR; 
@@ -695,7 +728,7 @@ MODULE ClsToType;
    (* ------------------------------------ *)
   BEGIN
     bts := BITS(fld.get_Attributes());
-    mod := modeFromMbrAtt(bts);
+    mod := modeFromFldAtt(bts);
     typ := fld.get_FieldType();
     IF isGenericType(typ) THEN RETURN END;
     IF mod > Sy.prvMode THEN
@@ -1086,7 +1119,19 @@ MODULE ClsToType;
     BEGIN
       super := cls.get_BaseType();
       ifArr := cls.GetInterfaces();
-      IF super # NIL THEN rec.baseTp := cpTypeFromCTS(super, spc) END;
+      IF super # NIL THEN 
+	    IF ~super.get_IsGenericType() & isPublicClass(super) THEN
+		  rec.baseTp := cpTypeFromCTS(super, spc);
+        ELSIF Glb.verbose THEN
+		 (* 
+		  * We exclude non-generic types that are 
+		  * instantiated from a generic base type.
+		  * In principal this could be allowed, but
+		  * requires many code changes. (kjg 2019)
+		  *)
+          SayWhyBase(super, cls);
+        END;
+      END;
       IF ifArr # NIL THEN
         FOR index := 0 TO LEN(ifArr) - 1 DO
           ifElm := ifArr[index];
@@ -1103,7 +1148,8 @@ MODULE ClsToType;
   BEGIN
    (*
     *  First we must add resolved base and interface types.
-    *)
+ 	* name := cls.get_Name();
+   *)
     FixBaseAndInterfaces(spc, cls, rec);
 	IF cls.get_IsValueType() THEN INCL(rec.xAttr, Sy.valTp);
 	ELSIF cls.get_IsClass() THEN INCL(rec.xAttr, Sy.clsTp);
@@ -1283,7 +1329,7 @@ MODULE ClsToType;
     name := Nh.charOpenOfHash(spc.hash);
     spc.bloc.SetNameFromHash(spc.hash);
     Glb.BlkIdInit(spc.bloc, aNm, name);
-    IF Glb.superVb THEN Glb.Message("Creating blk - " + name^) END;
+    IF Glb.superVb & (name # NIL) THEN Glb.Message("Creating blk - " + name^) END;
   END MakeBlkId;
 
  (* ------------------------------------------------ *)

+ 2 - 1
gpcp/GPCPcopyright.cp

@@ -56,7 +56,8 @@ MODULE GPCPcopyright;
      (* VERSION    = "1.4.04 of 07 August 2017"; *)
      (* VERSION    = "1.4.05 of 11 October 2017"; *)
      (* VERSION    = "1.4.06 of 18 February 2018"; *)
-        VERSION    = "1.4.07 of 04 March 2018"; 
+     (* VERSION    = "1.4.07 of 04 March 2018"; *)
+        VERSION    = "1.4.08 of 10 April 2019"; 
 	verStr*    = " version " + VERSION;
 
   CONST	prefix     = "#gpcp: ";

+ 8 - 14
gpcp/JavaTarget.cp

@@ -1,16 +1,14 @@
-
 (* ============================================================ *)
-(*  Target is the module which selects the target ClassMaker.   *)
-(*  Copyright (c) John Gough 1999, 2017.                        *)
+(*  Target is the module which selects the target ClassMaker.	*)
+(*  Copyright (c) John Gough 1999, 2017.			*)
 (* ============================================================ *)
 
-MODULE JavaTarget; (* JavaTargetForJVM.cp *)
+MODULE JavaTarget; (* JavaTargetForCLR.cp *)
 
   IMPORT 
         RTS,
-        GPCPcopyright,
-        CompState,
-        AsmUtil,
+	GPCPcopyright,
+	CompState,
         JavaUtil,
         ClassUtil;
 
@@ -18,11 +16,7 @@ MODULE JavaTarget; (* JavaTargetForJVM.cp *)
 
   PROCEDURE NewJavaEmitter*(IN fileName : ARRAY OF CHAR) : JavaUtil.JavaFile;
   BEGIN
-    IF CompState.doAsm5 THEN 
-      IF CompState.verbose THEN CompState.Message("Using ASM emitter") END;
-      RETURN AsmUtil.newAsmEmitter(fileName);
-    ELSIF CompState.doDWC THEN 
-      IF CompState.verbose THEN CompState.Message("Using DWC emitter") END;
+    IF CompState.doDWC THEN 
       RETURN ClassUtil.newClassFile(fileName);
     ELSE 
       THROW( "no jvm emitter chosen" );
@@ -31,8 +25,8 @@ MODULE JavaTarget; (* JavaTargetForJVM.cp *)
 
 (* ============================================================ *)
 BEGIN
-  IF RTS.defaultTarget # "jvm" THEN
-    CompState.Abort("Wrong JavaTarget implementation: Use JavaTargetForCLR.cp");
+  IF RTS.defaultTarget = "jvm" THEN
+    CompState.Abort("Wrong JavaTarget implementation: Use JavaTargetForJVM.cp");
   END;
 END JavaTarget.
 (* ============================================================ *)

+ 240 - 0
gpcp/MkNetDistro.bat

@@ -0,0 +1,240 @@
+
+@echo off
+REM 
+REM ===================================
+REM This batch file creates a new distribution rooted at .\gpcp-NET
+REM The file must be executed from %CROOT%\sources\gpcp
+REM Most of the files are recompiled from the sources of the distribution
+REM rooted at %CROOT% using the binaries in %CROOT%\bin. However some 
+REM files (documentation, examples, .NET symbols files) are copied
+REM from the existing distribution.
+REM ===================================
+REM
+if defined CROOT goto :init
+echo CROOT is not defined, terminating.
+goto :EOF
+
+:init
+echo CROOT = %CROOT%
+setlocal
+set HOME=%CD%
+set SOURCES_GPCP=%CROOT%\sources\gpcp
+set TRGT=%HOME%\gpcp-NET
+REM Check if this is being executed from %CROOT%\sources\gpcp
+if /i %HOME% == %SOURCES_GPCP% goto :clean
+echo Current directory not %SOURCES_GPCP%, terminating
+goto :EOF
+
+:clean
+REM ===================================
+echo Cleaning old gpcp-NET filetree
+REM ===================================
+if exist gpcp-NET rmdir /s /q gpcp-NET 
+
+REM
+REM - Make sure that JavaTarget.cp is the CLR version.
+REM - And make sure that PeTarget.cp is the NET version.
+REM
+copy JavaTargetForCLR.cp JavaTarget.cp
+copy PeTargetForNET.cp PeTarget.cp
+
+mkdir gpcp-NET\bin
+mkdir gpcp-NET\sources
+mkdir gpcp-NET\symfiles
+mkdir gpcp-NET\documentation\Examples
+mkdir gpcp-NET\symfiles\NetSystem
+mkdir gpcp-NET\symfiles\HtmlBrowseFiles
+
+REM ===================================
+echo Building C# library implementations
+REM ===================================
+CD %CROOT%\sources\libs\csharp
+set TOOL="CSC"
+csc /t:library /debug /nologo RTS.cs
+if errorlevel 1 goto :fail
+csc /t:library /debug /nologo GPFiles.cs
+if errorlevel 1 goto :fail
+csc /t:library /r:GPFiles.dll /debug /nologo GPBinFiles.cs
+if errorlevel 1 goto :fail
+csc /t:library /r:GPFiles.dll /debug /nologo GPTextFiles.cs
+if errorlevel 1 goto :fail
+REM ===================================
+echo moving PE files to TRGT\bin
+REM ===================================
+move *.dll %TRGT%\bin
+move *.pdb %TRGT%\bin
+CD %HOME%\libs\csharp
+REM ===================================
+echo compiling MsilAsm 
+REM ===================================
+csc /t:library /debug /nologo MsilAsm.cs
+if errorlevel 1 goto :fail
+move MsilAsm.dll %TRGT%\bin
+move MsilAsm.pdb %TRGT%\bin
+REM
+REM The source of PeToCpsUtils.cp is included.
+REM It is required to allow PeToCps v1.4.06 to be
+REM compiled using the gpcp v1.4.04 executables. 
+REM It is not required when re-compiling with gpcp 1.4.06
+REM
+REM csc /t:library /debug /nologo PeToCpsUtils.cs
+REM PeToCps PeToCpsUtils.dll
+REM move PeToCpsUtils.dll %TRGT%\bin
+REM move PeToCpsUtils.pdb %TRGT%\bin
+REM move PeToCpsUtils_.cps %TRGT%\symfiles
+REM if errorlevel 1 goto :fail
+REM move MsilAsm.dll %TRGT%\bin
+REM move MsilAsm.pdb %TRGT%\bin
+REM 
+REM ===================================
+echo Compiling CP library sources
+REM ===================================
+set TOOL="gpcp"
+CD %CROOT%\sources\libs\cpascal
+%CROOT%\bin\gpcp.exe /special /nowarn ASCII.cp Console.cp CPmain.cp Error.cp GPFiles.cp GPBinFiles.cp GPTextFiles.cp ProgArgs.cp RTS.cp STA.cp StdIn.cp WinMain.cp
+if errorlevel 1 goto :fail
+%CROOT%\bin\gpcp.exe /nowarn /bindir=%TRGT%\bin RealStr.cp StringLib.cp
+if errorlevel 1 goto :fail
+move *.cps %TRGT%\symfiles
+del *.il /q
+
+REM ===================================
+echo NOT Copying the PERWAPI symbol files
+REM  Have to leave this in until PERWAPI is removed from distro
+REM ===================================
+REM CD %CROOT%\symfiles
+REM copy QUT_*.cps %TRGT%\symfiles
+
+REM ===================================
+echo Copying the NetSystem symbol files
+REM ===================================
+CD %CROOT%\symfiles\NetSystem
+copy *.cps %TRGT%\symfiles\NetSystem
+
+REM ===================================
+echo Generating html browse files for NetSystem libraries
+REM ===================================
+CD %TRGT%\symfiles\NetSystem
+echo DST=%TRGT%\symfiles\HtmlBrowseFiles
+%CROOT%\bin\Browse.exe /verbose /html /sort /dst:%TRGT%\symfiles\HtmlBrowseFiles *.cps
+if errorlevel 1 goto :fail
+
+REM ===================================
+echo Generating html browse files for CP libraries
+REM ===================================
+CD %TRGT%\symfiles
+set TOOL="Browse"
+%CROOT%\bin\Browse.exe /html /sort /dst:HtmlBrowseFiles *.cps
+
+REM ===================================
+echo Generating index for html browse files
+REM ===================================
+%CROOT%\bin\MakeIndex.exe /verbose /dst:HtmlBrowseFiles
+
+REM ===================================
+echo Building compiler-tools exes and dlls
+REM ===================================
+CD %HOME%
+set TOOL="CPMake"
+%CROOT%\bin\CPMake.exe /all /bindir=%TRGT%\bin /nowarn gpcp
+if errorlevel 1 goto :fail
+set TOOL="gpcp"
+%CROOT%\bin\gpcp.exe /bindir=%TRGT%\bin /nowarn ModuleHandler.cp SymbolFile.cp CPMake.cp
+if errorlevel 1 goto :fail
+%CROOT%\bin\gpcp.exe /bindir=%TRGT%\bin /nowarn BrowseLookup.cp BrowsePopups.cp Browse.cp
+if errorlevel 1 goto :fail
+%CROOT%\bin\CPMake.exe /all /bindir=%TRGT%\bin /nowarn PeToCps.cp
+if errorlevel 1 goto :fail
+
+REM ===================================
+echo Building MakeIndex.exe
+REM ===================================
+set TOOL="MakeIndex"
+CD %HOME%\MakeIndex
+%CROOT%\bin\CPMake.exe /all /bindir=%TRGT%\bin /nowarn MakeIndex
+if errorlevel 1 goto :fail
+
+REM ===================================
+REM ===================================
+REM  This is only necessary until the new PeToCps
+REM  uses System.Reflection to build symbol files.
+REM ===================================
+REM ===================================
+echo NOT Copying PERWAPI to gpcp-NET\bin
+REM ===================================
+REM CD %CROOT%\bin
+REM copy QUT*.* %TRGT%\bin
+REM ===================================
+
+REM ===================================
+echo Copying the documentation
+REM ===================================
+CD %CROOT%\documentation
+copy *.pdf %TRGT%\documentation
+CD examples
+copy *.* %TRGT%\documentation\Examples
+
+REM ===================================
+echo Getting ready to copy the sources
+REM ===================================
+CD %CROOT%
+mkdir %TRGT%\sources\gpcp\libs\java
+mkdir %TRGT%\sources\gpcp\libs\csharp
+mkdir %TRGT%\sources\gpcp\MakeIndex
+mkdir %TRGT%\sources\libs\java
+mkdir %TRGT%\sources\libs\csharp
+mkdir %TRGT%\sources\libs\cpascal
+
+REM ===================================
+echo Copying GPCP sources
+REM ===================================
+copy sources\gpcp\*.cp %TRGT%\sources\gpcp
+copy sources\gpcp\MkNetDistro.bat %TRGT%\sources\gpcp
+copy sources\gpcp\MakeIndex\*.cp %TRGT%\sources\gpcp\MakeIndex
+copy sources\gpcp\libs\java\MsilAsm.java %TRGT%\sources\gpcp\libs\java
+copy sources\gpcp\libs\csharp\MsilAsm.cs %TRGT%\sources\gpcp\libs\csharp
+
+REM ===================================
+echo Copy helper files for .NET bin directory
+REM ===================================
+copy sources\gpcp\CopyNetLibs.bat %TRGT%\bin
+copy sources\gpcp\_README-NET.txt %TRGT%\bin
+copy sources\gpcp\CopyNetLibs.bat %TRGT%\sources\gpcp
+copy sources\gpcp\_README-NET.txt %TRGT%\sources\gpcp
+
+REM ===================================
+echo Copying CP library sources
+REM ===================================
+copy sources\libs\cpascal\*.cp %TRGT%\sources\libs\cpascal
+copy sources\libs\cpascal\*.bat %TRGT%\sources\libs\cpascal
+
+REM ===================================
+echo Copying C# library sources
+REM ===================================
+copy sources\libs\csharp\*.cs %TRGT%\sources\libs\csharp
+
+REM ===================================
+echo Copying java library sources
+REM ===================================
+copy sources\libs\java\*.* %TRGT%\sources\libs\java
+
+REM ===================================
+echo (No Longer) Copying PERWAPI-project.zip to gpcp-NET\sources
+REM ===================================
+REM copy sources\PERWAPI-project.zip %TRGT%\sources
+
+REM ===================================
+echo BUILD SUCCEDED
+REM ===================================
+CD %HOME%
+goto :EOF
+
+:fail
+REM ===================================
+echo BUILD FAILED IN %TOOL%
+REM ===================================
+CD %HOME%
+REM
+REM End of script
+REM
+

+ 5 - 5
gpcp/PeTarget.cp

@@ -1,7 +1,7 @@
 
 
 (* ============================================================ *)
-(*  Return the PE-file target emitter. .JVM version             *)
+(*  Return the PE-file target emitter. .NET version             *)
 (*  Copyright (c) John Gough 2018.                              *)
 (* ============================================================ *)
 (* ============================================================ *)
@@ -11,7 +11,8 @@ MODULE PeTarget;
   IMPORT 
         RTS,
         GPCPcopyright,
-        MsilUtil;
+        MsilUtil,
+        RefEmitUtil;
 
 (* ============================================================ *)
 (*                       Factory Method                         *)
@@ -20,11 +21,10 @@ MODULE PeTarget;
   PROCEDURE newPeFile*(
      IN nam : ARRAY OF CHAR; isDll : BOOLEAN) : MsilUtil.MsilFile;
   BEGIN
-    IF RTS.defaultTarget = "net" THEN
+    IF RTS.defaultTarget # "net" THEN
       THROW("Wrong version of PeTarget compiled");
-    ELSE
-      THROW("Reflection Emit emitter not available on JVM"); 
     END;
+    RETURN RefEmitUtil.newPeFile(nam, isDll);
   END newPeFile;
 
 (* ============================================================ *)

+ 1 - 1
gpcp/PeToCps.cp

@@ -121,7 +121,7 @@ MODULE PeToCps;
       Glb.AbortMsg("Cannot load mscorlib, use the /mscorlib option instead")
     END;
     Glb.GlobInit(nam, basS);
-    RETURN SysRfl.Assembly.(*ReflectionOnly*)LoadFrom(MKSTR(nam));
+    RETURN SysRfl.Assembly.(* ReflectionOnly *)LoadFrom(MKSTR(nam));
   END GetAssembly;
 
   PROCEDURE GetMscorlib() : SysRfl.Assembly;

+ 1 - 1
gpcp/n2state.cp

@@ -254,7 +254,7 @@ MODULE N2State;
     Console.WriteString(prefix);
     Console.WriteString(sumPre);
     IF flNm = 0 THEN
-      Console.WriteString(" No input files specified");
+      Console.WriteString(" No explicit input files specified");
     ELSE
       Console.WriteInt(flNm,1); 
       Console.WriteString(" input files");

+ 7 - 4
libs/cpascal/RTS.cp

@@ -22,10 +22,13 @@ SYSTEM MODULE RTS;
   TYPE  CharOpen*       = POINTER TO ARRAY OF CHAR;
         CharVector*     = VECTOR OF CHAR;
 
-  TYPE  NativeType*     = POINTER TO ABSTRACT RECORD END;
-        NativeObject*   = POINTER TO EXTENSIBLE RECORD END;  
-        NativeString*   = POINTER TO RECORD END;
-        NativeException*= POINTER TO EXTENSIBLE RECORD END;
+  TYPE  NativeType*     = POINTER TO ABSTRACT RECORD
+                            STATIC PROCEDURE init*() : NativeType, CONSTRUCTOR; END;  
+        NativeObject*   = POINTER TO EXTENSIBLE RECORD 
+                            STATIC PROCEDURE init*() : NativeObject, CONSTRUCTOR; END;  
+        NativeException*= POINTER TO EXTENSIBLE RECORD;
+                            STATIC PROCEDURE init*() : NativeException, CONSTRUCTOR; END;  
+        NativeString*   = POINTER TO RECORD (* No noArg constructor *) END;
 
   VAR   eol- : POINTER TO ARRAY OF CHAR; (* OS-specific end of line string *)
 

+ 4 - 4
libs/csharp/RTS.cs

@@ -530,8 +530,8 @@ public class RTS
 //  (** Decode a CP REAL into an array *)
 //  BEGIN END SRealToStr;
 //
-	// Known in ILASM as [RTS]RTS::SRealToStr
-	public static void SRealToStr(float num,
+	// Known in ILASM as [RTS]RTS::SRealToStrInvar
+	public static void SRealToStrInvar(float num,
 				     char[] str)
 	{
 	 // System.String lls = System.Convert.ToString(num);
@@ -546,8 +546,8 @@ public class RTS
 //  (** Decode a CP REAL into an array *)
 //  BEGIN END SRealToStr;
 //
-	// Known in ILASM as [RTS]RTS::SRealToStr
-	public static void SRealToStr(float num,
+	// Known in ILASM as [RTS]RTS::SRealToStrLocal
+	public static void SRealToStrLocal(float num,
 				     char[] str)
 	{
 	 // System.String lls = System.Convert.ToString(num);