OLD | NEW |
1 // Copyright 2017 the V8 project authors. All rights reserved. | 1 // Copyright 2017 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_STRING_TABLE_H_ | 5 #ifndef V8_OBJECTS_STRING_TABLE_H_ |
6 #define V8_OBJECTS_STRING_TABLE_H_ | 6 #define V8_OBJECTS_STRING_TABLE_H_ |
7 | 7 |
8 #include "src/objects/hash-table.h" | 8 #include "src/objects/hash-table.h" |
9 | 9 |
10 // Has to be the last include (doesn't have include guards): | 10 // Has to be the last include (doesn't have include guards): |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 // or an empty handle otherwise. | 51 // or an empty handle otherwise. |
52 MUST_USE_RESULT static MaybeHandle<String> InternalizeStringIfExists( | 52 MUST_USE_RESULT static MaybeHandle<String> InternalizeStringIfExists( |
53 Isolate* isolate, Handle<String> string); | 53 Isolate* isolate, Handle<String> string); |
54 | 54 |
55 // Looks up a string that is equal to the given string and returns | 55 // Looks up a string that is equal to the given string and returns |
56 // string handle if it is found, or an empty handle otherwise. | 56 // string handle if it is found, or an empty handle otherwise. |
57 MUST_USE_RESULT static MaybeHandle<String> LookupStringIfExists( | 57 MUST_USE_RESULT static MaybeHandle<String> LookupStringIfExists( |
58 Isolate* isolate, Handle<String> str); | 58 Isolate* isolate, Handle<String> str); |
59 MUST_USE_RESULT static MaybeHandle<String> LookupTwoCharsStringIfExists( | 59 MUST_USE_RESULT static MaybeHandle<String> LookupTwoCharsStringIfExists( |
60 Isolate* isolate, uint16_t c1, uint16_t c2); | 60 Isolate* isolate, uint16_t c1, uint16_t c2); |
| 61 static Object* LookupStringIfExists_NoAllocate(String* string); |
61 | 62 |
62 static void EnsureCapacityForDeserialization(Isolate* isolate, int expected); | 63 static void EnsureCapacityForDeserialization(Isolate* isolate, int expected); |
63 | 64 |
64 DECLARE_CAST(StringTable) | 65 DECLARE_CAST(StringTable) |
65 | 66 |
66 private: | 67 private: |
67 template <bool seq_one_byte> | 68 template <bool seq_one_byte> |
68 friend class JsonParser; | 69 friend class JsonParser; |
69 | 70 |
70 DISALLOW_IMPLICIT_CONSTRUCTORS(StringTable); | 71 DISALLOW_IMPLICIT_CONSTRUCTORS(StringTable); |
(...skipping 18 matching lines...) Expand all Loading... |
89 | 90 |
90 DECLARE_CAST(StringSet) | 91 DECLARE_CAST(StringSet) |
91 }; | 92 }; |
92 | 93 |
93 } // namespace internal | 94 } // namespace internal |
94 } // namespace v8 | 95 } // namespace v8 |
95 | 96 |
96 #include "src/objects/object-macros-undef.h" | 97 #include "src/objects/object-macros-undef.h" |
97 | 98 |
98 #endif // V8_OBJECTS_STRING_TABLE_H_ | 99 #endif // V8_OBJECTS_STRING_TABLE_H_ |
OLD | NEW |