Commit 9c93f96e authored by Mark Florisson's avatar Mark Florisson

Call generate_execution_code on cdef specialed functions

parent 968404a1
...@@ -736,6 +736,8 @@ class FusedCFuncDefNode(StatListNode): ...@@ -736,6 +736,8 @@ class FusedCFuncDefNode(StatListNode):
stat.generate_function_definitions(env, code) stat.generate_function_definitions(env, code)
def generate_execution_code(self, code): def generate_execution_code(self, code):
# Note: all def function specialization are wrapped in PyCFunction
# nodes in the self.__signatures__ dictnode.
for default in self.defaults: for default in self.defaults:
if default is not None: if default is not None:
default.generate_evaluation_code(code) default.generate_evaluation_code(code)
...@@ -748,7 +750,7 @@ class FusedCFuncDefNode(StatListNode): ...@@ -748,7 +750,7 @@ class FusedCFuncDefNode(StatListNode):
code.mark_pos(stat.pos) code.mark_pos(stat.pos)
if isinstance(stat, ExprNodes.ExprNode): if isinstance(stat, ExprNodes.ExprNode):
stat.generate_evaluation_code(code) stat.generate_evaluation_code(code)
elif not isinstance(stat, FuncDefNode): # or stat.entry.used: else:
stat.generate_execution_code(code) stat.generate_execution_code(code)
if self.__signatures__: if self.__signatures__:
......
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