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

Side by Side Diff: src/arm/code-stubs-arm.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 | « no previous file | src/arm/macro-assembler-arm.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 5712 matching lines...) Expand 10 before | Expand all | Expand 10 after
5723 Register result = candidate; 5723 Register result = candidate;
5724 __ bind(&found_in_symbol_table); 5724 __ bind(&found_in_symbol_table);
5725 __ Move(r0, result); 5725 __ Move(r0, result);
5726 } 5726 }
5727 5727
5728 5728
5729 void StringHelper::GenerateHashInit(MacroAssembler* masm, 5729 void StringHelper::GenerateHashInit(MacroAssembler* masm,
5730 Register hash, 5730 Register hash,
5731 Register character) { 5731 Register character) {
5732 // hash = character + (character << 10); 5732 // hash = character + (character << 10);
5733 __ LoadRoot(hash, Heap::kStringHashSeedRootIndex); 5733 __ LoadRoot(hash, Heap::kHashSeedRootIndex);
5734 // Untag smi seed and add the character. 5734 // Untag smi seed and add the character.
5735 __ add(hash, character, Operand(hash, LSR, kSmiTagSize)); 5735 __ add(hash, character, Operand(hash, LSR, kSmiTagSize));
5736 // hash += hash << 10; 5736 // hash += hash << 10;
5737 __ add(hash, hash, Operand(hash, LSL, 10)); 5737 __ add(hash, hash, Operand(hash, LSL, 10));
5738 // hash ^= hash >> 6; 5738 // hash ^= hash >> 6;
5739 __ eor(hash, hash, Operand(hash, LSR, 6)); 5739 __ eor(hash, hash, Operand(hash, LSR, 6));
5740 } 5740 }
5741 5741
5742 5742
5743 void StringHelper::GenerateHashAddCharacter(MacroAssembler* masm, 5743 void StringHelper::GenerateHashAddCharacter(MacroAssembler* masm,
(...skipping 1569 matching lines...) Expand 10 before | Expand all | Expand 10 after
7313 __ StoreNumberToDoubleElements(r0, r3, r1, r5, r6, r7, r9, r10, 7313 __ StoreNumberToDoubleElements(r0, r3, r1, r5, r6, r7, r9, r10,
7314 &slow_elements); 7314 &slow_elements);
7315 __ Ret(); 7315 __ Ret();
7316 } 7316 }
7317 7317
7318 #undef __ 7318 #undef __
7319 7319
7320 } } // namespace v8::internal 7320 } } // namespace v8::internal
7321 7321
7322 #endif // V8_TARGET_ARCH_ARM 7322 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698