public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Gaius Mulley <gaius@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc/devel/modula-2] M2Quads.mod tidyup and mc/decl.mod bugfix.
Date: Thu,  8 Sep 2022 11:34:50 +0000 (GMT)	[thread overview]
Message-ID: <20220908113450.615933858D28@sourceware.org> (raw)

https://gcc.gnu.org/g:971d9ba31fa408b706d9c385c7f63fced92e9493

commit 971d9ba31fa408b706d9c385c7f63fced92e9493
Author: Gaius Mulley <gaiusmod2@gmail.com>
Date:   Thu Sep 8 12:33:40 2022 +0100

    M2Quads.mod tidyup and mc/decl.mod bugfix.
    
    gcc/m2/ChangeLog:
    
            * gm2-compiler/M2Quads.mod (SafeRequestSym): Remove unused
            parameter procedure.  (BuildM2LinkFunction) Remove modulesym
            unused parameter.  (BuildM2MainFunction) Remove modulesym
            unused parameter.  Remove the first parameter in all calls to
            the above functions.
            * mc-boot/Gdecl.c: Rebuilt.
            * mc/decl.mod (isIntrinsicFunction): Remove throw.
    
    Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>

Diff:
---
 gcc/m2/gm2-compiler/M2Quads.mod | 34 +++++++++++++++++-----------------
 gcc/m2/mc-boot/Gdecl.c          |  6 ------
 gcc/m2/mc/decl.mod              |  7 +------
 3 files changed, 18 insertions(+), 29 deletions(-)

diff --git a/gcc/m2/gm2-compiler/M2Quads.mod b/gcc/m2/gm2-compiler/M2Quads.mod
index a22a777fcd8..29cc9cd98b1 100644
--- a/gcc/m2/gm2-compiler/M2Quads.mod
+++ b/gcc/m2/gm2-compiler/M2Quads.mod
@@ -2238,7 +2238,7 @@ END BuildRetry ;
                     it fails then it falls back onto default constants.
 *)
 
-PROCEDURE SafeRequestSym (procedure: CARDINAL; tok: CARDINAL; name: Name) : CARDINAL ;
+PROCEDURE SafeRequestSym (tok: CARDINAL; name: Name) : CARDINAL ;
 VAR
    sym: CARDINAL ;
 BEGIN
@@ -2385,7 +2385,7 @@ END BuildM2DepFunction ;
                          cause the linker to pull in all the module ctors.
 *)
 
-PROCEDURE BuildM2LinkFunction (tokno: CARDINAL; modulesym: CARDINAL) ;
+PROCEDURE BuildM2LinkFunction (tokno: CARDINAL) ;
 BEGIN
    IF ScaffoldDynamic
    THEN
@@ -2415,7 +2415,7 @@ END BuildM2LinkFunction ;
    BuildM2MainFunction - creates the main function with appropriate calls to the scaffold.
 *)
 
-PROCEDURE BuildM2MainFunction (tokno: CARDINAL; modulesym: CARDINAL) ;
+PROCEDURE BuildM2MainFunction (tokno: CARDINAL) ;
 BEGIN
    IF (ScaffoldDynamic OR ScaffoldStatic) AND (NOT SharedFlag)
    THEN
@@ -2503,18 +2503,18 @@ BEGIN
             PushT(1) ;
             BuildAdrFunction ;
 
-            PushTtok (SafeRequestSym (initFunction, tok, MakeKey ("argc")), tok) ;
-            PushTtok (SafeRequestSym (initFunction, tok, MakeKey ("argv")), tok) ;
-            PushTtok (SafeRequestSym (initFunction, tok, MakeKey ("envp")), tok) ;
+            PushTtok (SafeRequestSym (tok, MakeKey ("argc")), tok) ;
+            PushTtok (SafeRequestSym (tok, MakeKey ("argv")), tok) ;
+            PushTtok (SafeRequestSym (tok, MakeKey ("envp")), tok) ;
             PushT (4) ;
             BuildProcedureCall (tok) ;
          END
       ELSIF ScaffoldStatic
       THEN
          ForeachModuleCallInit (tok,
-                                SafeRequestSym (initFunction, tok, MakeKey ("argc")),
-                                SafeRequestSym (initFunction, tok, MakeKey ("argv")),
-                                SafeRequestSym (initFunction, tok, MakeKey ("envp")))
+                                SafeRequestSym (tok, MakeKey ("argc")),
+                                SafeRequestSym (tok, MakeKey ("argv")),
+                                SafeRequestSym (tok, MakeKey ("envp")))
       END ;
       EndScope ;
       BuildProcedureEnd ;
@@ -2558,18 +2558,18 @@ BEGIN
             PushT(1) ;
             BuildAdrFunction ;
 
-            PushTtok (SafeRequestSym (finiFunction, tok, MakeKey ("argc")), tok) ;
-            PushTtok (SafeRequestSym (finiFunction, tok, MakeKey ("argv")), tok) ;
-            PushTtok (SafeRequestSym (finiFunction, tok, MakeKey ("envp")), tok) ;
+            PushTtok (SafeRequestSym (tok, MakeKey ("argc")), tok) ;
+            PushTtok (SafeRequestSym (tok, MakeKey ("argv")), tok) ;
+            PushTtok (SafeRequestSym (tok, MakeKey ("envp")), tok) ;
             PushT (4) ;
             BuildProcedureCall (tok)
          END
       ELSIF ScaffoldStatic
       THEN
          ForeachModuleCallFinish (tok,
-                                  SafeRequestSym (finiFunction, tok, MakeKey ("argc")),
-                                  SafeRequestSym (finiFunction, tok, MakeKey ("argv")),
-                                  SafeRequestSym (finiFunction, tok, MakeKey ("envp")))
+                                  SafeRequestSym (tok, MakeKey ("argc")),
+                                  SafeRequestSym (tok, MakeKey ("argv")),
+                                  SafeRequestSym (tok, MakeKey ("envp")))
       END ;
       EndScope ;
       BuildProcedureEnd ;
@@ -2646,8 +2646,8 @@ BEGIN
          (* There are module init/fini functions and
             application init/fini functions.
             Here we create the application pair.  *)
-         BuildM2LinkFunction (tok, moduleSym) ;
-         BuildM2MainFunction (tok, moduleSym) ;
+         BuildM2LinkFunction (tok) ;
+         BuildM2MainFunction (tok) ;
          BuildM2InitFunction (tok, moduleSym) ;  (* Application init.  *)
          BuildM2FiniFunction (tok, moduleSym) ;  (* Application fini.  *)
       END ;
diff --git a/gcc/m2/mc-boot/Gdecl.c b/gcc/m2/mc-boot/Gdecl.c
index b9fd0fa1950..d156866f65f 100644
--- a/gcc/m2/mc-boot/Gdecl.c
+++ b/gcc/m2/mc-boot/Gdecl.c
@@ -16155,7 +16155,6 @@ static unsigned int isIntrinsicFunction (decl_node n)
       case length:
       case min:
       case max:
-      case throw_:
       case re:
       case im:
       case cmplx:
@@ -18279,11 +18278,6 @@ static void visitIntrinsicFunction (alists_alist v, decl_node n, nodeProcedure p
         visitNode (v, n->unaryF.resultType, p);
         break;
 
-      case throw_:
-        visitNode (v, n->intrinsicF.args, p);
-        visitNode (v, n->intrinsicF.type, p);
-        break;
-
 
       default:
         CaseException ("../../gcc-git-devel-modula2/gcc/m2/mc/decl.def", 20, 1);
diff --git a/gcc/m2/mc/decl.mod b/gcc/m2/mc/decl.mod
index 26fa06249c2..90cfa6dfcdd 100644
--- a/gcc/m2/mc/decl.mod
+++ b/gcc/m2/mc/decl.mod
@@ -10913,7 +10913,6 @@ BEGIN
    length,
    min,
    max,
-   throw,
    re,
    im,
    cmplx:  RETURN TRUE
@@ -12730,11 +12729,7 @@ BEGIN
    im   : WITH n^.unaryF DO
              visitNode (v, arg, p) ;
              visitNode (v, resultType, p)
-          END |
-   throw:  WITH n^.intrinsicF DO
-              visitNode (v, args, p) ;
-              visitNode (v, type, p)
-           END
+          END
 
    END
 END visitIntrinsicFunction ;

                 reply	other threads:[~2022-09-08 11:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220908113450.615933858D28@sourceware.org \
    --to=gaius@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).