-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move code around and drop not needed pieces (#297)
- Loading branch information
1 parent
6f40c10
commit ed97cd7
Showing
7 changed files
with
127 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package space | ||
|
||
import ( | ||
"github.com/outofforest/quantum/types" | ||
) | ||
|
||
const ( | ||
// flagPointerNode says that this is pointer node. | ||
flagPointerNode = types.FlagNaked + 1 | ||
|
||
// flagHashMod says that key hash must be recalculated. | ||
flagHashMod = flagPointerNode << 1 | ||
) | ||
|
||
func isFree(address types.VolatileAddress) bool { | ||
return address == types.FreeAddress | ||
} | ||
|
||
func isPointer(address types.VolatileAddress) bool { | ||
return address.IsSet(flagPointerNode) | ||
} | ||
|
||
func isData(address types.VolatileAddress) bool { | ||
return !isFree(address) && !isPointer(address) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.