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

Side by Side Diff: src/flags.cc

Issue 909473002: Add hash fields to code cache header. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix test case Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/serialize.h » ('j') | 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
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 #include "src/flag-definitions.h" 549 #include "src/flag-definitions.h"
550 #undef FLAG_MODE_DEFINE_IMPLICATIONS 550 #undef FLAG_MODE_DEFINE_IMPLICATIONS
551 } 551 }
552 552
553 553
554 uint32_t FlagList::Hash() { 554 uint32_t FlagList::Hash() {
555 std::ostringstream modified_args_as_string; 555 std::ostringstream modified_args_as_string;
556 for (size_t i = 0; i < num_flags; ++i) { 556 for (size_t i = 0; i < num_flags; ++i) {
557 Flag* current = &flags[i]; 557 Flag* current = &flags[i];
558 if (!current->IsDefault()) { 558 if (!current->IsDefault()) {
559 modified_args_as_string << i;
559 modified_args_as_string << *current; 560 modified_args_as_string << *current;
560 } 561 }
561 } 562 }
562 std::string args(modified_args_as_string.str()); 563 std::string args(modified_args_as_string.str());
563 return static_cast<uint32_t>( 564 return static_cast<uint32_t>(
564 base::hash_range(args.c_str(), args.c_str() + args.length())); 565 base::hash_range(args.c_str(), args.c_str() + args.length()));
565 } 566 }
566 } } // namespace v8::internal 567 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/serialize.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698