forked from M-Labs/artiq
3a1fc729cf
The new implementation is much more generic, more robust, and shares code with the same for syscalls as well as RPCs. Fixes #713.
18 lines
426 B
Python
18 lines
426 B
Python
# RUN: env ARTIQ_DUMP_LLVM=%t %python -m artiq.compiler.testbench.embedding +compile %s
|
|
# RUN: OutputCheck %s --file-to-check=%t.ll
|
|
|
|
from artiq.language.core import *
|
|
from artiq.language.types import *
|
|
|
|
# CHECK: i64 @_Z13testbench.foozz\(i64 %ARG.x, \{ i1, i64 \} %ARG.y\)
|
|
|
|
@kernel
|
|
def foo(x: TInt64, y: TInt64 = 1) -> TInt64:
|
|
print(x+y)
|
|
return x+y
|
|
|
|
@kernel
|
|
def entrypoint():
|
|
print(foo(0, 2))
|
|
print(foo(1, 3))
|