@@ -1598,7 +1598,7 @@ static unsigned typekey_hash(jl_typename_t *tn, jl_value_t **key, size_t n, int
15981598 if (tn == jl_type_typename && key [0 ] == jl_bottom_type )
15991599 return jl_typeofbottom_type -> hash ;
16001600 size_t j ;
1601- unsigned hash = 0 ;
1601+ unsigned hash = 3 ;
16021602 int failed = nofail ;
16031603 for (j = 0 ; j < n ; j ++ ) {
16041604 jl_value_t * p = key [j ];
@@ -1608,16 +1608,16 @@ static unsigned typekey_hash(jl_typename_t *tn, jl_value_t **key, size_t n, int
16081608 if (vm -> N && jl_is_long (vm -> N ))
16091609 repeats = jl_unbox_long (vm -> N );
16101610 else
1611- hash = bitmix (hash , 0x064eeaab ); // 0x064eeaab is just a randomly chosen constant
1611+ hash = bitmix (0x064eeaab , hash ); // 0x064eeaab is just a randomly chosen constant
16121612 p = vm -> T ? vm -> T : (jl_value_t * )jl_any_type ;
16131613 }
16141614 unsigned hashp = type_hash (p , & failed );
16151615 if (failed && !nofail )
16161616 return 0 ;
16171617 while (repeats -- )
1618- hash = bitmix (hash , hashp );
1618+ hash = bitmix (hashp , hash );
16191619 }
1620- hash = bitmix (hash , ~tn -> hash );
1620+ hash = bitmix (~tn -> hash , hash );
16211621 return hash ? hash : 1 ;
16221622}
16231623
@@ -1636,9 +1636,9 @@ static unsigned typekeyvalue_hash(jl_typename_t *tn, jl_value_t *key1, jl_value_
16361636 else {
16371637 hj = ((jl_datatype_t * )jl_typeof (kj ))-> hash ;
16381638 }
1639- hash = bitmix (hash , hj );
1639+ hash = bitmix (hj , hash );
16401640 }
1641- hash = bitmix (hash , ~tn -> hash );
1641+ hash = bitmix (~tn -> hash , hash );
16421642 return hash ? hash : 1 ;
16431643}
16441644
0 commit comments