Commit ae87629a authored by Robert Bradshaw's avatar Robert Bradshaw

Fix builtins caching

parent d6c61a46
......@@ -815,7 +815,7 @@ class NameNode(AtomicExprNode):
if entry.is_pyglobal or entry.is_builtin:
assert type.is_pyobject, "Python global or builtin not a Python object"
if Options.intern_names:
self.interned_cname = env.intern(self.entry.name)
self.interned_cname = self.entry.interned_cname = env.intern(self.entry.name)
def check_identifier_kind(self):
#print "NameNode.check_identifier_kind:", self.entry.name ###
......
......@@ -1239,9 +1239,9 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code.putln("/*--- String init code ---*/")
self.generate_string_init_code(env, code)
code.putln("/*--- Builtin init code ---*/")
# TODO: FIXME !!
#self.generate_builtin_init_code(env, code)
if Options.cache_builtins:
code.putln("/*--- Builtin init code ---*/")
self.generate_builtin_init_code(env, code)
code.putln("/*--- Global init code ---*/")
self.generate_global_init_code(env, code)
......
......@@ -3,7 +3,7 @@
#
intern_names = 1 # Intern global variable and attribute names
cache_builtins = 0 # Perform lookups on builtin names only once
cache_builtins = 1 # Perform lookups on builtin names only once
embed_pos_in_docstring = 0
gcc_branch_hints = 1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment