Remove obsolete NumUtil C32/C64 code.
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/c1af0933 Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/c1af0933 Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/c1af0933 Branch: refs/heads/master Commit: c1af09331739ee47e4a9dc138b7dd0265ba74497 Parents: 67656d9 Author: Marvin Humphrey <mar...@rectangular.com> Authored: Mon Apr 18 18:45:19 2016 -0700 Committer: Marvin Humphrey <mar...@rectangular.com> Committed: Mon Apr 18 18:45:19 2016 -0700 ---------------------------------------------------------------------- core/Lucy/Util/NumberUtils.cfh | 73 ------------------------------------- 1 file changed, 73 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy/blob/c1af0933/core/Lucy/Util/NumberUtils.cfh ---------------------------------------------------------------------- diff --git a/core/Lucy/Util/NumberUtils.cfh b/core/Lucy/Util/NumberUtils.cfh index 8d1b0b1..7928906 100644 --- a/core/Lucy/Util/NumberUtils.cfh +++ b/core/Lucy/Util/NumberUtils.cfh @@ -80,13 +80,6 @@ inert class Lucy::Util::NumberUtils nickname NumUtil { inert inline double decode_bigend_f64(const void *source); - /** Encode a C32 at the space pointed to by `dest`. As a side - * effect, `dest` will be advanced to immediately after the end - * of the C32. - */ - inert inline void - encode_c32(uint32_t value, char **dest); - /** Encode a compressed 32-bit signed integer at the space pointed to by * `dest`. As a side effect, `dest` will be advanced to immediately after * the end of the compressed data. @@ -101,14 +94,6 @@ inert class Lucy::Util::NumberUtils nickname NumUtil { inert inline void encode_cu32(uint32_t value, char **dest); - /** Encode a C32 at the space pointed to by `dest`, but add - * "leading zeroes" so that the space consumed will always be 5 bytes. As - * a side effect, `dest` will be advanced to immediately after - * the end of the C32. - */ - inert inline void - encode_padded_c32(uint32_t value, char **dest); - /** Encode a compressed 32-bit unsigned integer at the space pointed to by * `dest`, but add "leading zeroes" so that the space consumed will always * be 5 bytes. As a side effect, `dest` will be advanced to immediately @@ -117,13 +102,6 @@ inert class Lucy::Util::NumberUtils nickname NumUtil { inert inline void encode_padded_cu32(uint32_t value, char **dest); - /** Encode a C64 at the space pointed to by `dest`. As a side - * effect, `dest` will be advanced to immediately after the end - * of the C64. - */ - inert inline void - encode_c64(uint64_t value, char **dest); - /** Encode a compressed 64-bit signed integer at the space pointed to by * `dest`. As a side effect, `dest` will be advanced to immediately after * the end of the compressed data. @@ -138,13 +116,6 @@ inert class Lucy::Util::NumberUtils nickname NumUtil { inert inline void encode_cu64(uint64_t value, char **dest); - /** Read a C32 from the buffer pointed to by `source`. As a - * side effect, advance the pointer, consuming the bytes occupied by the - * C32. - */ - inert inline uint32_t - decode_c32(const char **source); - /** Read a compressed 32-bit signed integer from the buffer pointed to * by `source`. As a side effect, advance the pointer, consuming the * bytes occupied by the compressed number. @@ -159,13 +130,6 @@ inert class Lucy::Util::NumberUtils nickname NumUtil { inert inline uint32_t decode_cu32(const char **source); - /** Read a C64 from the buffer pointed to by `source`. As a - * side effect, advance the pointer, consuming the bytes occupied by the - * C64. - */ - inert inline uint64_t - decode_c64(const char **source); - /** Read a compressed 64-bit signed integer from the buffer pointed to * by `source`. As a side effect, advance the pointer, consuming the * bytes occupied by the compressed number. @@ -358,19 +322,12 @@ lucy_NumUtil_decode_bigend_f64(const void *source) { return duo.d; } -#define LUCY_NUMUTIL_C32_MAX_BYTES ((sizeof(uint32_t) * 8 / 7) + 1) /* 5 */ -#define LUCY_NUMUTIL_C64_MAX_BYTES ((sizeof(uint64_t) * 8 / 7) + 1) /* 10 */ #define LUCY_NUMUTIL_CI32_MAX_BYTES ((sizeof(int32_t) * 8 / 7) + 1) /* 5 */ #define LUCY_NUMUTIL_CU32_MAX_BYTES ((sizeof(uint32_t) * 8 / 7) + 1) /* 5 */ #define LUCY_NUMUTIL_CI64_MAX_BYTES ((sizeof(int64_t) * 8 / 7) + 1) /* 10 */ #define LUCY_NUMUTIL_CU64_MAX_BYTES ((sizeof(uint64_t) * 8 / 7) + 1) /* 10 */ static CFISH_INLINE void -lucy_NumUtil_encode_c32(uint32_t value, char **out_buf) { - lucy_NumUtil_encode_cu32(value, out_buf); -} - -static CFISH_INLINE void lucy_NumUtil_encode_ci32(int32_t value, char **out_buf) { lucy_NumUtil_encode_cu32((uint32_t)value, out_buf); } @@ -395,11 +352,6 @@ lucy_NumUtil_encode_cu32(uint32_t value, char **out_buf) { } static CFISH_INLINE void -lucy_NumUtil_encode_c64(uint64_t value, char **out_buf) { - lucy_NumUtil_encode_cu64(value, out_buf); -} - -static CFISH_INLINE void lucy_NumUtil_encode_ci64(int64_t value, char **out_buf) { lucy_NumUtil_encode_cu64((uint64_t)value, out_buf); } @@ -424,11 +376,6 @@ lucy_NumUtil_encode_cu64(uint64_t value, char **out_buf) { } static CFISH_INLINE void -lucy_NumUtil_encode_padded_c32(uint32_t value, char **out_buf) { - lucy_NumUtil_encode_padded_cu32(value, out_buf); -} - -static CFISH_INLINE void lucy_NumUtil_encode_padded_cu32(uint32_t value, char **out_buf) { uint8_t buf[LUCY_NUMUTIL_CU32_MAX_BYTES] = { 0x80, 0x80, 0x80, 0x80, 0x80 }; @@ -455,15 +402,6 @@ lucy_NumUtil_encode_padded_cu32(uint32_t value, char **out_buf) { } \ } while (0) -static CFISH_INLINE uint32_t -lucy_NumUtil_decode_c32(const char **source_ptr) { - const char *source = *source_ptr; - uint32_t decoded; - LUCY_NUMUTIL_DECODE_CINT(decoded, source); - *source_ptr = source; - return decoded; -} - static CFISH_INLINE int32_t lucy_NumUtil_decode_ci32(const char **source_ptr) { return (int32_t)lucy_NumUtil_decode_cu32(source_ptr); @@ -478,15 +416,6 @@ lucy_NumUtil_decode_cu32(const char **source_ptr) { return decoded; } -static CFISH_INLINE uint64_t -lucy_NumUtil_decode_c64(const char **source_ptr) { - const char *source = *source_ptr; - uint64_t decoded; - LUCY_NUMUTIL_DECODE_CINT(decoded, source); - *source_ptr = source; - return decoded; -} - static CFISH_INLINE int64_t lucy_NumUtil_decode_ci64(const char **source_ptr) { return (int64_t)lucy_NumUtil_decode_cu64(source_ptr); @@ -578,8 +507,6 @@ lucy_NumUtil_u4set(void *array, uint32_t tick, uint8_t value) { } #ifdef LUCY_USE_SHORT_NAMES - #define C32_MAX_BYTES LUCY_NUMUTIL_C32_MAX_BYTES - #define C64_MAX_BYTES LUCY_NUMUTIL_C64_MAX_BYTES #define CI32_MAX_BYTES LUCY_NUMUTIL_CI32_MAX_BYTES #define CI64_MAX_BYTES LUCY_NUMUTIL_CI64_MAX_BYTES #define CU32_MAX_BYTES LUCY_NUMUTIL_CU32_MAX_BYTES