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

Side by Side Diff: src/hashmap.cc

Issue 113447: Fix compilation on newer gcc by adding () instead of using prescendence. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 7 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 | 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 2008 the V8 project authors. All rights reserved. 1 // Copyright 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 if (q->key == NULL) { 122 if (q->key == NULL) {
123 break; 123 break;
124 } 124 }
125 125
126 // Find the initial position for the entry at position q. 126 // Find the initial position for the entry at position q.
127 Entry* r = map_ + (q->hash & (capacity_ - 1)); 127 Entry* r = map_ + (q->hash & (capacity_ - 1));
128 128
129 // If the entry at position q has its initial position outside the range 129 // If the entry at position q has its initial position outside the range
130 // between p and q it can be moved forward to position p and will still be 130 // between p and q it can be moved forward to position p and will still be
131 // found. There is now a new candidate entry for clearing. 131 // found. There is now a new candidate entry for clearing.
132 if (q > p && (r <= p || r > q) || 132 if ((q > p && (r <= p || r > q)) ||
133 q < p && (r <= p && r > q)) { 133 (q < p && (r <= p && r > q))) {
134 *p = *q; 134 *p = *q;
135 p = q; 135 p = q;
136 } 136 }
137 } 137 }
138 138
139 // Clear the entry which is allowed to en emptied. 139 // Clear the entry which is allowed to en emptied.
140 p->key = NULL; 140 p->key = NULL;
141 occupancy_--; 141 occupancy_--;
142 } 142 }
143 143
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 n--; 212 n--;
213 } 213 }
214 } 214 }
215 215
216 // Delete old map. 216 // Delete old map.
217 allocator_->Delete(map); 217 allocator_->Delete(map);
218 } 218 }
219 219
220 220
221 } } // namespace v8::internal 221 } } // 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