[pypy-commit] lang-js default: immutable attributes for JsCode

stepahn noreply at buildbot.pypy.org
Fri Dec 28 11:35:22 CET 2012


Author: Stephan <stephan at stzal.com>
Branch: 
Changeset: r301:f08a48e5ddf8
Date: 2012-09-04 16:03 +0200
http://bitbucket.org/pypy/lang-js/changeset/f08a48e5ddf8/

Log:	immutable attributes for JsCode

diff --git a/js/jscode.py b/js/jscode.py
--- a/js/jscode.py
+++ b/js/jscode.py
@@ -32,6 +32,8 @@
 
 
 class JsCode(object):
+    _immutable_fields_ = ['_oppcodes_', '_symbols_']
+
     """ That object stands for code of a single javascript function
     """
     def __init__(self, symbol_map=empty_symbols):
@@ -213,7 +215,6 @@
         assert pc >= 0
         return self.opcodes[pc]
 
-    @jit.elidable
     def _opcode_count(self):
         return len(self.opcodes)
 


More information about the pypy-commit mailing list