go/src
Michael Munday 5654114d04 cmd/compile: use math/bits functions where possible
Use the math/bits functions to calculate the number of leading/
trailing zeros, bit length and the population count.

The math/bits package is built as part of the bootstrap process
so we do not need to provide an alternative implementation for
Go versions prior to 1.9.

Passes toolstash-check -all.

Change-Id: I393b4cc1c8accd0ca7cb3599d3926fa6319b574f
Reviewed-on: https://go-review.googlesource.com/113336
Run-TryBot: Michael Munday <mike.munday@ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-05-21 09:20:25 +00:00
..
archive archive/zip: avoid data descriptor when writing directories 2018-05-02 23:34:50 +00:00
bufio
builtin
bytes bytes, strings: improve EqualFold fast version for ASCII 2018-05-01 18:52:19 +00:00
cmd cmd/compile: use math/bits functions where possible 2018-05-21 09:20:25 +00:00
compress compress/flate: do not rename math/bits import 2018-05-07 15:42:46 +00:00
container
context
crypto cmd/compile,test: combine byte loads and stores on ppc64le 2018-05-08 13:15:39 +00:00
database/sql database/sql: add note to Scanner that the database owns values 2018-05-11 20:28:02 +00:00
debug debug/pe: parse the import directory correctly 2018-05-19 06:06:37 +00:00
encoding encoding/asn1: allow Marshaling and Unmarshaling private tag class 2018-05-17 18:06:38 +00:00
errors
expvar
flag
fmt
go go/parser: make sure we have a valid AST when 'if' condition is missing 2018-05-18 16:01:32 +00:00
hash
html html/template: always write untyped nil as JS null 2018-05-09 04:09:29 +00:00
image
index/suffixarray
internal internal/bytealg: add wasm architecture 2018-05-08 13:28:18 +00:00
io io: calculate buffer size only when needed 2018-05-06 15:52:31 +00:00
log all: skip unsupported tests for js/wasm 2018-04-30 19:39:18 +00:00
math math/rand: clarify documentation for Seed example 2018-05-12 06:21:01 +00:00
mime mime: do a pre-allocation in encodeWord 2018-05-15 16:20:14 +00:00
net net: skip external net tests on iOS 2018-05-17 14:27:12 +00:00
os os: remove superfluous comments 2018-05-02 14:41:57 +00:00
path path/filepath: make Abs("") return working directory on Windows 2018-05-14 04:41:33 +00:00
plugin plugin: make stub lookup signature match dlopen version 2018-05-08 17:09:05 +00:00
reflect reflect: use 'defined' rather than 'named', use 'embedded' rather than 'anonymous' 2018-05-10 23:19:40 +00:00
regexp
runtime runtime: use libc for nanotime on Darwin 2018-05-20 00:09:28 +00:00
sort
strconv strconv: update Unquote example to be more concise 2018-05-07 20:39:37 +00:00
strings strings: fix encoding of \u0080 in map 2018-05-04 05:37:45 +00:00
sync sync: deflake TestWaitGroupMisuse2 2018-05-14 04:42:45 +00:00
syscall misc/wasm: fix passing large negative integers from JS to Go 2018-05-15 14:15:44 +00:00
testing testing: allow marking subtest and subbenchmark functions as Helpers 2018-05-14 17:59:59 +00:00
text text/scanner: return RawString token rather than String for raw string literals 2018-05-08 04:59:41 +00:00
time cmd/vet: better align print warnings with fmt 2018-05-04 02:57:37 +00:00
unicode cmd/compile: optimize len([]rune(string)) 2018-05-06 05:31:01 +00:00
unsafe
vendor/golang_org/x vendor/golang_org/x/crypto: revendor 2018-05-15 16:29:04 +00:00
Make.dist
all.bash
all.bat
all.rc
androidtest.bash
bootstrap.bash
buildall.bash
clean.bash
clean.bat
clean.rc
cmp.bash
iostest.bash
make.bash src/*.bash: remove some trailing whitespace 2018-05-04 14:47:49 +00:00
make.bat
make.rc
naclmake.bash
nacltest.bash
race.bash src/*.bash: remove some trailing whitespace 2018-05-04 14:47:49 +00:00
race.bat
run.bash
run.bat
run.rc