Commit 0b25bbbe authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

Remove deprecated 'throw()' specifier

This specifier is deprecated and will be removed in C++20. Replace it
with V8_NOEXCEPT where is makes sense and remove it otherwise. Also
remove redundant constructors.

R=tebbi@chromium.org

Bug: v8:8562
Change-Id: I1335dcac5cac14b62b655cfd507decd4de653043
Reviewed-on: https://chromium-review.googlesource.com/c/1392204Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58517}
parent 5ea59597
...@@ -30,11 +30,9 @@ class ZoneAllocator { ...@@ -30,11 +30,9 @@ class ZoneAllocator {
// MSVS unfortunately requires the default constructor to be defined. // MSVS unfortunately requires the default constructor to be defined.
ZoneAllocator() : ZoneAllocator(nullptr) { UNREACHABLE(); } ZoneAllocator() : ZoneAllocator(nullptr) { UNREACHABLE(); }
#endif #endif
explicit ZoneAllocator(Zone* zone) throw() : zone_(zone) {} explicit ZoneAllocator(Zone* zone) : zone_(zone) {}
explicit ZoneAllocator(const ZoneAllocator& other) throw()
: ZoneAllocator<T>(other.zone_) {}
template <typename U> template <typename U>
ZoneAllocator(const ZoneAllocator<U>& other) throw() ZoneAllocator(const ZoneAllocator<U>& other) V8_NOEXCEPT
: ZoneAllocator<T>(other.zone_) {} : ZoneAllocator<T>(other.zone_) {}
template <typename U> template <typename U>
friend class ZoneAllocator; friend class ZoneAllocator;
...@@ -48,7 +46,7 @@ class ZoneAllocator { ...@@ -48,7 +46,7 @@ class ZoneAllocator {
void deallocate(T* p, size_t) { /* noop for Zones */ void deallocate(T* p, size_t) { /* noop for Zones */
} }
size_t max_size() const throw() { size_t max_size() const {
return std::numeric_limits<int>::max() / sizeof(T); return std::numeric_limits<int>::max() / sizeof(T);
} }
template <typename U, typename... Args> template <typename U, typename... Args>
...@@ -93,13 +91,12 @@ class RecyclingZoneAllocator : public ZoneAllocator<T> { ...@@ -93,13 +91,12 @@ class RecyclingZoneAllocator : public ZoneAllocator<T> {
UNREACHABLE(); UNREACHABLE();
} }
#endif #endif
explicit RecyclingZoneAllocator(Zone* zone) throw() explicit RecyclingZoneAllocator(Zone* zone)
: ZoneAllocator<T>(zone), free_list_(nullptr) {} : ZoneAllocator<T>(zone), free_list_(nullptr) {}
explicit RecyclingZoneAllocator(const RecyclingZoneAllocator& other) throw()
: ZoneAllocator<T>(other), free_list_(nullptr) {}
template <typename U> template <typename U>
RecyclingZoneAllocator(const RecyclingZoneAllocator<U>& other) throw() RecyclingZoneAllocator(const RecyclingZoneAllocator<U>& other) V8_NOEXCEPT
: ZoneAllocator<T>(other), free_list_(nullptr) {} : ZoneAllocator<T>(other),
free_list_(nullptr) {}
template <typename U> template <typename U>
friend class RecyclingZoneAllocator; friend class RecyclingZoneAllocator;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment