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

Side by Side 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: Final rebase. 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/flags.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 #include <cctype> 5 #include <cctype>
6 #include <cstdlib> 6 #include <cstdlib>
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/v8.h" 9 #include "src/v8.h"
10 10
11 #include "src/assembler.h" 11 #include "src/assembler.h"
12 #include "src/base/functional.h"
12 #include "src/base/platform/platform.h" 13 #include "src/base/platform/platform.h"
13 #include "src/ostreams.h" 14 #include "src/ostreams.h"
14 15
15 namespace v8 { 16 namespace v8 {
16 namespace internal { 17 namespace internal {
17 18
18 // Define all of our flags. 19 // Define all of our flags.
19 #define FLAG_MODE_DEFINE 20 #define FLAG_MODE_DEFINE
20 #include "src/flag-definitions.h" // NOLINT 21 #include "src/flag-definitions.h" // NOLINT
21 22
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 } 543 }
543 544
544 545
545 // static 546 // static
546 void FlagList::EnforceFlagImplications() { 547 void FlagList::EnforceFlagImplications() {
547 #define FLAG_MODE_DEFINE_IMPLICATIONS 548 #define FLAG_MODE_DEFINE_IMPLICATIONS
548 #include "src/flag-definitions.h" 549 #include "src/flag-definitions.h"
549 #undef FLAG_MODE_DEFINE_IMPLICATIONS 550 #undef FLAG_MODE_DEFINE_IMPLICATIONS
550 } 551 }
551 552
553
554 uint32_t FlagList::Hash() {
555 std::ostringstream modified_args_as_string;
556 for (size_t i = 0; i < num_flags; ++i) {
557 Flag* current = &flags[i];
558 if (!current->IsDefault()) {
559 modified_args_as_string << *current;
560 }
561 }
562 std::string args(modified_args_as_string.str());
563 return static_cast<uint32_t>(
564 base::hash_range(args.c_str(), args.c_str() + args.length()));
565 }
552 } } // namespace v8::internal 566 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/flags.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698