summaryrefslogtreecommitdiff
path: root/deps/v8/src/conversions.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/conversions.cc')
-rw-r--r--deps/v8/src/conversions.cc16
1 files changed, 6 insertions, 10 deletions
diff --git a/deps/v8/src/conversions.cc b/deps/v8/src/conversions.cc
index baf8b3a6d5..ee40201544 100644
--- a/deps/v8/src/conversions.cc
+++ b/deps/v8/src/conversions.cc
@@ -30,8 +30,6 @@
namespace v8 {
namespace internal {
-namespace {
-
inline double JunkStringValue() {
return bit_cast<double, uint64_t>(kQuietNaNMask);
}
@@ -194,7 +192,7 @@ class StringToIntHelper {
// buffer of one-byte digits, along with an optional radix prefix.
StringToIntHelper(Isolate* isolate, const uint8_t* subject, int length)
: isolate_(isolate), raw_one_byte_subject_(subject), length_(length) {}
- virtual ~StringToIntHelper() {}
+ virtual ~StringToIntHelper() = default;
protected:
// Subclasses must implement these:
@@ -462,13 +460,13 @@ class NumberParseIntHelper : public StringToIntHelper {
}
protected:
- virtual void AllocateResult() {}
- virtual void ResultMultiplyAdd(uint32_t multiplier, uint32_t part) {
+ void AllocateResult() override {}
+ void ResultMultiplyAdd(uint32_t multiplier, uint32_t part) override {
result_ = result_ * multiplier + part;
}
private:
- virtual void HandleSpecialCases() {
+ void HandleSpecialCases() override {
bool is_power_of_two = base::bits::IsPowerOfTwo(radix());
if (!is_power_of_two && radix() != 10) return;
DisallowHeapAllocation no_gc;
@@ -812,8 +810,6 @@ parsing_done:
return (sign == NEGATIVE) ? -converted : converted;
}
-} // namespace
-
double StringToDouble(UnicodeCache* unicode_cache,
const char* str, int flags, double empty_string_val) {
// We cast to const uint8_t* here to avoid instantiating the
@@ -911,7 +907,7 @@ class StringToBigIntHelper : public StringToIntHelper {
}
protected:
- virtual void AllocateResult() {
+ void AllocateResult() override {
// We have to allocate a BigInt that's big enough to fit the result.
// Conseratively assume that all remaining digits are significant.
// Optimization opportunity: Would it makes sense to scan for trailing
@@ -928,7 +924,7 @@ class StringToBigIntHelper : public StringToIntHelper {
}
}
- virtual void ResultMultiplyAdd(uint32_t multiplier, uint32_t part) {
+ void ResultMultiplyAdd(uint32_t multiplier, uint32_t part) override {
BigInt::InplaceMultiplyAdd(result_, static_cast<uintptr_t>(multiplier),
static_cast<uintptr_t>(part));
}