Skip to content

Conversation

@andreaTP
Copy link
Collaborator

Thanks a ton to @evacchi that paired on this time-consuming task ❤️

We did an almost full (file by file) review of the project and actioned anything trivial, this is the list of remaining task/future ideas:
https://gist.github.com/andreaTP/da9ceaaa20b72d84fb07cc0d1471891c

Copy link
Collaborator

@evacchi evacchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since we paired on this, it already LGTM. Thanks for bringing it home with the final touches!

INSTANCE_CALL_HOST_FUNCTION =
Instance.class.getMethod("callHostFunction", int.class, long[].class);
INSTANCE_READ_GLOBAL = Instance.class.getMethod("readGlobal", int.class);
READ_GLOBAL = AotMethods.class.getMethod("readGlobal", int.class, Instance.class);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say this and related are the most notable changes in the PR. The rest of it is changes to the visibility of some class and methods so that they are all package-private

Comment on lines -269 to -285
return globals[idx - importedGlobalsOffset];
}

public void writeGlobal(int idx, long val) {
if (idx < importedGlobalsOffset) {
imports.global(idx).instance().setValue(val);
}
globals[idx - importedGlobalsOffset].setValue(val);
}

public ValueType readGlobalType(int idx) {
if (idx < importedGlobalsOffset) {
return imports.global(idx).instance().getType();
}
return globals[idx - importedGlobalsOffset].getType();
}

public long readGlobal(int idx) {
if (idx < importedGlobalsOffset) {
return imports.global(idx).instance().getValue();
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the "related" change I was mention in the other comment.

@evacchi
Copy link
Collaborator

evacchi commented Oct 24, 2024

As promised, I have created a bunch of issues for about half the notes in the gist. The others I think can be considered minor and/or already in progress, but feel free to create more.

I have also assigned a few to myself, but

  1. anyone should feel free to take them over if they want to raise priority.
  2. those I haven't assigned to myself are up for grabs but I still can take once I'm done with the others

Co-authored-by: evacchi <evacchi@users.noreply.github.com>
@andreaTP andreaTP merged commit 81ba7bc into dylibso:main Oct 24, 2024
13 checks passed
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.

3 participants