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

Unified Diff: src/flags.cc

Issue 718043002: Add a version tag for cached data. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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
« src/api.cc ('K') | « src/flags.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/flags.cc
diff --git a/src/flags.cc b/src/flags.cc
index e53c45e69d3a35e904f6853035cf6f7c24826f12..90ce752fea871fb57b009cefa6669b0298378711 100644
--- a/src/flags.cc
+++ b/src/flags.cc
@@ -549,4 +549,17 @@ void FlagList::EnforceFlagImplications() {
#undef FLAG_MODE_DEFINE_IMPLICATIONS
}
+
+uint32_t FlagList::Hash() {
Sven Panne 2014/11/12 15:55:31 Again, src/base/functional.h might help here
vogelheim 2014/11/12 18:34:30 Done.
+ std::ostringstream modified_args_as_string;
+ for (size_t i = 0; i < num_flags; ++i) {
+ Flag* current = &flags[i];
+ if (!current->IsDefault()) {
+ modified_args_as_string << *current;
+ }
+ }
+ std::string args(modified_args_as_string.str());
+ return StringHasher::HashSequentialString(args.c_str(), args.length(),
+ StringHasher::kZeroHash);
+}
} } // namespace v8::internal
« src/api.cc ('K') | « src/flags.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698