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

Unified Diff: src/objects.h

Issue 249103002: StringTable::LookupKey() and all callers handlified. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing review notes Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/mark-compact.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index a190f8dfe21bfba620ba73614d68a993f3b05a67..c5bd55a2fc80d1d5dac62fc17b0e389ba6b23334 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -3893,6 +3893,8 @@ class HashTableKey {
// Returns the key object for storing into the hash table.
// If allocations fails a failure object is returned.
MUST_USE_RESULT virtual MaybeObject* AsObject(Heap* heap) = 0;
+ // TODO(ishell): This should eventually replace AsObject().
+ inline Handle<Object> AsHandle(Isolate* isolate);
// Required.
virtual ~HashTableKey() {}
};
@@ -3930,12 +3932,10 @@ class StringTable: public HashTable<StringTable,
StringTableShape,
HashTableKey*> {
public:
- // Find string in the string table. If it is not there yet, it is
- // added. The return value is the string table which might have
- // been enlarged. If the return value is not a failure, the string
- // pointer *s is set to the string found.
- MUST_USE_RESULT MaybeObject* LookupString(String* key, Object** s);
- MUST_USE_RESULT MaybeObject* LookupKey(HashTableKey* key, Object** s);
+ // Find string in the string table. If it is not there yet, it is
+ // added. The return value is the string found.
+ static Handle<String> LookupString(Isolate* isolate, Handle<String> key);
+ static Handle<String> LookupKey(Isolate* isolate, HashTableKey* key);
// Looks up a string that is equal to the given string and returns
// true if it is found, assigning the string to the given output
@@ -9225,6 +9225,7 @@ class String: public Name {
static const int32_t kMaxOneByteCharCode = unibrow::Latin1::kMaxChar;
static const uint32_t kMaxOneByteCharCodeU = unibrow::Latin1::kMaxChar;
static const int kMaxUtf16CodeUnit = 0xffff;
+ static const uint32_t kMaxUtf16CodeUnitU = kMaxUtf16CodeUnit;
// Value of hash field containing computed hash equal to zero.
static const int kEmptyStringHash = kIsNotArrayIndexMask;
« no previous file with comments | « src/mark-compact.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698