summaryrefslogtreecommitdiff
path: root/deps/v8/src/base/optional.h
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2018-09-21 09:14:51 +0200
committerMichaël Zasso <targos@protonmail.com>2018-09-22 18:29:25 +0200
commit0e7ddbd3d7e9439c67573b854c49cf82c398ae82 (patch)
tree2afe372acde921cb57ddb3444ff00c5adef8848c /deps/v8/src/base/optional.h
parent13245dc50da4cb7443c39ef6c68d419d5e6336d4 (diff)
downloadandroid-node-v8-0e7ddbd3d7e9439c67573b854c49cf82c398ae82.tar.gz
android-node-v8-0e7ddbd3d7e9439c67573b854c49cf82c398ae82.tar.bz2
android-node-v8-0e7ddbd3d7e9439c67573b854c49cf82c398ae82.zip
deps: update V8 to 7.0.276.20
PR-URL: https://github.com/nodejs/node/pull/22754 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'deps/v8/src/base/optional.h')
-rw-r--r--deps/v8/src/base/optional.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/deps/v8/src/base/optional.h b/deps/v8/src/base/optional.h
index ea32c403ac..6f5276843d 100644
--- a/deps/v8/src/base/optional.h
+++ b/deps/v8/src/base/optional.h
@@ -131,7 +131,7 @@ class Optional {
if (!other.storage_.is_null_) Init(other.value());
}
- Optional(Optional&& other) {
+ Optional(Optional&& other) V8_NOEXCEPT {
if (!other.storage_.is_null_) Init(std::move(other.value()));
}
@@ -164,7 +164,7 @@ class Optional {
return *this;
}
- Optional& operator=(Optional&& other) {
+ Optional& operator=(Optional&& other) V8_NOEXCEPT {
if (other.storage_.is_null_) {
FreeIfNeeded();
return *this;
@@ -182,16 +182,16 @@ class Optional {
return *this;
}
- // TODO(mlamouri): can't use 'constexpr' with DCHECK.
+ // TODO(mlamouri): can't use 'constexpr' with CHECK.
const T* operator->() const {
- DCHECK(!storage_.is_null_);
+ CHECK(!storage_.is_null_);
return &value();
}
// TODO(mlamouri): using 'constexpr' here breaks compiler that assume it was
// meant to be 'constexpr const'.
T* operator->() {
- DCHECK(!storage_.is_null_);
+ CHECK(!storage_.is_null_);
return &value();
}
@@ -214,26 +214,26 @@ class Optional {
// TODO(mlamouri): using 'constexpr' here breaks compiler that assume it was
// meant to be 'constexpr const'.
T& value() & {
- DCHECK(!storage_.is_null_);
+ CHECK(!storage_.is_null_);
return storage_.value_;
}
- // TODO(mlamouri): can't use 'constexpr' with DCHECK.
+ // TODO(mlamouri): can't use 'constexpr' with CHECK.
const T& value() const & {
- DCHECK(!storage_.is_null_);
+ CHECK(!storage_.is_null_);
return storage_.value_;
}
// TODO(mlamouri): using 'constexpr' here breaks compiler that assume it was
// meant to be 'constexpr const'.
T&& value() && {
- DCHECK(!storage_.is_null_);
+ CHECK(!storage_.is_null_);
return std::move(storage_.value_);
}
- // TODO(mlamouri): can't use 'constexpr' with DCHECK.
+ // TODO(mlamouri): can't use 'constexpr' with CHECK.
const T&& value() const && {
- DCHECK(!storage_.is_null_);
+ CHECK(!storage_.is_null_);
return std::move(storage_.value_);
}
@@ -273,7 +273,7 @@ class Optional {
return;
}
- DCHECK(!storage_.is_null_ && !other.storage_.is_null_);
+ CHECK(!storage_.is_null_ && !other.storage_.is_null_);
using std::swap;
swap(**this, *other);
}
@@ -288,20 +288,20 @@ class Optional {
private:
void Init(const T& value) {
- DCHECK(storage_.is_null_);
+ CHECK(storage_.is_null_);
new (&storage_.value_) T(value);
storage_.is_null_ = false;
}
void Init(T&& value) {
- DCHECK(storage_.is_null_);
+ CHECK(storage_.is_null_);
new (&storage_.value_) T(std::move(value));
storage_.is_null_ = false;
}
template <class... Args>
void Init(Args&&... args) {
- DCHECK(storage_.is_null_);
+ CHECK(storage_.is_null_);
new (&storage_.value_) T(std::forward<Args>(args)...);
storage_.is_null_ = false;
}