Skip to content

Relocate object protocol implementation from vm #3324

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

Closed
10 tasks done
youknowone opened this issue Oct 16, 2021 · 7 comments
Closed
10 tasks done

Relocate object protocol implementation from vm #3324

youknowone opened this issue Oct 16, 2021 · 7 comments
Labels
E-help-wanted Extra attention is needed good first issue Good for newcomers

Comments

@youknowone
Copy link
Member

youknowone commented Oct 16, 2021

For now, Object protocol methods are (mostly) thin wrapper of matching vm functions. Because we don't need to have duplicated functions for same features, they need to be moved from vm to object protocol functions.

  • vm path: vm/src/vm.rs
  • object protocol path: vm/src/protocol/object.rs

The matching vm functions are easy to find because object methods are calling it.

Becasue relocating each function will cause many code editing, every new PR for each function is recommended for easier review.

Reference:

@Limits0x
Copy link
Contributor

Should call_special_method be moved into vm/src/protocol/object.rs as well ?

@DimitrisJim
Copy link
Member

Nope, that's probably going to be part of another protocol file containing call related methods.

@Limits0x
Copy link
Contributor

So, that function can be called from vm/src/protocol/object.rs as vm.call_special_method ?

@DimitrisJim
Copy link
Member

yeah, call it directly via vm for now.

@youknowone
Copy link
Member Author

Thanks! This is finally done with all of your help!

@ChJR
Copy link
Contributor

ChJR commented Oct 23, 2021

Fabulous! I think this issue could be closed.

@youknowone
Copy link
Member Author

this is done! thank you everyone who contributed in this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-help-wanted Extra attention is needed good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants