Backed out 3 changesets (bug 1626772) for causing bustages in DefineEnum.h

CLOSED TREE

Backed out changeset f42150bdee2b (bug 1626772)
Backed out changeset ab5b637f714a (bug 1626772)
Backed out changeset fd4026a9f380 (bug 1626772)
This commit is contained in:
Mihai Alexandru Michis 2020-04-10 03:49:33 +03:00
parent 5beb91b795
commit f2e4ef7d2a
8 changed files with 21 additions and 37 deletions

View File

@ -805,28 +805,17 @@ already_AddRefed<AudioWorkletNode> AudioWorkletNode::Constructor(
auto workletImpl = static_cast<AudioWorkletImpl*>(worklet->Impl());
audioWorkletNode->mTrack->SendRunnable(NS_NewRunnableFunction(
"WorkletNodeEngine::ConstructProcessor",
// MOZ_CAN_RUN_SCRIPT_BOUNDARY until Runnable::Run is MOZ_CAN_RUN_SCRIPT.
// See bug 1535398.
//
// Note that clang and gcc have mutually incompatible rules about whether
// attributes should come before or after the `mutable` keyword here, so
// use a compatibility hack until we can switch to the standardized
// [[attr]] syntax (bug 1627007).
#ifdef __clang__
# define AND_MUTABLE(macro) macro mutable
#else
# define AND_MUTABLE(macro) mutable macro
#endif
// MOZ_CAN_RUN_SCRIPT_BOUNDARY until Runnable::Run is MOZ_CAN_RUN_SCRIPT.
// See bug 1535398.
[track = audioWorkletNode->mTrack,
workletImpl = RefPtr<AudioWorkletImpl>(workletImpl),
name = nsString(aName), options = std::move(serializedOptions),
portId = std::move(processorPortId)]()
AND_MUTABLE(MOZ_CAN_RUN_SCRIPT_BOUNDARY) {
MOZ_CAN_RUN_SCRIPT_BOUNDARY mutable {
auto engine = static_cast<WorkletNodeEngine*>(track->Engine());
engine->ConstructProcessor(
workletImpl, name, WrapNotNull(options.get()), portId, track);
}));
#undef AND_MUTABLE
// [[active source]] is initially true and so at least the first process()
// call will not be skipped when there are no active inputs.

View File

@ -359,7 +359,7 @@ function ignoreGCFunction(mangled)
// TODO: modify refillFreeList<NoGC> to not need data flow analysis to
// understand it cannot GC. As of gcc 6, the same problem occurs with
// tryNewTenuredThing, tryNewNurseryObject, and others.
if (/refillFreeList|tryNew/.test(fun) && /= js::NoGC/.test(fun))
if (/refillFreeList|tryNew/.test(fun) && /\(js::AllowGC\)0/.test(fun))
return true;
return false;

View File

@ -25,11 +25,7 @@ static bool MOZ_FORMAT_PRINTF(2, 3)
return output && !strcmp(output.get(), expect);
}
static const char* zero() {
// gcc 9 is altogether too clever about detecting that this will always
// return nullptr. Do not replace 0x10 with 0x1; it will no longer work.
return uintptr_t(&zero) == 0x10 ? "never happens" : nullptr;
}
static const char* zero() { return nullptr; }
BEGIN_TEST(testPrintf) {
CHECK(print_one("23", "%d", 23));

View File

@ -141,8 +141,8 @@ JSString* ResolvePath(JSContext* cx, HandleString filenameStr,
// The docs say it can return EINVAL, but the compiler says it's void
_splitpath(scriptFilename.get(), nullptr, buffer, nullptr, nullptr);
#else
strncpy(buffer, scriptFilename.get(), PATH_MAX);
if (buffer[PATH_MAX - 1] != '\0') {
strncpy(buffer, scriptFilename.get(), PATH_MAX + 1);
if (buffer[PATH_MAX] != '\0') {
return nullptr;
}

View File

@ -90,8 +90,8 @@
/*
* A helper macro for asserting that an enumerator does not have an initializer.
*
* The static_assert and the comparison are just scaffolding; the important
* part is forming the expression |aEnumName::aEnumeratorDecl|.
* The static_assert and the comparison to 0 are just scaffolding; the
* important part is forming the expression |aEnumName::aEnumeratorDecl|.
*
* If |aEnumeratorDecl| is just the enumerator name without an identifier,
* this expression compiles fine. However, if |aEnumeratorDecl| includes an
@ -99,22 +99,21 @@
* compile in expression context, since |eEnumerator| is not an lvalue.
*
* (The static_assert itself should always pass in the absence of the above
* error, since you can't get a higher enumerator value without having
* error, since you can't get a negative enumerator value without having
* an initializer somewhere. It just provides a place to put the expression
* we want to form.)
*/
#define MOZ_ASSERT_ENUMERATOR_HAS_NO_INITIALIZER(aEnumName, prefix, \
aEnumeratorDecl) \
#define MOZ_ASSERT_ENUMERATOR_HAS_NO_INITIALIZER(aEnumName, aEnumeratorDecl) \
static_assert( \
(aEnumName::aEnumeratorDecl) <= aEnumName(prefix##Highest##aEnumName), \
(aEnumName::aEnumeratorDecl) >= aEnumName(0), \
"MOZ_DEFINE_ENUM does not allow enumerators to have initializers");
#define MOZ_DEFINE_ENUM_IMPL(aEnumName, aClassSpec, aBaseSpec, aEnumerators) \
enum aClassSpec aEnumName aBaseSpec{MOZ_UNWRAP_ARGS aEnumerators}; \
constexpr size_t k##aEnumName##Count = MOZ_ARG_COUNT aEnumerators; \
constexpr aEnumName kHighest##aEnumName = \
constexpr aEnumName k##Highest##aEnumName = \
aEnumName(k##aEnumName##Count - 1); \
MOZ_FOR_EACH(MOZ_ASSERT_ENUMERATOR_HAS_NO_INITIALIZER, (aEnumName, k, ), \
MOZ_FOR_EACH(MOZ_ASSERT_ENUMERATOR_HAS_NO_INITIALIZER, (aEnumName, ), \
aEnumerators)
#define MOZ_DEFINE_ENUM(aEnumName, aEnumerators) \
@ -133,9 +132,9 @@
aEnumerators) \
enum aClassSpec aEnumName aBaseSpec{MOZ_UNWRAP_ARGS aEnumerators}; \
constexpr static size_t s##aEnumName##Count = MOZ_ARG_COUNT aEnumerators; \
constexpr static aEnumName sHighest##aEnumName = \
constexpr static aEnumName s##Highest##aEnumName = \
aEnumName(s##aEnumName##Count - 1); \
MOZ_FOR_EACH(MOZ_ASSERT_ENUMERATOR_HAS_NO_INITIALIZER, (aEnumName, s, ), \
MOZ_FOR_EACH(MOZ_ASSERT_ENUMERATOR_HAS_NO_INITIALIZER, (aEnumName, ), \
aEnumerators)
#define MOZ_DEFINE_ENUM_AT_CLASS_SCOPE(aEnumName, aEnumerators) \

View File

@ -45,7 +45,7 @@ jobs:
fetches:
toolchain:
- linux64-clang
- linux64-gcc-9
- linux64-gcc-8
- linux64-gcc-sixgill
- linux64-rust
- linux64-cbindgen
@ -67,7 +67,7 @@ jobs:
fetches:
toolchain:
- linux64-clang
- linux64-gcc-9
- linux64-gcc-8
- linux64-gcc-sixgill
- linux64-rust
- linux64-cbindgen

View File

@ -69,10 +69,10 @@ linux64-gcc-sixgill:
fetches:
fetch:
- binutils-2.31.1
- gcc-9.1.0
- gcc-8.3.0
- gmp-6.1.0
- isl-0.16.1
- mpc-1.0.3
- mpfr-3.1.4
toolchain:
- linux64-gcc-9
- linux64-gcc-8

View File

@ -11,7 +11,7 @@ root_dir=$MOZ_FETCHES_DIR
build_dir=$GECKO_PATH/build
data_dir=$GECKO_PATH/build/unix/build-gcc
sixgill_rev=f31866457f60
sixgill_rev=60e06b912fc8
sixgill_repo=https://hg.mozilla.org/users/sfink_mozilla.com/sixgill
. $data_dir/build-gcc.sh