[pypy-svn] r23538 - in pypy/dist/pypy: doc/discussion jit lib/logic lib/logic/computation_space module/stackless module/stackless/test objspace/flow/test objspace/std objspace/std/test rpython/memory tool tool/test translator/backendopt translator/c/winproj/standalone translator/js/test translator/microbench

cfbolz at codespeak.net cfbolz at codespeak.net
Tue Feb 21 12:10:05 CET 2006


Author: cfbolz
Date: Tue Feb 21 12:09:57 2006
New Revision: 23538

Modified:
   pypy/dist/pypy/doc/discussion/oz-thread-api.txt   (props changed)
   pypy/dist/pypy/jit/rtimeshift.py   (props changed)
   pypy/dist/pypy/lib/logic/computation_space/computationspace.txt   (props changed)
   pypy/dist/pypy/lib/logic/computation_space/strategies.py   (props changed)
   pypy/dist/pypy/lib/logic/oz-clp.txt   (props changed)
   pypy/dist/pypy/lib/logic/oz-dataflow-concurrency.txt   (props changed)
   pypy/dist/pypy/module/stackless/   (props changed)
   pypy/dist/pypy/module/stackless/test/   (props changed)
   pypy/dist/pypy/objspace/flow/test/test_picklegraph.py   (props changed)
   pypy/dist/pypy/objspace/std/complexobject.py   (props changed)
   pypy/dist/pypy/objspace/std/complextype.py   (props changed)
   pypy/dist/pypy/objspace/std/test/helper.py   (props changed)
   pypy/dist/pypy/objspace/std/test/test_complexobject.py   (props changed)
   pypy/dist/pypy/rpython/memory/lltypelayout.py
   pypy/dist/pypy/tool/picklesupport.py   (props changed)
   pypy/dist/pypy/tool/test/test_picklesupport.py   (props changed)
   pypy/dist/pypy/translator/backendopt/raisingop2direct_call.py   (props changed)
   pypy/dist/pypy/translator/backendopt/stackless.py   (contents, props changed)
   pypy/dist/pypy/translator/c/winproj/standalone/   (props changed)
   pypy/dist/pypy/translator/js/test/test_ajax.py   (props changed)
   pypy/dist/pypy/translator/js/test/test_annotationproblem.py   (props changed)
   pypy/dist/pypy/translator/js/test/test_struct.py   (props changed)
   pypy/dist/pypy/translator/microbench/test_exception.py   (props changed)
Log:
fixeol


Modified: pypy/dist/pypy/rpython/memory/lltypelayout.py
==============================================================================
--- pypy/dist/pypy/rpython/memory/lltypelayout.py	(original)
+++ pypy/dist/pypy/rpython/memory/lltypelayout.py	Tue Feb 21 12:09:57 2006
@@ -41,23 +41,26 @@
         assert 0, "type %s not yet implemented" % (TYPE, )
 
 def get_fixed_size(TYPE):
-    if isinstance(TYPE, lltype.Primitive):
-        if TYPE == lltype.Void:
-            return 0
-        return struct.calcsize(primitive_to_fmt[TYPE])
-    elif isinstance(TYPE, lltype.Ptr):
-        return struct.calcsize("P")
-    elif isinstance(TYPE, lltype.Struct):
-        return get_layout(TYPE)["_size"]
-    elif isinstance(TYPE, lltype.Array):
-        return get_fixed_size(lltype.Unsigned)
-    elif isinstance(TYPE, lltype.OpaqueType):
-        return get_fixed_size(lltype.Unsigned)
-    elif isinstance(TYPE, lltype.FuncType):
-        return get_fixed_size(lltype.Unsigned)
-    elif isinstance(TYPE, lltype.PyObjectType):
-        return get_fixed_size(lltype.Unsigned)
-    assert 0, "not yet implemented"
+    if TYPE._is_varsize():
+        return llmemory.sizeof(TYPE, 0)
+    return llmemory.sizeof(TYPE)
+#    if isinstance(TYPE, lltype.Primitive):
+#        if TYPE == lltype.Void:
+#            return 0
+#        return struct.calcsize(primitive_to_fmt[TYPE])
+#    elif isinstance(TYPE, lltype.Ptr):
+#        return struct.calcsize("P")
+#    elif isinstance(TYPE, lltype.Struct):
+#        return get_layout(TYPE)["_size"]
+#    elif isinstance(TYPE, lltype.Array):
+#        return get_fixed_size(lltype.Unsigned)
+#    elif isinstance(TYPE, lltype.OpaqueType):
+#        return get_fixed_size(lltype.Unsigned)
+#    elif isinstance(TYPE, lltype.FuncType):
+#        return get_fixed_size(lltype.Unsigned)
+#    elif isinstance(TYPE, lltype.PyObjectType):
+#        return get_fixed_size(lltype.Unsigned)
+#    assert 0, "not yet implemented"
 
 def get_variable_size(TYPE):
     if isinstance(TYPE, lltype.Array):

Modified: pypy/dist/pypy/translator/backendopt/stackless.py
==============================================================================
--- pypy/dist/pypy/translator/backendopt/stackless.py	(original)
+++ pypy/dist/pypy/translator/backendopt/stackless.py	Tue Feb 21 12:09:57 2006
@@ -12,19 +12,19 @@
     - slp_state_decoding.h (table for finding resume function (including signature id))
     - slp_imp.c (actual frame initializers)
 
-Objective is to get rid of 'hardcoded; stackless support in genc (c/stackless.py)
+Objective is to get rid of 'hardcoded; stackless support in genc (c/stackless.py)
 as well as the handwritten code in c/src/ll_stackless.h
 
-This is done by first creating a transformation (backendopt/stackless.py) that
-does basically the same as SlpFunctionCodeGenerator in c/stackless.py . The
-four slp_* files would be stored in graph structures and arrays. This process
-should leave the old code working and unchanged as much as possible!
+This is done by first creating a transformation (backendopt/stackless.py) that
+does basically the same as SlpFunctionCodeGenerator in c/stackless.py . The
+four slp_* files would be stored in graph structures and arrays. This process
+should leave the old code working and unchanged as much as possible!
 This step alone would make stackless work in genllvm.
 
-A second step would be to rewrite c/src/ll_stackless.h in RPython. This would
-allow backendopt transformations to be more effective but yields no additional
-advantage to PyPy's current backends (genjs has handwritten stackless support),
-and other backends are probably too experimental at this stage to benefit
+A second step would be to rewrite c/src/ll_stackless.h in RPython. This would
+allow backendopt transformations to be more effective but yields no additional
+advantage to PyPy's current backends (genjs has handwritten stackless support),
+and other backends are probably too experimental at this stage to benefit
 from stackless support.
 """
 



More information about the Pypy-commit mailing list