summaryrefslogtreecommitdiff
path: root/deps/v8/src/conversions.cc
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2018-12-04 08:20:37 +0100
committerMichaël Zasso <targos@protonmail.com>2018-12-06 15:23:33 +0100
commit9b4bf7de6c9a7c25f116c7a502384c20b5cfaea3 (patch)
tree2b0c843168dafb939d8df8a15b2aa72b76dee51d /deps/v8/src/conversions.cc
parentb8fbe69db1292307adb2c2b2e0d5ef48c4ab2faf (diff)
downloadandroid-node-v8-9b4bf7de6c9a7c25f116c7a502384c20b5cfaea3.tar.gz
android-node-v8-9b4bf7de6c9a7c25f116c7a502384c20b5cfaea3.tar.bz2
android-node-v8-9b4bf7de6c9a7c25f116c7a502384c20b5cfaea3.zip
deps: update V8 to 7.1.302.28
PR-URL: https://github.com/nodejs/node/pull/23423 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Myles Borins <myles.borins@gmail.com>
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));
}