Author: Spenser Bauman <saba...@gmail.com>
Branch: value-classes
Changeset: r87295:659c9d93b42d
Date: 2016-09-21 18:26 -0400
http://bitbucket.org/pypy/pypy/changeset/659c9d93b42d/

Log:    Add some missing _immutable_fields_ annotations for BuiltinCode
        objects

diff --git a/pypy/interpreter/gateway.py b/pypy/interpreter/gateway.py
--- a/pypy/interpreter/gateway.py
+++ b/pypy/interpreter/gateway.py
@@ -786,6 +786,8 @@
 class BuiltinCode1(BuiltinCode):
     fast_natural_arity = 1
 
+    _immutable_fields_ = ['fastfunc_1']
+
     def fastcall_1(self, space, w_func, w1):
         try:
             w_result = self.fastfunc_1(space, w1)
@@ -805,6 +807,8 @@
 class BuiltinCode2(BuiltinCode):
     fast_natural_arity = 2
 
+    _immutable_fields_ = ['fastfunc_2']
+
     def fastcall_2(self, space, w_func, w1, w2):
         try:
             w_result = self.fastfunc_2(space, w1, w2)
@@ -824,6 +828,8 @@
 class BuiltinCode3(BuiltinCode):
     fast_natural_arity = 3
 
+    _immutable_fields_ = ['fastfunc_3']
+
     def fastcall_3(self, space, func, w1, w2, w3):
         try:
             w_result = self.fastfunc_3(space, w1, w2, w3)
@@ -843,6 +849,8 @@
 class BuiltinCode4(BuiltinCode):
     fast_natural_arity = 4
 
+    _immutable_fields_ = ['fastfunc_4']
+
     def fastcall_4(self, space, func, w1, w2, w3, w4):
         try:
             w_result = self.fastfunc_4(space, w1, w2, w3, w4)
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to