OLD | NEW |
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 3169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3180 // No special elements in the prefix and the element size is 1 | 3180 // No special elements in the prefix and the element size is 1 |
3181 // because only the string itself (the key) needs to be stored. | 3181 // because only the string itself (the key) needs to be stored. |
3182 class StringTable: public HashTable<StringTable, | 3182 class StringTable: public HashTable<StringTable, |
3183 StringTableShape, | 3183 StringTableShape, |
3184 HashTableKey*> { | 3184 HashTableKey*> { |
3185 public: | 3185 public: |
3186 // Find string in the string table. If it is not there yet, it is | 3186 // Find string in the string table. If it is not there yet, it is |
3187 // added. The return value is the string found. | 3187 // added. The return value is the string found. |
3188 static Handle<String> LookupString(Isolate* isolate, Handle<String> key); | 3188 static Handle<String> LookupString(Isolate* isolate, Handle<String> key); |
3189 static Handle<String> LookupKey(Isolate* isolate, HashTableKey* key); | 3189 static Handle<String> LookupKey(Isolate* isolate, HashTableKey* key); |
| 3190 static String* LookupKeyIfExists(Isolate* isolate, HashTableKey* key); |
3190 | 3191 |
3191 // Tries to internalize given string and returns string handle on success | 3192 // Tries to internalize given string and returns string handle on success |
3192 // or an empty handle otherwise. | 3193 // or an empty handle otherwise. |
3193 MUST_USE_RESULT static MaybeHandle<String> InternalizeStringIfExists( | 3194 MUST_USE_RESULT static MaybeHandle<String> InternalizeStringIfExists( |
3194 Isolate* isolate, | 3195 Isolate* isolate, |
3195 Handle<String> string); | 3196 Handle<String> string); |
3196 | 3197 |
3197 // Looks up a string that is equal to the given string and returns | 3198 // Looks up a string that is equal to the given string and returns |
3198 // string handle if it is found, or an empty handle otherwise. | 3199 // string handle if it is found, or an empty handle otherwise. |
3199 MUST_USE_RESULT static MaybeHandle<String> LookupStringIfExists( | 3200 MUST_USE_RESULT static MaybeHandle<String> LookupStringIfExists( |
(...skipping 7606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10806 } else { | 10807 } else { |
10807 value &= ~(1 << bit_position); | 10808 value &= ~(1 << bit_position); |
10808 } | 10809 } |
10809 return value; | 10810 return value; |
10810 } | 10811 } |
10811 }; | 10812 }; |
10812 | 10813 |
10813 } } // namespace v8::internal | 10814 } } // namespace v8::internal |
10814 | 10815 |
10815 #endif // V8_OBJECTS_H_ | 10816 #endif // V8_OBJECTS_H_ |
OLD | NEW |