Upgrade V8 to version 4.9.385.28
https://chromium.googlesource.com/v8/v8/+/4.9.385.28
FPIIM-449
Change-Id: I4b2e74289d4bf3667f2f3dc8aa2e541f63e26eb4
diff --git a/src/flags.cc b/src/flags.cc
index 5e33bda..f67defd 100644
--- a/src/flags.cc
+++ b/src/flags.cc
@@ -2,27 +2,30 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "src/flags.h"
+
#include <cctype>
#include <cstdlib>
#include <sstream>
-#include "src/v8.h"
-
+#include "src/allocation.h"
#include "src/assembler.h"
#include "src/base/functional.h"
#include "src/base/platform/platform.h"
+#include "src/list-inl.h"
#include "src/ostreams.h"
+#include "src/utils.h"
namespace v8 {
namespace internal {
// Define all of our flags.
#define FLAG_MODE_DEFINE
-#include "src/flag-definitions.h" // NOLINT
+#include "src/flag-definitions.h" // NOLINT(build/include)
// Define all of our flags default values.
#define FLAG_MODE_DEFINE_DEFAULTS
-#include "src/flag-definitions.h" // NOLINT
+#include "src/flag-definitions.h" // NOLINT(build/include)
namespace {
@@ -161,7 +164,7 @@
Flag flags[] = {
#define FLAG_MODE_META
-#include "src/flag-definitions.h"
+#include "src/flag-definitions.h" // NOLINT(build/include)
};
const size_t num_flags = sizeof(flags) / sizeof(*flags);
@@ -394,7 +397,7 @@
*flag->maybe_bool_variable() = MaybeBoolFlag::Create(true, !is_bool);
break;
case Flag::TYPE_INT:
- *flag->int_variable() = strtol(value, &endp, 10); // NOLINT
+ *flag->int_variable() = static_cast<int>(strtol(value, &endp, 10));
break;
case Flag::TYPE_FLOAT:
*flag->float_variable() = strtod(value, &endp);
@@ -543,16 +546,14 @@
}
-// static
-void FlagList::EnforceFlagImplications() {
-#define FLAG_MODE_DEFINE_IMPLICATIONS
-#include "src/flag-definitions.h"
-#undef FLAG_MODE_DEFINE_IMPLICATIONS
-}
+static uint32_t flag_hash = 0;
-uint32_t FlagList::Hash() {
+void ComputeFlagListHash() {
std::ostringstream modified_args_as_string;
+#ifdef DEBUG
+ modified_args_as_string << "debug";
+#endif // DEBUG
for (size_t i = 0; i < num_flags; ++i) {
Flag* current = &flags[i];
if (!current->IsDefault()) {
@@ -561,7 +562,20 @@
}
}
std::string args(modified_args_as_string.str());
- return static_cast<uint32_t>(
+ flag_hash = static_cast<uint32_t>(
base::hash_range(args.c_str(), args.c_str() + args.length()));
}
-} } // namespace v8::internal
+
+
+// static
+void FlagList::EnforceFlagImplications() {
+#define FLAG_MODE_DEFINE_IMPLICATIONS
+#include "src/flag-definitions.h" // NOLINT(build/include)
+#undef FLAG_MODE_DEFINE_IMPLICATIONS
+ ComputeFlagListHash();
+}
+
+
+uint32_t FlagList::Hash() { return flag_hash; }
+} // namespace internal
+} // namespace v8