axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] Fix for Macroexpansion bug


From: Juergen Weiss
Subject: [Axiom-developer] Fix for Macroexpansion bug
Date: 01 Oct 2003 12:38:21 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

Hi,

here is a fix for the macro expansion bug. As a test I
recompiled the complete algebra without any change in generated
lisp code.


diff -c -r1.4 compiler.boot
*** compiler.boot       2003/06/20 20:58:11     1.4
--- compiler.boot       2003/09/30 20:07:31
***************
*** 670,686 ****
  compMacro(form,m,e) ==
    $macroIfTrue: local:= true
    ["MDEF",lhs,signature,specialCases,rhs]:= form
!   rhs :=
      rhs is ['CATEGORY,:.] => ['"-- the constructor category"]
      rhs is ['Join,:.]     => ['"-- the constructor category"]
      rhs is ['CAPSULE,:.]  => ['"-- the constructor capsule"]
      rhs is ['add,:.]      => ['"-- the constructor capsule"]
      formatUnabbreviated rhs
    sayBrightly ['"   processing macro definition",'%b,
!     :formatUnabbreviated lhs,'" ==> ",:rhs,'%d]
!   ["MDEF",lhs,signature,specialCases,rhs]:= form:= macroExpand(form,e)
    m=$EmptyMode or m=$NoValueMode =>
!     ["/throwAway",$NoValueMode,put(first lhs,"macro",rhs,e)]
  
  --% SEQ
  
--- 670,685 ----
  compMacro(form,m,e) ==
    $macroIfTrue: local:= true
    ["MDEF",lhs,signature,specialCases,rhs]:= form
!   prhs :=
      rhs is ['CATEGORY,:.] => ['"-- the constructor category"]
      rhs is ['Join,:.]     => ['"-- the constructor category"]
      rhs is ['CAPSULE,:.]  => ['"-- the constructor capsule"]
      rhs is ['add,:.]      => ['"-- the constructor capsule"]
      formatUnabbreviated rhs
    sayBrightly ['"   processing macro definition",'%b,
!     :formatUnabbreviated lhs,'" ==> ",:prhs,'%d]
    m=$EmptyMode or m=$NoValueMode =>
!     ["/throwAway",$NoValueMode,put(first lhs,"macro",macroExpand(rhs,e),e)]
  
  --% SEQ
  

Regards

Juergen Weiss

-- 
Juergen Weiss     | Universitaet Mainz, Zentrum fuer Datenverarbeitung,
address@hidden| 55099 Mainz, Tel: +49(6131)39-26361, FAX: +49(6131)39-26407




reply via email to

[Prev in Thread] Current Thread [Next in Thread]