public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/modula-2] gm2-libs-min/M2RTS.mod populated with stub support procedures.
@ 2022-07-11 14:06 Gaius Mulley
  0 siblings, 0 replies; only message in thread
From: Gaius Mulley @ 2022-07-11 14:06 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:90b9a1e44737f0f61687c1d1b52692ef4bc7503a

commit 90b9a1e44737f0f61687c1d1b52692ef4bc7503a
Author: Gaius Mulley <gaius.mulley@southwales.ac.uk>
Date:   Mon Jul 11 15:05:54 2022 +0100

    gm2-libs-min/M2RTS.mod populated with stub support procedures.
    
    gcc/m2/ChangeLog:
    
            * gm2-compiler/M2MetaError.def (MetaErrorNT0): New procedure.
            (MetaErrorNT1) Renamed parameters.  (MetaErrorNT2) Renamed
            parameters.
            * gm2-compiler/M2MetaError.mod (MetaErrorNT0): New procedure
            implemented.  (MetaErrorNT1) Renamed parameters.  (MetaErrorNT2)
            Renamed parameters.
            * gm2-compiler/M2Quads.mod (BuildAdrFunction): Use MetaErrorNT0.
            (GetQualidentImport) Correct format specifier.
            * gm2-libs-min/M2RTS.mod (RequestDependant): New procedure stub
            added.  (ConstructModules) New procedure stub added.
            (Deconstructmodules) New procedure stub added.
    
    Signed-off-by: Gaius Mulley <gaius.mulley@southwales.ac.uk>

Diff:
---
 gcc/m2/gm2-compiler/M2MetaError.def |  7 ++++---
 gcc/m2/gm2-compiler/M2MetaError.mod | 31 ++++++++++++++++++++++---------
 gcc/m2/gm2-compiler/M2Quads.mod     | 14 +++++++-------
 gcc/m2/gm2-libs-min/M2RTS.mod       | 17 +++++++++++++++++
 4 files changed, 50 insertions(+), 19 deletions(-)

diff --git a/gcc/m2/gm2-compiler/M2MetaError.def b/gcc/m2/gm2-compiler/M2MetaError.def
index 964a1cf0cdf..c6ad21d205b 100644
--- a/gcc/m2/gm2-compiler/M2MetaError.def
+++ b/gcc/m2/gm2-compiler/M2MetaError.def
@@ -45,7 +45,7 @@ EXPORT QUALIFIED MetaError0, MetaError1, MetaError2, MetaError3, MetaError4,
                  MetaErrorString4,
                  MetaErrorStringT0, MetaErrorStringT1, MetaErrorStringT2,
                  MetaErrorStringT3, MetaErrorStringT4,
-                 MetaErrorN1, MetaErrorN2, MetaErrorNT1, MetaErrorNT2,
+                 MetaErrorN1, MetaErrorN2, MetaErrorNT0, MetaErrorNT1, MetaErrorNT2,
                  MetaString0, MetaString1, MetaString2, MetaString3, MetaString4 ;
 
 
@@ -172,8 +172,9 @@ PROCEDURE MetaErrorStringT4 (tok: CARDINAL; m: String; s1, s2, s3, s4: CARDINAL)
 
 PROCEDURE MetaErrorN1 (m: ARRAY OF CHAR; n: Name) ;
 PROCEDURE MetaErrorN2 (m: ARRAY OF CHAR; n1, n2: Name) ;
-PROCEDURE MetaErrorNT1 (tok: CARDINAL; m: ARRAY OF CHAR; n: Name) ;
-PROCEDURE MetaErrorNT2 (tok: CARDINAL; m: ARRAY OF CHAR; n1, n2: Name) ;
+PROCEDURE MetaErrorNT0 (tok: CARDINAL; format: ARRAY OF CHAR) ;
+PROCEDURE MetaErrorNT1 (tok: CARDINAL; format: ARRAY OF CHAR; name: Name) ;
+PROCEDURE MetaErrorNT2 (tok: CARDINAL; format: ARRAY OF CHAR; name1, name2: Name) ;
 
 PROCEDURE MetaString0 (m: String) : String ;
 PROCEDURE MetaString1 (m: String; s: CARDINAL) : String ;
diff --git a/gcc/m2/gm2-compiler/M2MetaError.mod b/gcc/m2/gm2-compiler/M2MetaError.mod
index f12de430ef5..11e943e0ef0 100644
--- a/gcc/m2/gm2-compiler/M2MetaError.mod
+++ b/gcc/m2/gm2-compiler/M2MetaError.mod
@@ -2314,19 +2314,30 @@ END translate ;
 
 
 (*
-   MetaErrorNT1 -
+   MetaErrorNT0 - generate an error message at tok using format.
 *)
 
-PROCEDURE MetaErrorNT1 (tok: CARDINAL; m: ARRAY OF CHAR; n: Name) ;
+PROCEDURE MetaErrorNT0 (tok: CARDINAL; format: ARRAY OF CHAR) ;
+BEGIN
+   MetaErrorStringT0 (tok, InitString (format))
+END MetaErrorNT0 ;
+
+
+(*
+   MetaErrorNT1 - generate an error message at tok using format and name.
+                  The format should contain %a for name substitution.
+*)
+
+PROCEDURE MetaErrorNT1 (tok: CARDINAL; format: ARRAY OF CHAR; name: Name) ;
 VAR
    i  : INTEGER ;
    s,
    fmt: String ;
 BEGIN
    i := 0 ;
-   fmt := InitString (m) ;
+   fmt := InitString (format) ;
    s := InitString ('') ;
