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

Side by Side Diff: src/stub-cache-ia32.cc

Issue 6489: Exclude the bit-field bits from string hash codes. String hash codes... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 years, 2 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/stub-cache-arm.cc ('k') | test/mjsunit/debug-evaluate-locals.js » ('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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 // Make sure that there are no register conflicts. 93 // Make sure that there are no register conflicts.
94 ASSERT(!scratch.is(receiver)); 94 ASSERT(!scratch.is(receiver));
95 ASSERT(!scratch.is(name)); 95 ASSERT(!scratch.is(name));
96 96
97 // Check that the receiver isn't a smi. 97 // Check that the receiver isn't a smi.
98 __ test(receiver, Immediate(kSmiTagMask)); 98 __ test(receiver, Immediate(kSmiTagMask));
99 __ j(zero, &miss, not_taken); 99 __ j(zero, &miss, not_taken);
100 100
101 // Get the map of the receiver and compute the hash. 101 // Get the map of the receiver and compute the hash.
102 __ mov(scratch, FieldOperand(receiver, HeapObject::kMapOffset)); 102 __ mov(scratch, FieldOperand(name, String::kLengthOffset));
103 __ add(scratch, FieldOperand(name, String::kLengthOffset)); 103 __ add(scratch, FieldOperand(receiver, HeapObject::kMapOffset));
104 __ xor_(scratch, flags); 104 __ xor_(scratch, flags);
105 __ and_(scratch, (kPrimaryTableSize - 1) << kHeapObjectTagSize); 105 __ and_(scratch, (kPrimaryTableSize - 1) << kHeapObjectTagSize);
106 106
107 // Probe the primary table. 107 // Probe the primary table.
108 ProbeTable(masm, flags, kPrimary, name, scratch); 108 ProbeTable(masm, flags, kPrimary, name, scratch);
109 109
110 // Primary miss: Compute hash for secondary probe. 110 // Primary miss: Compute hash for secondary probe.
111 __ sub(scratch, Operand(name)); 111 __ sub(scratch, Operand(name));
112 __ add(Operand(scratch), Immediate(flags)); 112 __ add(Operand(scratch), Immediate(flags));
113 __ and_(scratch, (kSecondaryTableSize - 1) << kHeapObjectTagSize); 113 __ and_(scratch, (kSecondaryTableSize - 1) << kHeapObjectTagSize);
(...skipping 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after
1241 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); 1241 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
1242 1242
1243 // Return the generated code. 1243 // Return the generated code.
1244 return GetCode(CALLBACKS); 1244 return GetCode(CALLBACKS);
1245 } 1245 }
1246 1246
1247 1247
1248 #undef __ 1248 #undef __
1249 1249
1250 } } // namespace v8::internal 1250 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/stub-cache-arm.cc ('k') | test/mjsunit/debug-evaluate-locals.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698