mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Change cast and int rules: constant folding always starts. Promotion using left side on all operands to bit width. Implicit narrowing to max size on right hand side.
This commit is contained in:
committed by
Christoffer Lerno
parent
8a7f37e4d3
commit
07595df412
@@ -57,7 +57,7 @@ public func uint fnv32(char[] data)
|
||||
uint h = 0x811c9dc5;
|
||||
foreach (char x : data)
|
||||
{
|
||||
h = (h *% 0x01000193) ^ x;
|
||||
h = (h * 0x01000193) ^ x;
|
||||
}
|
||||
return h;
|
||||
}
|
||||
@@ -67,7 +67,7 @@ public func ulong fnv64(char[] data)
|
||||
ulong h = 0xcbf29ce484222325;
|
||||
foreach (char x : data)
|
||||
{
|
||||
h = (h *% 0x100000001b3) ^ x;
|
||||
h = (h * 0x100000001b3) ^ x;
|
||||
}
|
||||
return h;
|
||||
}
|
||||
@@ -77,7 +77,7 @@ public func uint fnv32a(char[] data)
|
||||
uint h = 0x811c9dc5;
|
||||
foreach (char x : data)
|
||||
{
|
||||
h = (h ^ x) *% 0x01000193;
|
||||
h = (h ^ x) * 0x01000193;
|
||||
}
|
||||
return h;
|
||||
}
|
||||
@@ -87,7 +87,7 @@ public func ulong fnv64a(char[] data)
|
||||
ulong h = 0xcbf29ce484222325;
|
||||
foreach (char x : data)
|
||||
{
|
||||
h = (h ^ x) *% 0x100000001b3;
|
||||
h = (h ^ x) * 0x100000001b3;
|
||||
}
|
||||
return h;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user