forked from M-Labs/artiq
transforms.artiq_ir_generator: add tests for devirtualization.
This commit is contained in:
parent
0bb793199f
commit
b6c8c9f480
8
lit-test/test/devirtualization/ddb.pyon
Normal file
8
lit-test/test/devirtualization/ddb.pyon
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"comm": {
|
||||
"type": "local",
|
||||
"module": "artiq.coredevice.comm_dummy",
|
||||
"class": "Comm",
|
||||
"arguments": {}
|
||||
}
|
||||
}
|
22
lit-test/test/devirtualization/function.py
Normal file
22
lit-test/test/devirtualization/function.py
Normal 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()
|
Loading…
Reference in New Issue
Block a user