diff --git a/common.gypi b/common.gypi index d9dde2ea7407c0..2bcceacbb5b227 100644 --- a/common.gypi +++ b/common.gypi @@ -36,7 +36,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.5', + 'v8_embedder_string': '-node.6', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/src/torque/torque-parser.cc b/deps/v8/src/torque/torque-parser.cc index 428ee9e80490fb..413d8452b30167 100644 --- a/deps/v8/src/torque/torque-parser.cc +++ b/deps/v8/src/torque/torque-parser.cc @@ -1834,7 +1834,17 @@ base::Optional MakeNumberLiteralExpression( // Meanwhile, we type it as constexpr float64 when out of int32 range. double value = 0; try { +#if defined(V8_OS_SOLARIS) + // stod() on Solaris does not currently support hex strings. Use strtol() + // specifically for hex literals until stod() support is available. + if (number.find("0x") || number.find("0X")) { + value = static_cast(strtol(number.c_str(), nullptr, 0)); + } else { + value = std::stod(number); + } +#else value = std::stod(number); +#endif // !defined(V8_OS_SOLARIS) } catch (const std::out_of_range&) { Error("double literal out-of-range").Throw(); }