wip: adding instruction inputs and outputs

This commit is contained in:
Michael McLoughlin
2018-12-02 17:57:12 -08:00
parent f18271ada5
commit 82b31fa0da
15 changed files with 18157 additions and 7650 deletions

View File

@@ -108,12 +108,16 @@ func ActionFromReadWrite(r, w bool) Action {
return a
}
func (a Action) Contains(s Action) bool {
return (a & s) == s
}
func (a Action) Read() bool {
return (a & R) != 0
return a.Contains(R)
}
func (a Action) Write() bool {
return (a & W) != 0
return a.Contains(W)
}
func (a Action) String() string {