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

Unified Diff: src/objects.h

Issue 765473006: Make TemplateLiteral hashing algorithm more memory efficient (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Change assertions in StringHasher extensions, add comment about hash key usage Created 6 years, 1 month 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 | « no previous file | src/objects-inl.h » ('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 746f88d1c4c0c10083e63263a005f79ec4378b9d..eaea38623fbc5fe58ee6cf9c4dbb08baa3fa834c 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -8489,6 +8489,11 @@ class StringHasher {
// Reusable parts of the hashing algorithm.
INLINE(static uint32_t AddCharacterCore(uint32_t running_hash, uint16_t c));
INLINE(static uint32_t GetHashCore(uint32_t running_hash));
+ INLINE(static uint32_t ComputeRunningHash(uint32_t running_hash,
+ const uc16* chars, int length));
+ INLINE(static uint32_t ComputeRunningHashOneByte(uint32_t running_hash,
+ const char* chars,
+ int length));
protected:
// Returns the value to store in the hash field of a string with
« no previous file with comments | « no previous file | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698