OLD | NEW |
---|---|
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 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
542 } | 542 } |
543 | 543 |
544 | 544 |
545 // static | 545 // static |
546 void FlagList::EnforceFlagImplications() { | 546 void FlagList::EnforceFlagImplications() { |
547 #define FLAG_MODE_DEFINE_IMPLICATIONS | 547 #define FLAG_MODE_DEFINE_IMPLICATIONS |
548 #include "src/flag-definitions.h" | 548 #include "src/flag-definitions.h" |
549 #undef FLAG_MODE_DEFINE_IMPLICATIONS | 549 #undef FLAG_MODE_DEFINE_IMPLICATIONS |
550 } | 550 } |
551 | 551 |
552 | |
553 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.
| |
554 std::ostringstream modified_args_as_string; | |
555 for (size_t i = 0; i < num_flags; ++i) { | |
556 Flag* current = &flags[i]; | |
557 if (!current->IsDefault()) { | |
558 modified_args_as_string << *current; | |
559 } | |
560 } | |
561 std::string args(modified_args_as_string.str()); | |
562 return StringHasher::HashSequentialString(args.c_str(), args.length(), | |
563 StringHasher::kZeroHash); | |
564 } | |
552 } } // namespace v8::internal | 565 } } // namespace v8::internal |
OLD | NEW |