-
-
Notifications
You must be signed in to change notification settings - Fork 415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the pony_try function to receive Pony errors in C code #2457
Conversation
test/libponyrt/lang/except.cc
Outdated
|
||
#include <pony.h> | ||
|
||
TEST(ExceptTest, PonyTry) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not ErrorTest
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No particular reason. I'll update.
The Linux and OSX builds seem to be passing. I tried to update the wscript file with a custom build rule for |
This function is implemented in LLVM IR since it cannot be implemented in C. This change also exposes the `pony_error` function (renamed from `pony_throw`) in the public runtime interface in order to allow C programs to both raise and receive Pony errors.
I'll take a look tonight. |
It looks like my last change fixed the problem. It was a naming error (I used |
This function is implemented in LLVM IR since it cannot be implemented in C.
This change also exposes the
pony_error
function (renamed frompony_throw
) in the public runtime interface in order to allow C programs to both raise and receive Pony errors.@sylvanc @SeanTAllen @jemc This PR adds the first instance of handwritten LLVM IR to the project. It'll almost certainly not become a trend since there aren't a lot of things that cannot be done in C, but it will nonetheless add some maintenance burden given that LLVM IR sometimes has breakages, so I'd like you to sign off on this.
@kulibali I'm not sure how to update the Windows build system for that one. We'd basically need to add a custom rule when compiling
.ll
files forlibponyrt
, but keep the existing rule for.c
and.cc
files. That existing rule seems to be internal to waf so I'm not sure how to proceed. The build command for.ll
files would bellc.exe -filetype=obj -o file.o file.ll
. Could you take a look when you have time?