[pypy-svn] r45402 - pypy/dist/pypy/lang/scheme

jlg at codespeak.net jlg at codespeak.net
Fri Jul 27 14:54:17 CEST 2007


Author: jlg
Date: Fri Jul 27 14:54:17 2007
New Revision: 45402

Modified:
   pypy/dist/pypy/lang/scheme/object.py
Log:
no need to enclose primitive objects in SyntacticClosure on expand

Modified: pypy/dist/pypy/lang/scheme/object.py
==============================================================================
--- pypy/dist/pypy/lang/scheme/object.py	(original)
+++ pypy/dist/pypy/lang/scheme/object.py	Fri Jul 27 14:54:17 2007
@@ -947,15 +947,15 @@
                 # Hygenic macros close their input forms in the syntactic
                 # enviroment at the point of use
 
-                #not always needed, because w_sub can have no W_Symbols inside
-                
                 #already is a SyntacticClosure
                 if isinstance(w_sub, SyntacticClosure):
                     assert w_sub.closure is ctx
 
-                    return w_sub
+                #not always needed, because w_sub can have no W_Symbol inside
+                if isinstance(w_sub, W_Symbol) or isinstance(w_sub, W_Pair):
+                    return SyntacticClosure(ctx, w_sub)
 
-                return SyntacticClosure(ctx, w_sub)
+                return w_sub
 
             return sexpr
 



More information about the Pypy-commit mailing list