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

Side by Side Diff: src/arm/ic-arm.cc

Issue 441014: Added an ASSERT to code from r3350 (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years 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 | no next file » | 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 // giving up. Measurements done on Gmail indicate that 2 probes 105 // giving up. Measurements done on Gmail indicate that 2 probes
106 // cover ~93% of loads from dictionaries. 106 // cover ~93% of loads from dictionaries.
107 static const int kProbes = 4; 107 static const int kProbes = 4;
108 for (int i = 0; i < kProbes; i++) { 108 for (int i = 0; i < kProbes; i++) {
109 // Compute the masked index: (hash + i + i * i) & mask. 109 // Compute the masked index: (hash + i + i * i) & mask.
110 __ ldr(t1, FieldMemOperand(r2, String::kHashFieldOffset)); 110 __ ldr(t1, FieldMemOperand(r2, String::kHashFieldOffset));
111 if (i > 0) { 111 if (i > 0) {
112 // Add the probe offset (i + i * i) left shifted to avoid right shifting 112 // Add the probe offset (i + i * i) left shifted to avoid right shifting
113 // the hash in a separate instruction. The value hash + i + i * i is right 113 // the hash in a separate instruction. The value hash + i + i * i is right
114 // shifted in the following and instruction. 114 // shifted in the following and instruction.
115 ASSERT(StringDictionary::GetProbeOffset(i) <
116 1 << (32 - String::kHashFieldOffset));
115 __ add(t1, t1, Operand( 117 __ add(t1, t1, Operand(
116 StringDictionary::GetProbeOffset(i) << String::kHashFieldOffset)); 118 StringDictionary::GetProbeOffset(i) << String::kHashFieldOffset));
117 } 119 }
118 __ and_(t1, r3, Operand(t1, LSR, String::kHashShift)); 120 __ and_(t1, r3, Operand(t1, LSR, String::kHashShift));
119 121
120 // Scale the index by multiplying by the element size. 122 // Scale the index by multiplying by the element size.
121 ASSERT(StringDictionary::kEntrySize == 3); 123 ASSERT(StringDictionary::kEntrySize == 3);
122 __ add(t1, t1, Operand(t1, LSL, 1)); // t1 = t1 * 3 124 __ add(t1, t1, Operand(t1, LSL, 1)); // t1 = t1 * 3
123 125
124 // Check if the key is identical to the name. 126 // Check if the key is identical to the name.
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 834
833 // Perform tail call to the entry. 835 // Perform tail call to the entry.
834 __ TailCallRuntime(f, 3, 1); 836 __ TailCallRuntime(f, 3, 1);
835 } 837 }
836 838
837 839
838 #undef __ 840 #undef __
839 841
840 842
841 } } // namespace v8::internal 843 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698