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

Runtime trait and vm types #68

Merged
merged 2 commits into from
Dec 5, 2019
Merged

Runtime trait and vm types #68

merged 2 commits into from
Dec 5, 2019

Conversation

austinabell
Copy link
Contributor

  • Implements Set up runtime framework #65 which sets up the trait to be used by the interpreter and functions and stubs out some types some of which being incompatible for us
  • Also implements other needed types needed within the VM

Copy link
Member

@GregTheGreek GregTheGreek left a comment

Choose a reason for hiding this comment

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

So theres a few spots where you have types stubbed out as () (or other), i think it would be most beneficial to create a bunch of fake types at the top of runtime/mod.rs that defines the type as an empty struct (if it applies). That way it can act as a checklist later on as we further implement this

vm/src/runtime/mod.rs Outdated Show resolved Hide resolved
}
/// returns true if exited with an error code
pub fn is_error(&self) -> bool {
!self.success
Copy link
Member

Choose a reason for hiding this comment

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

lol i love this function and is_success

Copy link
Member

Choose a reason for hiding this comment

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

And allows_state_updates haha.

What is the diff between is_success and allows_state_updates

Copy link
Contributor Author

Choose a reason for hiding this comment

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

following spec for now :P and to future proof is we use more complex types in the future

Copy link
Contributor Author

Choose a reason for hiding this comment

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

allow_state_updates will be kept just as a future proof for if a call has static context or something, not sure exactly why it exists in Filecoin spec

@austinabell austinabell merged commit d10a546 into master Dec 5, 2019
@austinabell austinabell deleted the austin/runtimeframework branch December 5, 2019 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants