Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Unified Diff: src/utils.h

Issue 646007: Kill some unused code. (Closed)
Patch Set: some more Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/log-utils.cc ('k') | src/utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils.h
diff --git a/src/utils.h b/src/utils.h
index 0fd24ec9a097745168dc75daa069c7985b882b72..c59ca258aac4681ddfacbe03dc1aadaee720de53 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -174,48 +174,6 @@ class BitField {
// ----------------------------------------------------------------------------
-// Support for compressed, machine-independent encoding
-// and decoding of integer values of arbitrary size.
-
-// Encoding and decoding from/to a buffer at position p;
-// the result is the position after the encoded integer.
-// Small signed integers in the range -64 <= x && x < 64
-// are encoded in 1 byte; larger values are encoded in 2
-// or more bytes. At most sizeof(int) + 1 bytes are used
-// in the worst case.
-byte* EncodeInt(byte* p, int x);
-byte* DecodeInt(byte* p, int* x);
-
-
-// Encoding and decoding from/to a buffer at position p - 1
-// moving backward; the result is the position of the last
-// byte written. These routines are useful to read/write
-// into a buffer starting at the end of the buffer.
-byte* EncodeUnsignedIntBackward(byte* p, unsigned int x);
-
-// The decoding function is inlined since its performance is
-// important to mark-sweep garbage collection.
-inline byte* DecodeUnsignedIntBackward(byte* p, unsigned int* x) {
- byte b = *--p;
- if (b >= 128) {
- *x = static_cast<unsigned int>(b) - 128;
- return p;
- }
- unsigned int r = static_cast<unsigned int>(b);
- unsigned int s = 7;
- b = *--p;
- while (b < 128) {
- r |= static_cast<unsigned int>(b) << s;
- s += 7;
- b = *--p;
- }
- // b >= 128
- *x = r | ((static_cast<unsigned int>(b) - 128) << s);
- return p;
-}
-
-
-// ----------------------------------------------------------------------------
// Hash function.
uint32_t ComputeIntegerHash(uint32_t key);
« no previous file with comments | « src/log-utils.cc ('k') | src/utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698