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

Side by Side Diff: src/flags.cc

Issue 940003002: Reflect debug mode build in flags hash. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | 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
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 // static 546 // static
547 void FlagList::EnforceFlagImplications() { 547 void FlagList::EnforceFlagImplications() {
548 #define FLAG_MODE_DEFINE_IMPLICATIONS 548 #define FLAG_MODE_DEFINE_IMPLICATIONS
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 #ifdef DEBUG
557 modified_args_as_string << "debug";
558 #endif // DEBUG
vogelheim 2015/02/19 12:49:05 Not sure if this is the best location for this...
Yang 2015/02/19 12:51:07 My reasoning is that debug mode is a build time *f
556 for (size_t i = 0; i < num_flags; ++i) { 559 for (size_t i = 0; i < num_flags; ++i) {
557 Flag* current = &flags[i]; 560 Flag* current = &flags[i];
558 if (!current->IsDefault()) { 561 if (!current->IsDefault()) {
559 modified_args_as_string << i; 562 modified_args_as_string << i;
560 modified_args_as_string << *current; 563 modified_args_as_string << *current;
561 } 564 }
562 } 565 }
563 std::string args(modified_args_as_string.str()); 566 std::string args(modified_args_as_string.str());
564 return static_cast<uint32_t>( 567 return static_cast<uint32_t>(
565 base::hash_range(args.c_str(), args.c_str() + args.length())); 568 base::hash_range(args.c_str(), args.c_str() + args.length()));
566 } 569 }
567 } } // namespace v8::internal 570 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698