OLD | NEW |
1 part of dart.math; | 1 part of dart.math; |
2 class _JenkinsSmiHash {static int combine(int hash, int value) { | 2 class _JenkinsSmiHash {static int combine(int hash, int value) { |
3 hash = 0x1fffffff & (hash + value); | 3 hash = 0x1fffffff & (hash + value); |
4 hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10)); | 4 hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10)); |
5 return hash ^ (hash >> 6); | 5 return hash ^ (hash >> 6); |
6 } | 6 } |
7 static int finish(int hash) { | 7 static int finish(int hash) { |
8 hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3)); | 8 hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3)); |
9 hash = hash ^ (hash >> 11); | 9 hash = hash ^ (hash >> 11); |
10 return 0x1fffffff & (hash + ((0x00003fff & hash) << 15)); | 10 return 0x1fffffff & (hash + ((0x00003fff & hash) << 15)); |
11 } | 11 } |
12 static int hash2(a, b) => finish(combine(combine(0, DEVC$RT.cast(a, dynamic, in
t, "CastGeneral", """line 37, column 55 of dart:math/jenkins_smi_hash.dart: """,
a is int, true)), DEVC$RT.cast(b, dynamic, int, "CastGeneral", """line 37, colu
mn 59 of dart:math/jenkins_smi_hash.dart: """, b is int, true))); | 12 static int hash2(a, b) => finish(combine(combine(0, DEVC$RT.cast(a, dynamic, in
t, "DynamicCast", """line 37, column 55 of dart:math/jenkins_smi_hash.dart: """,
a is int, true)), DEVC$RT.cast(b, dynamic, int, "DynamicCast", """line 37, colu
mn 59 of dart:math/jenkins_smi_hash.dart: """, b is int, true))); |
13 static int hash4(a, b, c, d) => finish(combine(combine(combine(combine(0, DEVC$
RT.cast(a, dynamic, int, "CastGeneral", """line 40, column 49 of dart:math/jenki
ns_smi_hash.dart: """, a is int, true)), DEVC$RT.cast(b, dynamic, int, "CastGene
ral", """line 40, column 53 of dart:math/jenkins_smi_hash.dart: """, b is int, t
rue)), DEVC$RT.cast(c, dynamic, int, "CastGeneral", """line 40, column 57 of dar
t:math/jenkins_smi_hash.dart: """, c is int, true)), DEVC$RT.cast(d, dynamic, in
t, "CastGeneral", """line 40, column 61 of dart:math/jenkins_smi_hash.dart: """,
d is int, true))); | 13 static int hash4(a, b, c, d) => finish(combine(combine(combine(combine(0, DEVC$
RT.cast(a, dynamic, int, "DynamicCast", """line 40, column 49 of dart:math/jenki
ns_smi_hash.dart: """, a is int, true)), DEVC$RT.cast(b, dynamic, int, "DynamicC
ast", """line 40, column 53 of dart:math/jenkins_smi_hash.dart: """, b is int, t
rue)), DEVC$RT.cast(c, dynamic, int, "DynamicCast", """line 40, column 57 of dar
t:math/jenkins_smi_hash.dart: """, c is int, true)), DEVC$RT.cast(d, dynamic, in
t, "DynamicCast", """line 40, column 61 of dart:math/jenkins_smi_hash.dart: """,
d is int, true))); |
14 } | 14 } |
OLD | NEW |