Skip to content

Commit

Permalink
compiler.embedding: use the builtin print as RPC.
Browse files Browse the repository at this point in the history
Fixes #206.
whitequark committed Jun 28, 2016
1 parent 6155f65 commit ef2af8c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions artiq/compiler/embedding.py
Original file line number Diff line number Diff line change
@@ -19,9 +19,6 @@
from .transforms.asttyped_rewriter import LocalExtractor


def coredevice_print(x): print(x)


class SpecializedFunction:
def __init__(self, instance_type, host_function):
self.instance_type = instance_type
@@ -424,7 +421,7 @@ def visit_Name(self, node):
else:
# Try to find this value in the host environment and quote it.
if node.id == "print":

This comment has been minimized.

Copy link
@sbourdeauducq

sbourdeauducq Jun 28, 2016

Member

Can't it just go the regular RPC route?

This comment has been minimized.

Copy link
@whitequark

whitequark Jun 28, 2016

Author Contributor

No, since print is in the prelude.

This comment has been minimized.

Copy link
@sbourdeauducq

sbourdeauducq Jun 28, 2016

Member

Why is it in the prelude?

return self.quote(coredevice_print, node.loc)
return self.quote(print, node.loc)
elif node.id in self.host_environment:
return self.quote(self.host_environment[node.id], node.loc)
else:

0 comments on commit ef2af8c

Please sign in to comment.