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

Side by Side Diff: src/mips/code-stubs-mips.cc

Issue 9155010: Minor cleanups of numeric seeded hashing patch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/mips/macro-assembler-mips.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 5909 matching lines...) Expand 10 before | Expand all | Expand 10 after
5920 Register result = candidate; 5920 Register result = candidate;
5921 __ bind(&found_in_symbol_table); 5921 __ bind(&found_in_symbol_table);
5922 __ mov(v0, result); 5922 __ mov(v0, result);
5923 } 5923 }
5924 5924
5925 5925
5926 void StringHelper::GenerateHashInit(MacroAssembler* masm, 5926 void StringHelper::GenerateHashInit(MacroAssembler* masm,
5927 Register hash, 5927 Register hash,
5928 Register character) { 5928 Register character) {
5929 // hash = seed + character + ((seed + character) << 10); 5929 // hash = seed + character + ((seed + character) << 10);
5930 __ LoadRoot(hash, Heap::kStringHashSeedRootIndex); 5930 __ LoadRoot(hash, Heap::kHashSeedRootIndex);
5931 // Untag smi seed and add the character. 5931 // Untag smi seed and add the character.
5932 __ SmiUntag(hash); 5932 __ SmiUntag(hash);
5933 __ addu(hash, hash, character); 5933 __ addu(hash, hash, character);
5934 __ sll(at, hash, 10); 5934 __ sll(at, hash, 10);
5935 __ addu(hash, hash, at); 5935 __ addu(hash, hash, at);
5936 // hash ^= hash >> 6; 5936 // hash ^= hash >> 6;
5937 __ srl(at, hash, 6); 5937 __ srl(at, hash, 6);
5938 __ xor_(hash, hash, at); 5938 __ xor_(hash, hash, at);
5939 } 5939 }
5940 5940
(...skipping 1640 matching lines...) Expand 10 before | Expand all | Expand 10 after
7581 __ Ret(USE_DELAY_SLOT); 7581 __ Ret(USE_DELAY_SLOT);
7582 __ mov(v0, a0); 7582 __ mov(v0, a0);
7583 } 7583 }
7584 7584
7585 7585
7586 #undef __ 7586 #undef __
7587 7587
7588 } } // namespace v8::internal 7588 } } // namespace v8::internal
7589 7589
7590 #endif // V8_TARGET_ARCH_MIPS 7590 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/mips/macro-assembler-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698