[pypy-svn] r15720 - in pypy/dist/pypy: interpreter module/__builtin__

tismer at codespeak.net tismer at codespeak.net
Sat Aug 6 12:53:51 CEST 2005


Author: tismer
Date: Sat Aug  6 12:53:50 2005
New Revision: 15720

Modified:
   pypy/dist/pypy/interpreter/baseobjspace.py
   pypy/dist/pypy/module/__builtin__/importing.py
Log:
enabling marshal:

these files were just changed for reactivation.
For some other observations and thoughts see my post to pypy-dev.


Modified: pypy/dist/pypy/interpreter/baseobjspace.py
==============================================================================
--- pypy/dist/pypy/interpreter/baseobjspace.py	(original)
+++ pypy/dist/pypy/interpreter/baseobjspace.py	Sat Aug  6 12:53:50 2005
@@ -164,7 +164,7 @@
             pass
 
         modules = ['sys', '__builtin__', 'exceptions', 'unicodedata', '_codecs',
-            'array']
+            'array', 'marshal']
 
         if self.options.nofaking:
             modules.append('posix')

Modified: pypy/dist/pypy/module/__builtin__/importing.py
==============================================================================
--- pypy/dist/pypy/module/__builtin__/importing.py	(original)
+++ pypy/dist/pypy/module/__builtin__/importing.py	Sat Aug  6 12:53:50 2005
@@ -48,7 +48,7 @@
         pyfile_exist = False
     
     pycfile = filepart + ".pyc"    
-    if 0:  # os.path.exists(pycfile):       # DISABLED PYC FILES FOR NOW
+    if os.path.exists(pycfile):
         pyc_state = check_compiled_module(space, pyfile, pyfile_ts, pycfile)
         pycfile_exists = pyc_state >= 0
         pycfile_ts_valid = pyc_state > 0 and pyfile_exist
@@ -359,16 +359,15 @@
     w = space.wrap
     pycode = parse_source_module(space, pathname, osfile)
 
-    w_dict = space.getattr(w_mod, w('__dict__'))                                      
+    w_dict = space.getattr(w_mod, w('__dict__'))
     space.call_method(w_dict, 'setdefault', 
                       w('__builtins__'), 
                       w(space.builtin))
     pycode.exec_code(space, w_dict, w_dict) 
 
-    if 0:        # DISABLED PYC FILES FOR NOW
-        mtime = os.fstat(osfile.fd)[stat.ST_MTIME]
-        cpathname = pathname + 'c'
-        write_compiled_module(space, pycode, cpathname, mtime)
+    mtime = os.fstat(osfile.fd)[stat.ST_MTIME]
+    cpathname = pathname + 'c'
+    write_compiled_module(space, pycode, cpathname, mtime)
 
     return w_mod
 
@@ -485,7 +484,6 @@
         pass
         #XXX debug
         #print "indeed writing", cpathname
-    w_M = space.getattr(w_marshal, space.wrap('dumps'))
     try:
         w_str = space.call_method(w_marshal, 'dumps', space.wrap(co))
     except OperationError:



More information about the Pypy-commit mailing list