Backed out changeset 706338ae16dd (bug 1940342) for causing build bustages at TestMaybe.cpp. CLOSED TREE

This commit is contained in:
Butkovits Atila
2025-01-08 03:05:45 +02:00
parent 4a0e20c8cd
commit e5bb164d54
2 changed files with 12 additions and 38 deletions

View File

@@ -59,20 +59,6 @@
# define IF_WASM_JSPI(REAL, IMAGINARY) IMAGINARY # define IF_WASM_JSPI(REAL, IMAGINARY) IMAGINARY
#endif #endif
// IF_EXPLICIT_RESOURCE_MANAGEMENT is already used elsewhere.
#ifdef ENABLE_EXPLICIT_RESOURCE_MANAGEMENT
# define IF_HAVE_EXPLICIT_RESOURCE_MANAGEMENT(REAL, IMAGINARY) REAL
#else
# define IF_HAVE_EXPLICIT_RESOURCE_MANAGEMENT(REAL, IMAGINARY) IMAGINARY
#endif
// IF_RECORD_TUPLE is already used elsewhere.
#ifdef ENABLE_RECORD_TUPLE
# define IF_HAVE_RECORD_TUPLE(REAL, IMAGINARY) REAL
#else
# define IF_HAVE_RECORD_TUPLE(REAL, IMAGINARY) IMAGINARY
#endif
#ifdef NIGHTLY_BUILD #ifdef NIGHTLY_BUILD
# define IF_NIGHTLY(REAL, IMAGINARY) REAL # define IF_NIGHTLY(REAL, IMAGINARY) REAL
#else #else
@@ -81,8 +67,7 @@
#define JS_FOR_PROTOTYPES_(REAL, IMAGINARY, REAL_IF_INTL, REAL_IF_TEMPORAL, \ #define JS_FOR_PROTOTYPES_(REAL, IMAGINARY, REAL_IF_INTL, REAL_IF_TEMPORAL, \
REAL_IF_WASM_TYPE, REAL_IF_WASM_JSPI, \ REAL_IF_WASM_TYPE, REAL_IF_WASM_JSPI, \
REAL_IF_EXPLICIT_RESOURCE_MANAGEMENT, \ REAL_IF_NIGHTLY) \
REAL_IF_RECORD_TUPLE, REAL_IF_NIGHTLY) \
IMAGINARY(Null, dummy) \ IMAGINARY(Null, dummy) \
REAL(Object, OCLASP(Plain)) \ REAL(Object, OCLASP(Plain)) \
REAL(Function, &FunctionClass) \ REAL(Function, &FunctionClass) \
@@ -101,8 +86,8 @@
REAL(EvalError, ERROR_CLASP(JSEXN_EVALERR)) \ REAL(EvalError, ERROR_CLASP(JSEXN_EVALERR)) \
REAL(RangeError, ERROR_CLASP(JSEXN_RANGEERR)) \ REAL(RangeError, ERROR_CLASP(JSEXN_RANGEERR)) \
REAL(ReferenceError, ERROR_CLASP(JSEXN_REFERENCEERR)) \ REAL(ReferenceError, ERROR_CLASP(JSEXN_REFERENCEERR)) \
REAL_IF_EXPLICIT_RESOURCE_MANAGEMENT(SuppressedError, \ IF_EXPLICIT_RESOURCE_MANAGEMENT( \
ERROR_CLASP(JSEXN_SUPPRESSEDERR)) \ REAL(SuppressedError, ERROR_CLASP(JSEXN_SUPPRESSEDERR))) \
REAL(SyntaxError, ERROR_CLASP(JSEXN_SYNTAXERR)) \ REAL(SyntaxError, ERROR_CLASP(JSEXN_SYNTAXERR)) \
REAL(TypeError, ERROR_CLASP(JSEXN_TYPEERR)) \ REAL(TypeError, ERROR_CLASP(JSEXN_TYPEERR)) \
REAL(URIError, ERROR_CLASP(JSEXN_URIERR)) \ REAL(URIError, ERROR_CLASP(JSEXN_URIERR)) \
@@ -166,10 +151,10 @@
REAL(WeakRef, OCLASP(WeakRef)) \ REAL(WeakRef, OCLASP(WeakRef)) \
REAL(Iterator, OCLASP(Iterator)) \ REAL(Iterator, OCLASP(Iterator)) \
REAL(AsyncIterator, OCLASP(AsyncIterator)) \ REAL(AsyncIterator, OCLASP(AsyncIterator)) \
REAL_IF_EXPLICIT_RESOURCE_MANAGEMENT(DisposableStack, \ IF_EXPLICIT_RESOURCE_MANAGEMENT( \
OCLASP(DisposableStack)) \ REAL(DisposableStack, OCLASP(DisposableStack))) \
REAL_IF_EXPLICIT_RESOURCE_MANAGEMENT(AsyncDisposableStack, \ IF_EXPLICIT_RESOURCE_MANAGEMENT( \
OCLASP(AsyncDisposableStack)) \ REAL(AsyncDisposableStack, OCLASP(AsyncDisposableStack))) \
REAL_IF_TEMPORAL(Temporal, OCLASP(temporal::Temporal)) \ REAL_IF_TEMPORAL(Temporal, OCLASP(temporal::Temporal)) \
REAL_IF_TEMPORAL(Duration, OCLASP(temporal::Duration)) \ REAL_IF_TEMPORAL(Duration, OCLASP(temporal::Duration)) \
REAL_IF_TEMPORAL(Instant, OCLASP(temporal::Instant)) \ REAL_IF_TEMPORAL(Instant, OCLASP(temporal::Instant)) \
@@ -180,24 +165,14 @@
REAL_IF_TEMPORAL(PlainTime, OCLASP(temporal::PlainTime)) \ REAL_IF_TEMPORAL(PlainTime, OCLASP(temporal::PlainTime)) \
REAL_IF_TEMPORAL(TemporalNow, OCLASP(temporal::TemporalNow)) \ REAL_IF_TEMPORAL(TemporalNow, OCLASP(temporal::TemporalNow)) \
REAL_IF_TEMPORAL(ZonedDateTime, OCLASP(temporal::ZonedDateTime)) \ REAL_IF_TEMPORAL(ZonedDateTime, OCLASP(temporal::ZonedDateTime)) \
REAL_IF_RECORD_TUPLE(Record, (&RecordType::class_)) \ IF_RECORD_TUPLE(REAL(Record, (&RecordType::class_))) \
REAL_IF_RECORD_TUPLE(Tuple, (&TupleType::class_)) IF_RECORD_TUPLE(REAL(Tuple, (&TupleType::class_)))
// DO NOT ADD CONDITIONAL ENTRIES TO THIS LIST! (As in, do not add entries that
// are only present in some configurations.) It will break binary compatibility.
// Instead, create an IF_<feature> macro and add it to the parameter list below
// and add a corresponding parameter to JS_FOR_PROTOTYPES_ above.
//
// Note that entries may be freely added to or removed from this list, even in
// the middle. The only invariant that must be upheld is that the offsets in the
// list do not change depending on configuration settings of the same version of
// the source.
#define JS_FOR_PROTOTYPES(REAL, IMAGINARY) \ #define JS_FOR_PROTOTYPES(REAL, IMAGINARY) \
JS_FOR_PROTOTYPES_( \ JS_FOR_PROTOTYPES_( \
REAL, IMAGINARY, IF_INTL(REAL, IMAGINARY), IF_TEMPORAL(REAL, IMAGINARY), \ REAL, IMAGINARY, IF_INTL(REAL, IMAGINARY), IF_TEMPORAL(REAL, IMAGINARY), \
IF_WASM_TYPE(REAL, IMAGINARY), IF_WASM_JSPI(REAL, IMAGINARY), \ IF_WASM_TYPE(REAL, IMAGINARY), IF_WASM_JSPI(REAL, IMAGINARY), \
IF_HAVE_EXPLICIT_RESOURCE_MANAGEMENT(REAL, IMAGINARY), \ IF_NIGHTLY(REAL, IMAGINARY))
IF_HAVE_RECORD_TUPLE(REAL, IMAGINARY), IF_NIGHTLY(REAL, IMAGINARY))
#define JS_FOR_EACH_PROTOTYPE(MACRO) JS_FOR_PROTOTYPES(MACRO, MACRO) #define JS_FOR_EACH_PROTOTYPE(MACRO) JS_FOR_PROTOTYPES(MACRO, MACRO)

View File

@@ -63,7 +63,7 @@ struct MaybeStorageBase<T, true> {
using NonConstT = std::remove_const_t<T>; using NonConstT = std::remove_const_t<T>;
union Union { union Union {
constexpr Union() : empty{} {} constexpr Union() : empty() {}
constexpr explicit Union(const T& aVal) : val{aVal} {} constexpr explicit Union(const T& aVal) : val{aVal} {}
constexpr explicit Union(T&& aVal) : val{std::move(aVal)} {} constexpr explicit Union(T&& aVal) : val{std::move(aVal)} {}
template <typename... Args> template <typename... Args>
@@ -71,8 +71,7 @@ struct MaybeStorageBase<T, true> {
: val{std::forward<Args>(aArgs)...} {} : val{std::forward<Args>(aArgs)...} {}
NonConstT val; NonConstT val;
struct { char empty;
} empty;
} mStorage; } mStorage;
public: public: