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

Side by Side Diff: src/objects.h

Issue 725633002: Revert "TransitionArray::Search() now returns insertion index if the entry was not found." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « no previous file | src/objects-inl.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 3133 matching lines...) Expand 10 before | Expand all | Expand 10 after
3144 3144
3145 // Swap first and second descriptor. 3145 // Swap first and second descriptor.
3146 inline void SwapSortedKeys(int first, int second); 3146 inline void SwapSortedKeys(int first, int second);
3147 3147
3148 DISALLOW_IMPLICIT_CONSTRUCTORS(DescriptorArray); 3148 DISALLOW_IMPLICIT_CONSTRUCTORS(DescriptorArray);
3149 }; 3149 };
3150 3150
3151 3151
3152 enum SearchMode { ALL_ENTRIES, VALID_ENTRIES }; 3152 enum SearchMode { ALL_ENTRIES, VALID_ENTRIES };
3153 3153
3154 template <SearchMode search_mode, typename T> 3154 template<SearchMode search_mode, typename T>
3155 inline int Search(T* array, Name* name, int valid_entries = 0, 3155 inline int LinearSearch(T* array, Name* name, int len, int valid_entries);
3156 int* out_insertion_index = NULL); 3156
3157
3158 template<SearchMode search_mode, typename T>
3159 inline int Search(T* array, Name* name, int valid_entries = 0);
3157 3160
3158 3161
3159 // HashTable is a subclass of FixedArray that implements a hash table 3162 // HashTable is a subclass of FixedArray that implements a hash table
3160 // that uses open addressing and quadratic probing. 3163 // that uses open addressing and quadratic probing.
3161 // 3164 //
3162 // In order for the quadratic probing to work, elements that have not 3165 // In order for the quadratic probing to work, elements that have not
3163 // yet been used and elements that have been deleted are 3166 // yet been used and elements that have been deleted are
3164 // distinguished. Probing continues when deleted elements are 3167 // distinguished. Probing continues when deleted elements are
3165 // encountered and stops when unused elements are encountered. 3168 // encountered and stops when unused elements are encountered.
3166 // 3169 //
(...skipping 7791 matching lines...) Expand 10 before | Expand all | Expand 10 after
10958 } else { 10961 } else {
10959 value &= ~(1 << bit_position); 10962 value &= ~(1 << bit_position);
10960 } 10963 }
10961 return value; 10964 return value;
10962 } 10965 }
10963 }; 10966 };
10964 10967
10965 } } // namespace v8::internal 10968 } } // namespace v8::internal
10966 10969
10967 #endif // V8_OBJECTS_H_ 10970 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « no previous file | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698