You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These are the issues I have encountered when trying to move to the new PonyRT and the proposed solutions:
Problem1:
The pony interface has changed. Pretty much all functions require a new argument of type pony_ctx_t (opaque type). There's a method for getting the context (pony_ctx()). The problem is that we need to change all the code generation for the functions that use the ctx.
Solution: Mimic the old pony.h (without ctx) in encore.h and remove all references to pony_*. Internally, all pony calls in encore.h will do a call to pony_ctx() and, afterwards, call the corresponding pony function. i.e.
This means changing the code generation in the encore compiler and change the name pony_create to encore_create. The number of arguments are the same (less changes). This also means that there is an extra overhead inside each encore method call. The reason is that we might have:
let a = new Actor
b = new Actor
in
a.send(b)
which creates actors and sends messages and, each one will perform a call to get the same ctx. In this case, we call the same function (at least) 3 times to get the same ctx.