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

Unified Diff: src/utils.cc

Issue 660095: Merge revision 3813 to 3930 from bleeding_edge to partial snapshots branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/partial_snapshots/
Patch Set: '' 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/utils.h ('k') | src/v8-counters.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils.cc
===================================================================
--- src/utils.cc (revision 3935)
+++ src/utils.cc (working copy)
@@ -51,43 +51,6 @@
}
-byte* EncodeInt(byte* p, int x) {
- while (x < -64 || x >= 64) {
- *p++ = static_cast<byte>(x & 127);
- x = ArithmeticShiftRight(x, 7);
- }
- // -64 <= x && x < 64
- *p++ = static_cast<byte>(x + 192);
- return p;
-}
-
-
-byte* DecodeInt(byte* p, int* x) {
- int r = 0;
- unsigned int s = 0;
- byte b = *p++;
- while (b < 128) {
- r |= static_cast<int>(b) << s;
- s += 7;
- b = *p++;
- }
- // b >= 128
- *x = r | ((static_cast<int>(b) - 192) << s);
- return p;
-}
-
-
-byte* EncodeUnsignedIntBackward(byte* p, unsigned int x) {
- while (x >= 128) {
- *--p = static_cast<byte>(x & 127);
- x = x >> 7;
- }
- // x < 128
- *--p = static_cast<byte>(x + 128);
- return p;
-}
-
-
// Thomas Wang, Integer Hash Functions.
// http://www.concentric.net/~Ttwang/tech/inthash.htm
uint32_t ComputeIntegerHash(uint32_t key) {
« no previous file with comments | « src/utils.h ('k') | src/v8-counters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698