Skip to content

Commit

Permalink
fixed problem with max size of bitset when handling overtaken nullabl…
Browse files Browse the repository at this point in the history
…e nodes in parser.
  • Loading branch information
arnoldlankamp authored and jurgenvinju committed Sep 29, 2023
1 parent 3ac85d5 commit 7c15369
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/org/rascalmpl/parser/gtd/stack/AbstractStackNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ public int updateOvertakenNullableNode(AbstractStackNode<P> predecessor, Abstrac
if(prefixesMap == null){
prefixesMap = new ArrayList[possibleMaxSize];

propagatedPrefixes = new BitSet();
propagatedPrefixes = new BitSet(edgesMapSize);
}else{
if(prefixesMap.length < possibleMaxSize){
ArrayList<Link>[] oldPrefixesMap = prefixesMap;
Expand All @@ -649,7 +649,7 @@ public int updateOvertakenNullableNode(AbstractStackNode<P> predecessor, Abstrac
}

if(propagatedPrefixes == null){
propagatedPrefixes = new BitSet();
propagatedPrefixes = new BitSet(edgesMapSize);
}else{
propagatedPrefixes.enlargeTo(possibleMaxSize);
}
Expand Down

0 comments on commit 7c15369

Please sign in to comment.