-
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.
compiler: add support for async RPCs.
whitequark
committed
Oct 30, 2016
1 parent
2ac85cd
commit cd68577
Showing
9 changed files
with
112 additions
and
17 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
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
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
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
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
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
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,15 @@ | ||
# 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: call void @send_async_rpc | ||
|
||
@rpc(flags={"async"}) | ||
def foo(): | ||
pass | ||
|
||
@kernel | ||
def entrypoint(): | ||
foo() |
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,15 @@ | ||
# RUN: %python -m artiq.compiler.testbench.embedding +diag %s 2>%t | ||
# RUN: OutputCheck %s --file-to-check=%t | ||
|
||
from artiq.language.core import * | ||
from artiq.language.types import * | ||
|
||
# CHECK-L: ${LINE:+2}: fatal: functions that return a value cannot be defined as async RPCs | ||
@rpc(flags={"async"}) | ||
def foo() -> TInt32: | ||
pass | ||
|
||
@kernel | ||
def entrypoint(): | ||
# CHECK-L: ${LINE:+1}: note: function called here | ||
foo() |
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