-
-
Notifications
You must be signed in to change notification settings - Fork 418
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 support for custom serialisation (RFC 21) #1839
Conversation
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.
I think the new test would be better as a compiler test instead of a standard library test. This would avoid having functions supporting tests in libponyrt. It can be implemented in the compiler test suite as a JIT test. Let me know if you need additional directions on how to implement it.
I'm going to slap a party emoji on this. |
God damn it C++ ... in my defense, this builds with clang++, but g++ needs an include to make it work. |
f04aada
to
867d95e
Compare
@Praetonus is there an good example of how you think I should do this? |
You can look at the tests in |
Given the blocking issue #1843, I'd like to propose that this proceed forward without the compiler tests for now and just have the standard library tests. |
@aturley if this get merged before JIT tests, can you add an issue for adding JIT tests. |
This patch will fix the Windows build. I have tested it on Ubuntu as well. |
I've opened a PR resolving the blocking issue with compiler tests. |
867d95e
to
fb2e690
Compare
OK, now that #1843 has been resolved I've made this a compiler test, hopefully everything builds. |
test/libponyc/codegen.cc
Outdated
virtual void SetUp() | ||
{ | ||
PassTest::SetUp(); | ||
set_builtin(NULL); |
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.
I'd recommend putting this in the new test instead, before TEST_COMPILE
. It would avoid having to compile the real builtin for every CodegenTest
test and instead compile it only for the test that needs it, avoiding an increase in execution time for every test.
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.
Seems reasonable. I have made this change.
@aturley is a PR the tutorial and another for Pony patterns all that is left?
|
fb2e690
to
eba92a0
Compare
Some things came up and I fell behind on this ... @SeanTAllen yes, if folks are happy with this then I can do the tutorial and patterns. |
eba92a0
to
f83ce08
Compare
f83ce08
to
9b95f03
Compare
src/libponyc/pass/serialisers.c
Outdated
return false; | ||
} | ||
|
||
if(ast_id(ast_serialise_space) != TK_FUN && ast_id(ast_serialise) != TK_FUN && |
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.
The goal of this check is unclear to me. In any case the function will return true
.
This commit adds support for custom serialisation. Custom serialisation lets the user provide methods that are called by Pony's serialisation and deserialisation system in order to add additional information that otherwise would not be serialized. The primary goal of this system is to provide a means of serialising data stored in `Pointer` member variables.
9b95f03
to
c733761
Compare
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.
Looks good to me and the tests are passing, let's merge. Thank you for your work @aturley!
This commit adds support for custom serialisation. Custom
serialisation lets the user provide methods that are called by Pony's
serialisation and deserialisation system in order to add additional
information that otherwise would not be serialized. The primary goal
of this system is to provide a means of serialising data stored in
Pointer
member variables.