Skip to content

Commit 427bbb7

Browse files
committed
simplify bootstrap; avoid vcat early in bootstrap order
1 parent 8ec7b41 commit 427bbb7

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

base/intfuncs.jl

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ function oct(x::Unsigned, pad::Int, neg::Bool)
827827
end
828828

829829
# 2-digit decimal characters ("00":"99")
830-
const _dec_d100 = UInt16[
830+
const _dec_d100 = [
831831
# generating expression: UInt16[(0x30 + i % 10) << 0x8 + (0x30 + i ÷ 10) for i = 0:99]
832832
# 0 0, 0 1, 0 2, 0 3, and so on in little-endian
833833
0x3030, 0x3130, 0x3230, 0x3330, 0x3430, 0x3530, 0x3630, 0x3730, 0x3830, 0x3930,
@@ -917,8 +917,16 @@ function hex(x::Unsigned, pad::Int, neg::Bool)
917917
unsafe_takestring(a)
918918
end
919919

920-
const base36digits = UInt8['0':'9';'a':'z']
921-
const base62digits = UInt8['0':'9';'A':'Z';'a':'z']
920+
# UInt8['0':'9';'a':'z']
921+
const base36digits = [0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,
922+
0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
923+
0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a]
924+
# UInt8['0':'9';'A':'Z';'a':'z']
925+
const base62digits = [0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,
926+
0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
927+
0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a,
928+
0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
929+
0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a]
922930

923931
function _base(base::Integer, x::Integer, pad::Int, neg::Bool)
924932
(x >= 0) | (base < 0) || throw(DomainError(x, "For negative `x`, `base` must be negative."))

0 commit comments

Comments
 (0)