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

Unified Diff: src/x87/code-stubs-x87.cc

Issue 545093002: X87: Remove dead code for inline string hashing. (Closed) Base URL: https://github.com/v8/v8.git@bleeding_edge
Patch Set: Created 6 years, 3 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/x87/code-stubs-x87.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x87/code-stubs-x87.cc
diff --git a/src/x87/code-stubs-x87.cc b/src/x87/code-stubs-x87.cc
index a84438f4351a36d806c9cfc41f097003390b4686..0da86eb2101d2e669de7338b911f395830daba00 100644
--- a/src/x87/code-stubs-x87.cc
+++ b/src/x87/code-stubs-x87.cc
@@ -2570,74 +2570,6 @@ void StringHelper::GenerateCopyCharacters(MacroAssembler* masm,
}
-void StringHelper::GenerateHashInit(MacroAssembler* masm,
- Register hash,
- Register character,
- Register scratch) {
- // hash = (seed + character) + ((seed + character) << 10);
- if (masm->serializer_enabled()) {
- __ LoadRoot(scratch, Heap::kHashSeedRootIndex);
- __ SmiUntag(scratch);
- __ add(scratch, character);
- __ mov(hash, scratch);
- __ shl(scratch, 10);
- __ add(hash, scratch);
- } else {
- int32_t seed = masm->isolate()->heap()->HashSeed();
- __ lea(scratch, Operand(character, seed));
- __ shl(scratch, 10);
- __ lea(hash, Operand(scratch, character, times_1, seed));
- }
- // hash ^= hash >> 6;
- __ mov(scratch, hash);
- __ shr(scratch, 6);
- __ xor_(hash, scratch);
-}
-
-
-void StringHelper::GenerateHashAddCharacter(MacroAssembler* masm,
- Register hash,
- Register character,
- Register scratch) {
- // hash += character;
- __ add(hash, character);
- // hash += hash << 10;
- __ mov(scratch, hash);
- __ shl(scratch, 10);
- __ add(hash, scratch);
- // hash ^= hash >> 6;
- __ mov(scratch, hash);
- __ shr(scratch, 6);
- __ xor_(hash, scratch);
-}
-
-
-void StringHelper::GenerateHashGetHash(MacroAssembler* masm,
- Register hash,
- Register scratch) {
- // hash += hash << 3;
- __ mov(scratch, hash);
- __ shl(scratch, 3);
- __ add(hash, scratch);
- // hash ^= hash >> 11;
- __ mov(scratch, hash);
- __ shr(scratch, 11);
- __ xor_(hash, scratch);
- // hash += hash << 15;
- __ mov(scratch, hash);
- __ shl(scratch, 15);
- __ add(hash, scratch);
-
- __ and_(hash, String::kHashBitMask);
-
- // if (hash == 0) hash = 27;
- Label hash_not_zero;
- __ j(not_zero, &hash_not_zero, Label::kNear);
- __ mov(hash, Immediate(StringHasher::kZeroHash));
- __ bind(&hash_not_zero);
-}
-
-
void SubStringStub::Generate(MacroAssembler* masm) {
Label runtime;
« no previous file with comments | « src/x87/code-stubs-x87.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698