OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |