提交 911ff9c8 authored 作者: Frederic's avatar Frederic

Some extra comment in c code to help find our way while reading it.

上级 a4315d4b
......@@ -677,6 +677,11 @@ class CLinker(link.Linker):
raise NotImplementedError("%s cannot produce C code" % op)
assert isinstance(behavior, basestring), (
str(node.op) + " didn't return a string for c_code")
# To help understand what is following. It help read the c code.
# This prevent different op that generate the same c code
# to be merged, I suppose this won't happen...
behavior = ("// Op class " + node.op.__class__.__name__ + "\n" +
behavior)
try:
cleanup = op.c_code_cleanup(node, name, isyms, osyms, sub)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论