be-tree icon indicating copy to clipboard operation
be-tree copied to clipboard

Replace map and jsw_rbtree for something better and tested

Open FrankBro opened this issue 6 years ago • 0 comments

I've grabbed these two data structures because I could run a lot of tests with our data and make sure there was no leaks or segfaults but they were grabbed out of laziness. They should be replaced by something that makes sense for each case.

  • For map: This is actually a hashmap used to replace string comparisons with integers. During insertion, if not in the map, add in the map with a new unique id. If in the map, use that id. During search, if in the map use the id, otherwise use an invalid id.
  • For jsw_rbtree: This is used to store the different unique predicates. Possibly, this should also be a hashmap, provided we can hash an ast_node.

FrankBro avatar Feb 05 '19 18:02 FrankBro