-   s := translate (fmt, s, i, n) ;
+   s := translate (fmt, s, i, name) ;
    MetaErrorStringT0 (tok, s) ;
    fmt := KillString (fmt) ;
 END MetaErrorNT1 ;
@@ -2343,20 +2354,22 @@ END MetaErrorN1 ;
 
 
 (*
-   MetaErrorNT2 -
+   MetaErrorNT1 - generate an error message at tok using format, name1
+                  and name2.  The format should contain two occurances of %a
+                  for name substitution.
 *)
 
-PROCEDURE MetaErrorNT2 (tok: CARDINAL; m: ARRAY OF CHAR; n1, n2: Name) ;
+PROCEDURE MetaErrorNT2 (tok: CARDINAL; format: ARRAY OF CHAR; name1, name2: Name) ;
 VAR
    i  : INTEGER ;
    s,
    fmt: String ;
 BEGIN
    i := 0 ;
-   fmt := InitString (m) ;
+   fmt := InitString (format) ;
    s := InitString ('') ;
-   s := translate (fmt, s, i, n1) ;
-   s := translate (fmt, s, i, n2) ;
+   s := translate (fmt, s, i, name1) ;
+   s := translate (fmt, s, i, name2) ;
    MetaErrorStringT0 (tok, s) ;
    fmt := KillString (fmt) ;
 END MetaErrorNT2 ;
diff --git a/gcc/m2/gm2-compiler/M2Quads.mod b/gcc/m2/gm2-compiler/M2Quads.mod
index ef95851ab43..be40d056b90 100644
--- a/gcc/m2/gm2-compiler/M2Quads.mod
+++ b/gcc/m2/gm2-compiler/M2Quads.mod
@@ -37,7 +37,7 @@ FROM M2MetaError IMPORT MetaError0, MetaError1, MetaError2, MetaError3,
                         MetaErrorStringT0, MetaErrorStringT1,
                         MetaErrorString1, MetaErrorString2,
                         MetaErrorN1, MetaErrorN2,
-                        MetaErrorNT1, MetaErrorNT2 ;
+                        MetaErrorNT0, MetaErrorNT1, MetaErrorNT2 ;
 
 FROM DynamicStrings IMPORT String, string, InitString, KillString,
                            ConCat, InitStringCharStar, Dup, Mark,
@@ -8013,14 +8013,14 @@ BEGIN
    IF ModSym=NulSym
    THEN
       MetaErrorNT2 (tokno,
-                    'module {%E%a} cannot be found and is needed to import {%E%a}', module, n) ;
+                    'module {%a} cannot be found and is needed to import {%a}', module, n) ;
       FlushErrors ;
       RETURN NulSym
    END ;
    Assert(IsDefImp(ModSym)) ;
    IF (GetExported (tokno, ModSym, n)=NulSym) OR IsUnknown (GetExported (tokno, ModSym, n))
    THEN
-      MetaErrorN2 ('module {%1a} does not export procedure {%2a} which is a necessary component of the runtime system, hint check the path and library/language variant',
+      MetaErrorN2 ('module {%a} does not export procedure {%a} which is a necessary component of the runtime system, hint check the path and library/language variant',
                    module, n) ;
       FlushErrors ;
       RETURN NulSym
@@ -9744,8 +9744,8 @@ BEGIN
    combinedTok := MakeVirtualTok (procTok, procTok, endtok) ;
    IF noOfParameters # 1
    THEN
-      MetaErrorNT1 (combinedTok,
-                    'SYSTEM procedure ADR expects 1 parameter', procTok) ;
+      MetaErrorNT0 (combinedTok,
+                    'SYSTEM procedure ADR expects 1 parameter') ;
       PopN (noOfParameters + 1) ;    (* destroy the arguments and function *)
       PushTF (Nil, Address)
    ELSIF IsConstString (OperandT (1))
@@ -9756,8 +9756,8 @@ BEGIN
       PushTFtok (returnVar, GetSType (returnVar), combinedTok)
    ELSIF (NOT IsVar(OperandT(1))) AND (NOT IsProcedure(OperandT(1)))
    THEN
-      MetaErrorNT1 (combinedTok,
-                    'SYSTEM procedure ADR expects a variable, procedure or a constant string as its parameter', procTok) ;
+      MetaErrorNT0 (combinedTok,
+                    'SYSTEM procedure ADR expects a variable, procedure or a constant string as its parameter') ;
       PopN (noOfParameters + 1) ;    (* destroy the arguments and function *)
       PushTFtok (Nil, Address, combinedTok)
    ELSIF IsProcedure (OperandT (1))
diff --git a/gcc/m2/gm2-libs-min/M2RTS.mod b/gcc/m2/gm2-libs-min/M2RTS.mod
index 1d223740048..b3787e785c0 100644
--- a/gcc/m2/gm2-libs-min/M2RTS.mod
+++ b/gcc/m2/gm2-libs-min/M2RTS.mod
@@ -53,4 +53,21 @@ BEGIN
 END NoException ;
 
 
+PROCEDURE RequestDependant (modulename, dependantmodule: ADDRESS) ;
+BEGIN
+END RequestDependant ;
+
+
+PROCEDURE ConstructModules (applicationmodule: ADDRESS;
+                            argc: INTEGER; argv, envp: ADDRESS) ;
+BEGIN
+END ConstructModules ;
+
+
+PROCEDURE DeconstructModules (applicationmodule: ADDRESS;
+                              argc: INTEGER; argv, envp: ADDRESS) ;
+BEGIN
+END DeconstructModules ;
+
+
 END M2RTS.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-11 14:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-11 14:06 [gcc/devel/modula-2] gm2-libs-min/M2RTS.mod populated with stub support procedures Gaius Mulley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).