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

Side by Side Diff: src/arm/macro-assembler-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 | « src/arm/macro-assembler-arm.h ('k') | src/flag-definitions.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 1398 matching lines...) Expand 10 before | Expand all | Expand 10 after
1409 ldr(ip, FieldMemOperand(ip, token_offset)); 1409 ldr(ip, FieldMemOperand(ip, token_offset));
1410 cmp(scratch, Operand(ip)); 1410 cmp(scratch, Operand(ip));
1411 b(ne, miss); 1411 b(ne, miss);
1412 1412
1413 bind(&same_contexts); 1413 bind(&same_contexts);
1414 } 1414 }
1415 1415
1416 1416
1417 void MacroAssembler::GetNumberHash(Register t0, Register scratch) { 1417 void MacroAssembler::GetNumberHash(Register t0, Register scratch) {
1418 // First of all we assign the hash seed to scratch. 1418 // First of all we assign the hash seed to scratch.
1419 LoadRoot(scratch, Heap::kStringHashSeedRootIndex); 1419 LoadRoot(scratch, Heap::kHashSeedRootIndex);
1420 SmiUntag(scratch); 1420 SmiUntag(scratch);
1421 1421
1422 // Xor original key with a seed. 1422 // Xor original key with a seed.
1423 eor(t0, t0, Operand(scratch)); 1423 eor(t0, t0, Operand(scratch));
1424 1424
1425 // Compute the hash code from the untagged key. This must be kept in sync 1425 // Compute the hash code from the untagged key. This must be kept in sync
1426 // with ComputeIntegerHash in utils.h. 1426 // with ComputeIntegerHash in utils.h.
1427 // 1427 //
1428 // hash = ~hash + (hash << 15); 1428 // hash = ~hash + (hash << 15);
1429 mvn(scratch, Operand(t0)); 1429 mvn(scratch, Operand(t0));
(...skipping 2239 matching lines...) Expand 10 before | Expand all | Expand 10 after
3669 void CodePatcher::EmitCondition(Condition cond) { 3669 void CodePatcher::EmitCondition(Condition cond) {
3670 Instr instr = Assembler::instr_at(masm_.pc_); 3670 Instr instr = Assembler::instr_at(masm_.pc_);
3671 instr = (instr & ~kCondMask) | cond; 3671 instr = (instr & ~kCondMask) | cond;
3672 masm_.emit(instr); 3672 masm_.emit(instr);
3673 } 3673 }
3674 3674
3675 3675
3676 } } // namespace v8::internal 3676 } } // namespace v8::internal
3677 3677
3678 #endif // V8_TARGET_ARCH_ARM 3678 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698