Author: Lars Wassermann <[email protected]>
Branch: 
Changeset: r493:6c97c6bc7fc1
Date: 2013-07-09 20:20 +0200
http://bitbucket.org/pypy/lang-smalltalk/changeset/6c97c6bc7fc1/

Log:    added version object to the image, thus allowing in startup to
        decide whether to have a lower bound for artifical processes
        priority or not

diff --git a/spyvm/squeakimage.py b/spyvm/squeakimage.py
--- a/spyvm/squeakimage.py
+++ b/spyvm/squeakimage.py
@@ -374,6 +374,7 @@
         self.w_asSymbol = self.find_symbol(space, reader, "asSymbol")
         self.w_simulateCopyBits = self.find_symbol(space, reader, 
"simulateCopyBits")
         self.lastWindowSize = reader.lastWindowSize
+        self.version = reader.version
 
     def find_symbol(self, space, reader, symbol):
         w_dnu = self.special(constants.SO_DOES_NOT_UNDERSTAND)
diff --git a/targetimageloadingsmalltalk.py b/targetimageloadingsmalltalk.py
--- a/targetimageloadingsmalltalk.py
+++ b/targetimageloadingsmalltalk.py
@@ -32,7 +32,8 @@
     # third variable is priority
     priority = space.unwrap_int(w_hpp.fetch(space, 2)) / 2 + 1
     # Priorities below 10 are not allowed in newer versions of Squeak.
-    priority = max(11, priority)
+    if interp.image.version.has_closures:
+        priority = max(11, priority)
     w_benchmark_proc.store(space, 2, space.wrap_int(priority))
 
     # make process eligible for scheduling
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to