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

Unified Diff: src/objects.h

Issue 2760413002: Minor optimization to v8::internal::Factory::InternalizeOneByteString.
Patch Set: . Created 3 years, 9 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/factory.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 faee6b6ba6514476b1f673c9babe6f1163c733f7..fd0f1b383a18f67f4a6df8ee7fd65e1c4864377d 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -3524,7 +3524,8 @@ class StringTable: public HashTable<StringTable,
// added. The return value is the string found.
V8_EXPORT_PRIVATE static Handle<String> LookupString(Isolate* isolate,
Handle<String> key);
- static Handle<String> LookupKey(Isolate* isolate, HashTableKey* key);
+ static V8_INLINE Handle<String> LookupKey(Isolate* isolate,
+ HashTableKey* key);
static String* LookupKeyIfExists(Isolate* isolate, HashTableKey* key);
// Tries to internalize given string and returns string handle on success
@@ -3548,6 +3549,9 @@ class StringTable: public HashTable<StringTable,
DECLARE_CAST(StringTable)
private:
+ static Handle<String> InsertKey(Isolate* isolate, Handle<StringTable> table,
+ HashTableKey* key, int32_t hash);
+
template <bool seq_one_byte>
friend class JsonParser;
@@ -9035,7 +9039,7 @@ class V8_EXPORT_PRIVATE StringHasher {
protected:
// Returns the value to store in the hash field of a string with
// the given length and contents.
- uint32_t GetHashField();
+ V8_INLINE uint32_t GetHashField();
// Returns true if the hash of this string can be computed without
// looking at the contents.
inline bool has_trivial_hash();
« no previous file with comments | « src/factory.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698