| 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 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |