[pypy-commit] pypy numpy-exp: Mark some things as immutable fields.
alex_gaynor
noreply at buildbot.pypy.org
Sat May 14 23:13:53 CEST 2011
Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: numpy-exp
Changeset: r44170:a082dbb10f67
Date: 2011-05-14 16:22 -0500
http://bitbucket.org/pypy/pypy/changeset/a082dbb10f67/
Log: Mark some things as immutable fields.
diff --git a/pypy/module/micronumpy/interp_numarray.py b/pypy/module/micronumpy/interp_numarray.py
--- a/pypy/module/micronumpy/interp_numarray.py
+++ b/pypy/module/micronumpy/interp_numarray.py
@@ -69,6 +69,7 @@
"""
Intermediate class representing a float literal.
"""
+ _immutable_fields_ = ["float_value"]
def __init__(self, float_value):
BaseArray.__init__(self)
@@ -122,6 +123,7 @@
"""
Intermediate class for performing binary operations.
"""
+ _immutable_fields_ = ["opcode", "left", "right"]
def __init__(self, opcode, left, right):
VirtualArray.__init__(self)
@@ -153,6 +155,8 @@
raise NotImplementedError("Don't know opcode %s" % self.opcode)
class Call(VirtualArray):
+ _immutable_fields_ = ["function", "values"]
+
def __init__(self, function, values):
VirtualArray.__init__(self)
self.function = function
More information about the pypy-commit
mailing list