-
-
Notifications
You must be signed in to change notification settings - Fork 62
Closed
Labels
Description
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
toreads
/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 liketopn
andsetn
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.)