-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
transforms.artiq_ir_generator: add tests for devirtualization.
whitequark
committed
Oct 8, 2015
1 parent
0bb7931
commit b6c8c9f
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"comm": { | ||
"type": "local", | ||
"module": "artiq.coredevice.comm_dummy", | ||
"class": "Comm", | ||
"arguments": {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() |