Skip to content

Sea of nodes representation #280

@kddnewton

Description

@kddnewton

A sea of nodes representation is a graph that has instructions as vertices and both control and data flow as edges. We've started this work with the CFG and DFG graphs. We should provide this information as a graph that you can access from both the library and ruby-syntax-tree.github.io.

There are a couple of things that need to happen to make this possible before the work can actually begin. This includes:

  • The API on instructions should change from pops/pushes to reads/writes, and they should no longer return an integer but an array. The array should be indices from the end of the stack. This is because instructions like topn and setn actually read and write from inside the stack, not the top. So these APIs should be updated to reflect that and the data flow should account for it. (Currently the data flow does not realize that these instructions modify other values in the stack, making it an incorrect representation.)

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