Revision: 23714
Author: [email protected]
Date: Fri Sep 5 07:29:08 2014 UTC
Log: X87: Remove dead code for inline string hashing.
port r23689.
original commit message:
Remove dead code for inline string hashing.
This has become obsolete since hydrogenized StringAdd.
BUG=
[email protected]
Review URL: https://codereview.chromium.org/545093002
Patch from Jing Bao <[email protected]>.
https://code.google.com/p/v8/source/detail?r=23714
Modified:
/branches/bleeding_edge/src/x87/code-stubs-x87.cc
/branches/bleeding_edge/src/x87/code-stubs-x87.h
=======================================
--- /branches/bleeding_edge/src/x87/code-stubs-x87.cc Fri Sep 5 07:07:07
2014 UTC
+++ /branches/bleeding_edge/src/x87/code-stubs-x87.cc Fri Sep 5 07:29:08
2014 UTC
@@ -2568,74 +2568,6 @@
__ bind(&done);
}
-
-
-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) {
=======================================
--- /branches/bleeding_edge/src/x87/code-stubs-x87.h Fri Sep 5 07:07:07
2014 UTC
+++ /branches/bleeding_edge/src/x87/code-stubs-x87.h Fri Sep 5 07:29:08
2014 UTC
@@ -28,21 +28,6 @@
Register scratch,
String::Encoding encoding);
- // Generate string hash.
- static void GenerateHashInit(MacroAssembler* masm,
- Register hash,
- Register character,
- Register scratch);
-
- static void GenerateHashAddCharacter(MacroAssembler* masm,
- Register hash,
- Register character,
- Register scratch);
-
- static void GenerateHashGetHash(MacroAssembler* masm,
- Register hash,
- Register scratch);
-
// Compares two flat ASCII strings and returns result in eax.
static void GenerateCompareFlatAsciiStrings(MacroAssembler* masm,
Register left, Register
right,
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.