mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
Revert "_vinit: use static initialization of large const []number"
This reverts commit b306c04e99
.
This commit is contained in:
parent
b306c04e99
commit
0a07dc5762
@ -8,13 +8,13 @@ const (
|
|||||||
de_bruijn32 = u32(0x077CB531)
|
de_bruijn32 = u32(0x077CB531)
|
||||||
de_bruijn32tab = [byte(0), 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8,
|
de_bruijn32tab = [byte(0), 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8,
|
||||||
31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9,
|
31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9,
|
||||||
]!!
|
]
|
||||||
de_bruijn64 = u64(0x03f79d71b4ca8b09)
|
de_bruijn64 = u64(0x03f79d71b4ca8b09)
|
||||||
de_bruijn64tab = [byte(0), 1, 56, 2, 57, 49, 28, 3, 61, 58, 42, 50, 38, 29, 17, 4,
|
de_bruijn64tab = [byte(0), 1, 56, 2, 57, 49, 28, 3, 61, 58, 42, 50, 38, 29, 17, 4,
|
||||||
62, 47, 59, 36, 45, 43, 51, 22, 53, 39, 33, 30, 24, 18, 12, 5,
|
62, 47, 59, 36, 45, 43, 51, 22, 53, 39, 33, 30, 24, 18, 12, 5,
|
||||||
63, 55, 48, 27, 60, 41, 37, 16, 46, 35, 44, 21, 52, 32, 23, 11,
|
63, 55, 48, 27, 60, 41, 37, 16, 46, 35, 44, 21, 52, 32, 23, 11,
|
||||||
54, 26, 40, 15, 34, 20, 31, 10, 25, 14, 19, 9, 13, 8, 7, 6,
|
54, 26, 40, 15, 34, 20, 31, 10, 25, 14, 19, 9, 13, 8, 7, 6,
|
||||||
]!!
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -20,7 +20,7 @@ const (
|
|||||||
0x04, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00,
|
0x04, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00,
|
||||||
0x05, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00,
|
0x05, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00,
|
||||||
0x04, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00,
|
0x04, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00,
|
||||||
]!!
|
]
|
||||||
pop_8_tab = [byte(0x00), 0x01, 0x01, 0x02, 0x01, 0x02, 0x02, 0x03, 0x01, 0x02, 0x02, 0x03, 0x02, 0x03, 0x03, 0x04,
|
pop_8_tab = [byte(0x00), 0x01, 0x01, 0x02, 0x01, 0x02, 0x02, 0x03, 0x01, 0x02, 0x02, 0x03, 0x02, 0x03, 0x03, 0x04,
|
||||||
0x01, 0x02, 0x02, 0x03, 0x02, 0x03, 0x03, 0x04, 0x02, 0x03, 0x03, 0x04, 0x03, 0x04, 0x04, 0x05,
|
0x01, 0x02, 0x02, 0x03, 0x02, 0x03, 0x03, 0x04, 0x02, 0x03, 0x03, 0x04, 0x03, 0x04, 0x04, 0x05,
|
||||||
0x01, 0x02, 0x02, 0x03, 0x02, 0x03, 0x03, 0x04, 0x02, 0x03, 0x03, 0x04, 0x03, 0x04, 0x04, 0x05,
|
0x01, 0x02, 0x02, 0x03, 0x02, 0x03, 0x03, 0x04, 0x02, 0x03, 0x03, 0x04, 0x03, 0x04, 0x04, 0x05,
|
||||||
@ -37,7 +37,7 @@ const (
|
|||||||
0x03, 0x04, 0x04, 0x05, 0x04, 0x05, 0x05, 0x06, 0x04, 0x05, 0x05, 0x06, 0x05, 0x06, 0x06, 0x07,
|
0x03, 0x04, 0x04, 0x05, 0x04, 0x05, 0x05, 0x06, 0x04, 0x05, 0x05, 0x06, 0x05, 0x06, 0x06, 0x07,
|
||||||
0x03, 0x04, 0x04, 0x05, 0x04, 0x05, 0x05, 0x06, 0x04, 0x05, 0x05, 0x06, 0x05, 0x06, 0x06, 0x07,
|
0x03, 0x04, 0x04, 0x05, 0x04, 0x05, 0x05, 0x06, 0x04, 0x05, 0x05, 0x06, 0x05, 0x06, 0x06, 0x07,
|
||||||
0x04, 0x05, 0x05, 0x06, 0x05, 0x06, 0x06, 0x07, 0x05, 0x06, 0x06, 0x07, 0x06, 0x07, 0x07, 0x08,
|
0x04, 0x05, 0x05, 0x06, 0x05, 0x06, 0x06, 0x07, 0x05, 0x06, 0x06, 0x07, 0x06, 0x07, 0x07, 0x08,
|
||||||
]!!
|
]
|
||||||
rev_8_tab = [byte(0x00), 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
|
rev_8_tab = [byte(0x00), 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
|
||||||
0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8,
|
0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8,
|
||||||
0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4, 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4,
|
0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4, 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4,
|
||||||
@ -54,7 +54,7 @@ const (
|
|||||||
0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb, 0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb,
|
0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb, 0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb,
|
||||||
0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7, 0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7,
|
0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7, 0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7,
|
||||||
0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef, 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff,
|
0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef, 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff,
|
||||||
]!!
|
]
|
||||||
len_8_tab = [byte(0x00), 0x01, 0x02, 0x02, 0x03, 0x03, 0x03, 0x03, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
|
len_8_tab = [byte(0x00), 0x01, 0x02, 0x02, 0x03, 0x03, 0x03, 0x03, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
|
||||||
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
|
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
|
||||||
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
|
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
|
||||||
@ -71,6 +71,6 @@ const (
|
|||||||
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
|
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
|
||||||
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
|
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
|
||||||
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
|
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
|
||||||
]!!
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ const(
|
|||||||
0.0000000000000000044,
|
0.0000000000000000044,
|
||||||
0.00000000000000000044,
|
0.00000000000000000044,
|
||||||
0.000000000000000000044,
|
0.000000000000000000044,
|
||||||
]!!
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
// max float 1.797693134862315708145274237317043567981e+308
|
// max float 1.797693134862315708145274237317043567981e+308
|
||||||
|
@ -48,7 +48,7 @@ const(
|
|||||||
u32(1000000000),
|
u32(1000000000),
|
||||||
u32(10000000000),
|
u32(10000000000),
|
||||||
u32(100000000000),
|
u32(100000000000),
|
||||||
]!!
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -62,7 +62,7 @@ const(
|
|||||||
u64(100000000000000000),
|
u64(100000000000000000),
|
||||||
u64(1000000000000000000),
|
u64(1000000000000000000),
|
||||||
u64(10000000000000000000),
|
u64(10000000000000000000),
|
||||||
]!!
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -26,7 +26,7 @@ powers_of_10 = [
|
|||||||
u64(1e16),
|
u64(1e16),
|
||||||
u64(1e17)
|
u64(1e17)
|
||||||
// We only need to find the length of at most 17 digit numbers.
|
// We only need to find the length of at most 17 digit numbers.
|
||||||
]!!
|
]
|
||||||
|
|
||||||
pow5_split_32 = [
|
pow5_split_32 = [
|
||||||
u64(1152921504606846976), u64(1441151880758558720), u64(1801439850948198400), u64(2251799813685248000),
|
u64(1152921504606846976), u64(1441151880758558720), u64(1801439850948198400), u64(2251799813685248000),
|
||||||
@ -41,7 +41,7 @@ pow5_split_32 = [
|
|||||||
u64(1734723475976807094), u64(2168404344971008868), u64(1355252715606880542), u64(1694065894508600678),
|
u64(1734723475976807094), u64(2168404344971008868), u64(1355252715606880542), u64(1694065894508600678),
|
||||||
u64(2117582368135750847), u64(1323488980084844279), u64(1654361225106055349), u64(2067951531382569187),
|
u64(2117582368135750847), u64(1323488980084844279), u64(1654361225106055349), u64(2067951531382569187),
|
||||||
u64(1292469707114105741), u64(1615587133892632177), u64(2019483917365790221)
|
u64(1292469707114105741), u64(1615587133892632177), u64(2019483917365790221)
|
||||||
]!!
|
]
|
||||||
|
|
||||||
pow5_inv_split_32 = [
|
pow5_inv_split_32 = [
|
||||||
u64(576460752303423489), u64(461168601842738791), u64(368934881474191033), u64(295147905179352826),
|
u64(576460752303423489), u64(461168601842738791), u64(368934881474191033), u64(295147905179352826),
|
||||||
@ -52,7 +52,7 @@ pow5_inv_split_32 = [
|
|||||||
u64(425352958651173080), u64(340282366920938464), u64(544451787073501542), u64(435561429658801234),
|
u64(425352958651173080), u64(340282366920938464), u64(544451787073501542), u64(435561429658801234),
|
||||||
u64(348449143727040987), u64(557518629963265579), u64(446014903970612463), u64(356811923176489971),
|
u64(348449143727040987), u64(557518629963265579), u64(446014903970612463), u64(356811923176489971),
|
||||||
u64(570899077082383953), u64(456719261665907162), u64(365375409332725730)
|
u64(570899077082383953), u64(456719261665907162), u64(365375409332725730)
|
||||||
]!!
|
]
|
||||||
|
|
||||||
pow5_split_64 =[
|
pow5_split_64 =[
|
||||||
Uint128{u64(0x0000000000000000), u64(0x0100000000000000)},
|
Uint128{u64(0x0000000000000000), u64(0x0100000000000000)},
|
||||||
@ -381,7 +381,7 @@ pow5_split_64 =[
|
|||||||
Uint128{u64(0x848ce53c07bb3daf), u64(0x01f9ec583bdc7058)},
|
Uint128{u64(0x848ce53c07bb3daf), u64(0x01f9ec583bdc7058)},
|
||||||
Uint128{u64(0x52d80f4584d5068d), u64(0x013c33b72569c637)},
|
Uint128{u64(0x52d80f4584d5068d), u64(0x013c33b72569c637)},
|
||||||
Uint128{u64(0x278e1316e60a4831), u64(0x018b40a4eec437c5)}
|
Uint128{u64(0x278e1316e60a4831), u64(0x018b40a4eec437c5)}
|
||||||
]!!
|
]
|
||||||
|
|
||||||
pow5_inv_split_64 = [
|
pow5_inv_split_64 = [
|
||||||
Uint128{u64(0x0000000000000001), u64(0x0400000000000000)},
|
Uint128{u64(0x0000000000000001), u64(0x0400000000000000)},
|
||||||
@ -676,5 +676,5 @@ pow5_inv_split_64 = [
|
|||||||
Uint128{u64(0x952c15cca1ad12b5), u64(0x03e5eb8f434911bc)},
|
Uint128{u64(0x952c15cca1ad12b5), u64(0x03e5eb8f434911bc)},
|
||||||
Uint128{u64(0x775677d6e7bda891), u64(0x031e560c35d40e30)},
|
Uint128{u64(0x775677d6e7bda891), u64(0x031e560c35d40e30)},
|
||||||
Uint128{u64(0xc5dec645863153a7), u64(0x027eab3cf7dcd826)}
|
Uint128{u64(0xc5dec645863153a7), u64(0x027eab3cf7dcd826)}
|
||||||
]!!
|
]
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user