[pypy-svn] r45408 - pypy/dist/pypy/lang/scheme
jlg at codespeak.net
jlg at codespeak.net
Fri Jul 27 16:55:05 CEST 2007
Author: jlg
Date: Fri Jul 27 16:55:04 2007
New Revision: 45408
Modified:
pypy/dist/pypy/lang/scheme/TODO.txt
pypy/dist/pypy/lang/scheme/object.py
Log:
translation fixed
Modified: pypy/dist/pypy/lang/scheme/TODO.txt
==============================================================================
--- pypy/dist/pypy/lang/scheme/TODO.txt (original)
+++ pypy/dist/pypy/lang/scheme/TODO.txt Fri Jul 27 16:55:04 2007
@@ -19,6 +19,5 @@
- macros
* macros are not first-class objects
- continuations
-- move syntax checking to parsing
- switch to byte-code generation + eval instead of evaluating AST
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 16:55:04 2007
@@ -907,6 +907,8 @@
class SyntacticClosure(W_Root):
def __init__(self, ctx, sexpr):
+ assert not isinstance(sexpr, SyntacticClosure)
+ assert isinstance(sexpr, W_Root)
self.sexpr = sexpr
self.closure = ctx
@@ -947,10 +949,6 @@
# Hygenic macros close their input forms in the syntactic
# enviroment at the point of use
- #already is a SyntacticClosure
- if isinstance(w_sub, SyntacticClosure):
- assert w_sub.closure is ctx
-
#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)
@@ -978,7 +976,7 @@
isinstance(w_paircar.sexpr, W_Symbol):
try:
#ops, which context?
- w_macro = ctx.get(w_paircar.sexpr.name)
+ w_macro = ctx.get(w_paircar.sexpr.to_string())
# recursive macro expansion
if isinstance(w_macro, W_DerivedMacro):
More information about the Pypy-commit
mailing list