OLD | NEW |
1 // Copyright 2014 The Go Authors. All rights reserved. | 1 // Copyright 2014 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 package runtime | 5 package runtime |
6 | 6 |
7 import "unsafe" | 7 import "unsafe" |
8 | 8 |
9 const ( | 9 const ( |
10 » c0 = uintptr((8-uint64(ptrSize))/4*2860486313 + (uint64(ptrSize)-4)/4*33
054211828000289) | 10 » c0 = uintptr((8-ptrSize)/4*2860486313 + (ptrSize-4)/4*33054211828000289) |
11 » c1 = uintptr((8-uint64(ptrSize))/4*3267000013 + (uint64(ptrSize)-4)/4*23
344194077549503) | 11 » c1 = uintptr((8-ptrSize)/4*3267000013 + (ptrSize-4)/4*23344194077549503) |
12 ) | 12 ) |
13 | 13 |
14 const ( | 14 const ( |
15 alg_MEM = iota | 15 alg_MEM = iota |
16 alg_MEM0 | 16 alg_MEM0 |
17 alg_MEM8 | 17 alg_MEM8 |
18 alg_MEM16 | 18 alg_MEM16 |
19 alg_MEM32 | 19 alg_MEM32 |
20 alg_MEM64 | 20 alg_MEM64 |
21 alg_MEM128 | 21 alg_MEM128 |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 F() | 275 F() |
276 }, seed uintptr) uintptr { | 276 }, seed uintptr) uintptr { |
277 return goalg(&algarray[alg_INTER]).hash(noescape(unsafe.Pointer(&i)), un
safe.Sizeof(i), seed) | 277 return goalg(&algarray[alg_INTER]).hash(noescape(unsafe.Pointer(&i)), un
safe.Sizeof(i), seed) |
278 } | 278 } |
279 | 279 |
280 // Testing adapter for memclr | 280 // Testing adapter for memclr |
281 func memclrBytes(b []byte) { | 281 func memclrBytes(b []byte) { |
282 s := (*sliceStruct)(unsafe.Pointer(&b)) | 282 s := (*sliceStruct)(unsafe.Pointer(&b)) |
283 memclr(s.array, uintptr(s.len)) | 283 memclr(s.array, uintptr(s.len)) |
284 } | 284 } |
OLD | NEW |