transforms.artiq_ir_generator: add tests for devirtualization.

This commit is contained in:
whitequark 2015-10-09 01:37:28 +03:00
parent 0bb793199f
commit b6c8c9f480
2 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,8 @@
{
"comm": {
"type": "local",
"module": "artiq.coredevice.comm_dummy",
"class": "Comm",
"arguments": {}
}
}

View File

@ -0,0 +1,22 @@
# RUN: env ARTIQ_DUMP_IR=1 %python -m artiq.compiler.testbench.embedding +compile %s 2>%t
# RUN: OutputCheck %s --file-to-check=%t
from artiq.language.core import *
from artiq.language.types import *
# CHECK-L: call ()->NoneType %local.testbench.entrypoint ; calls testbench.entrypoint
@kernel
def baz():
pass
class foo:
@kernel
def bar(self):
# CHECK-L: call ()->NoneType %local.testbench.baz ; calls testbench.baz
baz()
x = foo()
@kernel
def entrypoint():
x.bar()