Skip to content

Relocate object protocol implementation from vm  #3324

Closed

Description

@youknowone

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:

Activity

  1. Limits0x commented on Oct 20, 2021

    @Limits0x
    Contributor

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

  2. DimitrisJim commented on Oct 20, 2021

    @DimitrisJim
    Member

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

  3. Limits0x commented on Oct 20, 2021

    @Limits0x
    Contributor

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

  4. DimitrisJim commented on Oct 20, 2021

    @DimitrisJim
    Member

    yeah, call it directly via vm for now.

  5. youknowone commented on Oct 23, 2021

    @youknowone
    MemberAuthor

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

  6. ChJR commented on Oct 23, 2021

    @ChJR
    Contributor

    Fabulous! I think this issue could be closed.

  7. youknowone commented on Nov 28, 2021

    @youknowone
    MemberAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions