1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-11-18 19:11:19 +00:00

use cheaper hash function for speed improvement

This commit is contained in:
Travis Fisher 2019-04-04 21:47:37 -04:00
parent 535b3fcb74
commit d3b4e895dc

View File

@ -207,7 +207,7 @@ public class ControlFlowBlock {
@Override @Override
public int hashCode() { public int hashCode() {
int result = label.hashCode(); int result = label.hashCode();
result = 31 * result + (statements != null ? statements.hashCode() : 0); result = 31 * result + statements.size();
result = 31 * result + (defaultSuccessor != null ? defaultSuccessor.hashCode() : 0); result = 31 * result + (defaultSuccessor != null ? defaultSuccessor.hashCode() : 0);
result = 31 * result + (conditionalSuccessor != null ? conditionalSuccessor.hashCode() : 0); result = 31 * result + (conditionalSuccessor != null ? conditionalSuccessor.hashCode() : 0);
result = 31 * result + (callSuccessor != null ? callSuccessor.hashCode() : 0); result = 31 * result + (callSuccessor != null ? callSuccessor.hashCode() : 0);