| 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 3535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3546 // No special elements in the prefix and the element size is 1 | 3546 // No special elements in the prefix and the element size is 1 |
| 3547 // because only the string itself (the key) needs to be stored. | 3547 // because only the string itself (the key) needs to be stored. |
| 3548 class StringTable: public HashTable<StringTable, | 3548 class StringTable: public HashTable<StringTable, |
| 3549 StringTableShape, | 3549 StringTableShape, |
| 3550 HashTableKey*> { | 3550 HashTableKey*> { |
| 3551 public: | 3551 public: |
| 3552 // Find string in the string table. If it is not there yet, it is | 3552 // Find string in the string table. If it is not there yet, it is |
| 3553 // added. The return value is the string found. | 3553 // added. The return value is the string found. |
| 3554 static Handle<String> LookupString(Isolate* isolate, Handle<String> key); | 3554 static Handle<String> LookupString(Isolate* isolate, Handle<String> key); |
| 3555 static Handle<String> LookupKey(Isolate* isolate, HashTableKey* key); | 3555 static Handle<String> LookupKey(Isolate* isolate, HashTableKey* key); |
| 3556 static String* LookupKeyIfExists(Isolate* isolate, HashTableKey* key); |
| 3556 | 3557 |
| 3557 // Tries to internalize given string and returns string handle on success | 3558 // Tries to internalize given string and returns string handle on success |
| 3558 // or an empty handle otherwise. | 3559 // or an empty handle otherwise. |
| 3559 MUST_USE_RESULT static MaybeHandle<String> InternalizeStringIfExists( | 3560 MUST_USE_RESULT static MaybeHandle<String> InternalizeStringIfExists( |
| 3560 Isolate* isolate, | 3561 Isolate* isolate, |
| 3561 Handle<String> string); | 3562 Handle<String> string); |
| 3562 | 3563 |
| 3563 // Looks up a string that is equal to the given string and returns | 3564 // Looks up a string that is equal to the given string and returns |
| 3564 // string handle if it is found, or an empty handle otherwise. | 3565 // string handle if it is found, or an empty handle otherwise. |
| 3565 MUST_USE_RESULT static MaybeHandle<String> LookupStringIfExists( | 3566 MUST_USE_RESULT static MaybeHandle<String> LookupStringIfExists( |
| (...skipping 7535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11101 } else { | 11102 } else { |
| 11102 value &= ~(1 << bit_position); | 11103 value &= ~(1 << bit_position); |
| 11103 } | 11104 } |
| 11104 return value; | 11105 return value; |
| 11105 } | 11106 } |
| 11106 }; | 11107 }; |
| 11107 | 11108 |
| 11108 } } // namespace v8::internal | 11109 } } // namespace v8::internal |
| 11109 | 11110 |
| 11110 #endif // V8_OBJECTS_H_ | 11111 #endif // V8_OBJECTS_H_ |
| OLD | NEW |