Skip to content
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

Live Code Updates #394

Open
wants to merge 20 commits into
base: dev
Choose a base branch
from
Open

Live Code Updates #394

wants to merge 20 commits into from

Conversation

smarr
Copy link
Owner

@smarr smarr commented Dec 22, 2022

@Marmat21 I hope it's ok for you for me to document this branch based on your notes:

"""
Main change: I added support in SOMns for updating classes.
To this extent, I had to touch several parts of the mixindefinition, as well as invalidate assumptions and caches so that the new newly complied module would be used.

In short, it works as follows:

  • When updating module A, a new version of the module is compiled in module A’.
  • All dispatchables and slots definitions of A are substituted with the ones of A’.
    This is because recompiling a module not only recompiles methods, but also recompiles slots, which leads to new methods referencing new slots. Thus, both methods (aka dispatchables) and slots have to be set from A’ into A.

In total, I added two commands that the FrontEndConnector now understands: UpdateClass and RestartFrame.
The first one does as specified above, the second one instructs Truffle to restart the execution from a certain frame in the stack by re-entering it.
Note that the branch before the merge refers to an older version of Carmen’s branch before the rebase of Stefan. The merged version linked above does include the rebase of Stefan and passes the CI tests as of 16/12/2022.
"""

matteo added 20 commits July 27, 2022 18:10
Updating now works unless object is reinitialized
New slots with the same name of old slots are pushed in the old class and they are mapped to the same location of old slots.
For this reason, we don’t need to place the old slots in the mixinBuilder anymore.
…frame. restart is still not same behaviour as ST (reenter instead of redispatch)
…t already have a value. Some slots still stay duplicated but it seems to work
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant