mirror of https://github.com/mongodb/mongo
SERVER-98608 Update MozJS to 115.19 (#31793)
GitOrigin-RevId: d40dc08384d90ceb56477d285c5b6c0c771c77e7
This commit is contained in:
parent
e1010a6c79
commit
bf8f6cb705
|
|
@ -39,7 +39,7 @@ a notice will be included in
|
|||
| [librdkafka] | BSD-2-Clause | 2.0.2 | | |
|
||||
| [linenoise] | BSD-3-Clause | 6cdc775 + changes | | ✗ |
|
||||
| [mongo-c-driver] | Apache-2.0 | 1.27.6 | ✗ | ✗ |
|
||||
| [MozJS] | MPL-2.0 | ESR 115.7 | | ✗ |
|
||||
| [Mozilla Firefox] | MPL-2.0 | 115.19.0esr | unknown | ✗ |
|
||||
| [MurmurHash3] | Public Domain | Unknown + changes | ✗ | ✗ |
|
||||
| [ocspbuilder] | MIT | 0.10.2 | | |
|
||||
| [ocspresponder] | Apache-2.0 | 0.5.0 | | |
|
||||
|
|
@ -77,7 +77,7 @@ a notice will be included in
|
|||
[libstemmer]: https://github.com/snowballstem/snowball
|
||||
[librdkafka]: https://github.com/confluentinc/librdkafka
|
||||
[linenoise]: https://github.com/antirez/linenoise
|
||||
[MozJS]: https://www.mozilla.org/en-US/security/known-vulnerabilities/firefox-esr
|
||||
[Mozilla Firefox]: https://www.mozilla.org/en-US/security/known-vulnerabilities/firefox-esr
|
||||
[MurmurHash3]: https://github.com/aappleby/smhasher/blob/master/src/MurmurHash3.cpp
|
||||
[ocspbuilder]: https://github.com/wbond/ocspbuilder
|
||||
[ocspresponder]: https://github.com/threema-ch/ocspresponder
|
||||
|
|
|
|||
|
|
@ -942,7 +942,7 @@
|
|||
"name": "Organization: debian"
|
||||
},
|
||||
"name": "Mozilla Firefox",
|
||||
"version": "115.7.0esr",
|
||||
"version": "115.19.0esr",
|
||||
"licenses": [
|
||||
{
|
||||
"license": {
|
||||
|
|
@ -950,7 +950,7 @@
|
|||
}
|
||||
}
|
||||
],
|
||||
"purl": "pkg:deb/debian/firefox-esr@115.7.0esr-1",
|
||||
"purl": "pkg:deb/debian/firefox-esr@115.19.0esr-1",
|
||||
"properties": [
|
||||
{
|
||||
"name": "internal:team_responsible",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// Generated by make_intl_data.py. DO NOT EDIT.
|
||||
// tzdata version = 2023c
|
||||
// tzdata version = 2024a
|
||||
|
||||
#ifndef builtin_intl_TimeZoneDataGenerated_h
|
||||
#define builtin_intl_TimeZoneDataGenerated_h
|
||||
|
|
@ -22,8 +22,14 @@ const char* const ianaZonesTreatedAsLinksByICU[] = {
|
|||
"America/Ensenada", // America/Tijuana [backzone]
|
||||
"America/Indiana/Indianapolis", // America/Indianapolis [northamerica]
|
||||
"America/Kentucky/Louisville", // America/Louisville [northamerica]
|
||||
"America/Montreal", // America/Toronto [backzone]
|
||||
"America/Nipigon", // America/Toronto [backzone]
|
||||
"America/Nuuk", // America/Godthab [europe]
|
||||
"America/Pangnirtung", // America/Iqaluit [backzone]
|
||||
"America/Rainy_River", // America/Winnipeg [backzone]
|
||||
"America/Rosario", // America/Cordoba [backzone]
|
||||
"America/Thunder_Bay", // America/Toronto [backzone]
|
||||
"America/Yellowknife", // America/Edmonton [backzone]
|
||||
"Asia/Chongqing", // Asia/Shanghai [backzone]
|
||||
"Asia/Harbin", // Asia/Shanghai [backzone]
|
||||
"Asia/Ho_Chi_Minh", // Asia/Saigon [asia]
|
||||
|
|
@ -34,13 +40,17 @@ const char* const ianaZonesTreatedAsLinksByICU[] = {
|
|||
"Asia/Yangon", // Asia/Rangoon [asia]
|
||||
"Atlantic/Faroe", // Atlantic/Faeroe [europe]
|
||||
"Atlantic/Jan_Mayen", // Arctic/Longyearbyen [backzone]
|
||||
"Australia/Currie", // Australia/Hobart [backzone]
|
||||
"EST", // Etc/GMT+5 [northamerica]
|
||||
"Europe/Belfast", // Europe/London [backzone]
|
||||
"Europe/Kyiv", // Europe/Kiev [europe]
|
||||
"Europe/Tiraspol", // Europe/Chisinau [backzone]
|
||||
"Europe/Uzhgorod", // Europe/Kiev [backzone]
|
||||
"Europe/Zaporozhye", // Europe/Kiev [backzone]
|
||||
"HST", // Etc/GMT+10 [northamerica]
|
||||
"MST", // Etc/GMT+7 [northamerica]
|
||||
"Pacific/Chuuk", // Pacific/Truk [backzone]
|
||||
"Pacific/Johnston", // Pacific/Honolulu [backzone]
|
||||
"Pacific/Kanton", // Pacific/Enderbury [australasia]
|
||||
"Pacific/Pohnpei", // Pacific/Ponape [backzone]
|
||||
};
|
||||
|
|
@ -67,7 +77,6 @@ const LinkAndTarget ianaLinksCanonicalizedDifferentlyByICU[] = {
|
|||
{ "America/Lower_Princes", "America/Curacao" }, // America/Lower_Princes [backward]
|
||||
{ "America/Marigot", "America/Port_of_Spain" }, // America/Marigot [backward]
|
||||
{ "America/Mendoza", "America/Argentina/Mendoza" }, // America/Mendoza [backward]
|
||||
{ "America/Santa_Isabel", "America/Tijuana" }, // America/Santa_Isabel [backward]
|
||||
{ "America/St_Barthelemy", "America/Port_of_Spain" }, // America/St_Barthelemy [backward]
|
||||
{ "Antarctica/South_Pole", "Antarctica/McMurdo" }, // Pacific/Auckland [backward]
|
||||
{ "Arctic/Longyearbyen", "Europe/Oslo" }, // Arctic/Longyearbyen [backward]
|
||||
|
|
|
|||
|
|
@ -3100,20 +3100,14 @@ GCRuntime::MarkQueueProgress GCRuntime::processTestMarkQueue() {
|
|||
return QueueSuspended;
|
||||
}
|
||||
|
||||
// Mark the object and push it onto the stack.
|
||||
size_t oldPosition = marker().stack.position();
|
||||
marker().markAndTraverse<NormalMarkingOptions>(obj);
|
||||
|
||||
// If we overflow the stack here and delay marking, then we won't be
|
||||
// testing what we think we're testing.
|
||||
if (marker().stack.position() == oldPosition) {
|
||||
MOZ_ASSERT(obj->asTenured().arena()->onDelayedMarkingList());
|
||||
// Mark the object.
|
||||
AutoEnterOOMUnsafeRegion oomUnsafe;
|
||||
if (!marker().markOneObjectForTest(obj)) {
|
||||
// If we overflowed the stack here and delayed marking, then we won't be
|
||||
// testing what we think we're testing.
|
||||
MOZ_ASSERT(obj->asTenured().arena()->onDelayedMarkingList());
|
||||
oomUnsafe.crash("Overflowed stack while marking test queue");
|
||||
}
|
||||
|
||||
SliceBudget unlimited = SliceBudget::unlimited();
|
||||
marker().processMarkStackTop<NormalMarkingOptions>(unlimited);
|
||||
} else if (val.isString()) {
|
||||
JSLinearString* str = &val.toString()->asLinear();
|
||||
if (js::StringEqualsLiteral(str, "yield") && isIncrementalGc()) {
|
||||
|
|
@ -3604,10 +3598,7 @@ void GCRuntime::incrementalSlice(SliceBudget& budget, JS::GCReason reason,
|
|||
|
||||
case State::Mark:
|
||||
if (mightSweepInThisSlice(budget.isUnlimited())) {
|
||||
// Trace wrapper rooters before marking if we might start sweeping in
|
||||
// this slice.
|
||||
rt->mainContextFromOwnThread()->traceWrapperGCRooters(
|
||||
marker().tracer());
|
||||
prepareForSweepSlice(reason);
|
||||
}
|
||||
|
||||
{
|
||||
|
|
@ -3656,13 +3647,8 @@ void GCRuntime::incrementalSlice(SliceBudget& budget, JS::GCReason reason,
|
|||
[[fallthrough]];
|
||||
|
||||
case State::Sweep:
|
||||
if (storeBuffer().mayHavePointersToDeadCells()) {
|
||||
collectNurseryFromMajorGC(reason);
|
||||
}
|
||||
|
||||
if (initialState == State::Sweep) {
|
||||
rt->mainContextFromOwnThread()->traceWrapperGCRooters(
|
||||
marker().tracer());
|
||||
prepareForSweepSlice(reason);
|
||||
}
|
||||
|
||||
if (performSweepActions(budget) == NotFinished) {
|
||||
|
|
|
|||
|
|
@ -38,7 +38,9 @@ namespace gc {
|
|||
enum IncrementalProgress { NotFinished = 0, Finished };
|
||||
|
||||
class AutoSetMarkColor;
|
||||
class AutoUpdateMarkStackRanges;
|
||||
struct Cell;
|
||||
class MarkStackIter;
|
||||
class ParallelMarker;
|
||||
class UnmarkGrayTracer;
|
||||
|
||||
|
|
@ -117,6 +119,7 @@ class MarkStack {
|
|||
public:
|
||||
TaggedPtr() = default;
|
||||
TaggedPtr(Tag tag, Cell* ptr);
|
||||
uintptr_t asBits() const;
|
||||
Tag tag() const;
|
||||
uintptr_t tagUnchecked() const;
|
||||
template <typename T>
|
||||
|
|
@ -136,10 +139,13 @@ class MarkStack {
|
|||
size_t start() const;
|
||||
TaggedPtr ptr() const;
|
||||
|
||||
void setStart(size_t newStart);
|
||||
void setEmpty();
|
||||
|
||||
private:
|
||||
static constexpr size_t StartShift = 2;
|
||||
static constexpr size_t KindMask = (1 << StartShift) - 1;
|
||||
|
||||
private:
|
||||
uintptr_t startAndKind_;
|
||||
TaggedPtr ptr_;
|
||||
};
|
||||
|
|
@ -224,6 +230,13 @@ class MarkStack {
|
|||
// The maximum stack capacity to grow to.
|
||||
MainThreadOrGCTaskData<size_t> maxCapacity_{SIZE_MAX};
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
MainThreadOrGCTaskData<bool> elementsRangesAreValid;
|
||||
friend class js::GCMarker;
|
||||
#endif
|
||||
|
||||
friend class MarkStackIter;
|
||||
};
|
||||
|
||||
static_assert(unsigned(SlotsOrElementsKind::Unused) ==
|
||||
|
|
@ -232,6 +245,25 @@ static_assert(unsigned(SlotsOrElementsKind::Unused) ==
|
|||
"difference between SlotsOrElementsRange::startAndKind_ and a "
|
||||
"tagged SlotsOrElementsRange");
|
||||
|
||||
class MOZ_STACK_CLASS MarkStackIter {
|
||||
MarkStack& stack_;
|
||||
size_t pos_;
|
||||
|
||||
public:
|
||||
explicit MarkStackIter(MarkStack& stack);
|
||||
|
||||
bool done() const;
|
||||
void next();
|
||||
|
||||
MarkStack::Tag peekTag() const;
|
||||
bool isSlotsOrElementsRange() const;
|
||||
MarkStack::SlotsOrElementsRange& slotsOrElementsRange();
|
||||
|
||||
private:
|
||||
size_t position() const;
|
||||
MarkStack::TaggedPtr peekPtr() const;
|
||||
};
|
||||
|
||||
// Bitmask of options to parameterize MarkingTracerT.
|
||||
namespace MarkingOptions {
|
||||
enum : uint32_t {
|
||||
|
|
@ -361,6 +393,8 @@ class GCMarker {
|
|||
void setCheckAtomMarking(bool check);
|
||||
|
||||
bool shouldCheckCompartments() { return strictCompartmentChecking; }
|
||||
|
||||
bool markOneObjectForTest(JSObject* obj);
|
||||
#endif
|
||||
|
||||
bool markCurrentColorInParallel(SliceBudget& budget);
|
||||
|
|
@ -403,6 +437,13 @@ class GCMarker {
|
|||
template <typename Tracer>
|
||||
void setMarkingStateAndTracer(MarkingState prev, MarkingState next);
|
||||
|
||||
// The mutator can shift object elements which could invalidate any elements
|
||||
// index on the mark stack. Change the index to be relative to the elements
|
||||
// allocation (to ignore shifted elements) while the mutator is running.
|
||||
void updateRangesAtStartOfSlice();
|
||||
void updateRangesAtEndOfSlice();
|
||||
friend class gc::AutoUpdateMarkStackRanges;
|
||||
|
||||
template <uint32_t markingOptions>
|
||||
bool processMarkStackTop(SliceBudget& budget);
|
||||
friend class gc::GCRuntime;
|
||||
|
|
|
|||
|
|
@ -875,6 +875,7 @@ class GCRuntime {
|
|||
void sweepBackgroundThings(ZoneList& zones);
|
||||
void backgroundFinalize(JS::GCContext* gcx, Zone* zone, AllocKind kind,
|
||||
Arena** empty);
|
||||
void prepareForSweepSlice(JS::GCReason reason);
|
||||
void assertBackgroundSweepingFinished();
|
||||
|
||||
bool allCCVisibleZonesWereCollected();
|
||||
|
|
|
|||
|
|
@ -1307,9 +1307,20 @@ bool GCMarker::doMarking(SliceBudget& budget, ShouldReportMarkTime reportTime) {
|
|||
return true;
|
||||
}
|
||||
|
||||
class MOZ_RAII gc::AutoUpdateMarkStackRanges {
|
||||
GCMarker& marker_;
|
||||
|
||||
public:
|
||||
explicit AutoUpdateMarkStackRanges(GCMarker& marker) : marker_(marker) {
|
||||
marker_.updateRangesAtStartOfSlice();
|
||||
}
|
||||
~AutoUpdateMarkStackRanges() { marker_.updateRangesAtEndOfSlice(); }
|
||||
};
|
||||
|
||||
template <uint32_t opts, MarkColor color>
|
||||
bool GCMarker::markOneColor(SliceBudget& budget) {
|
||||
AutoSetMarkColor setColor(*this, color);
|
||||
AutoUpdateMarkStackRanges updateRanges(*this);
|
||||
|
||||
while (processMarkStackTop<opts>(budget)) {
|
||||
if (stack.isEmpty()) {
|
||||
|
|
@ -1321,6 +1332,8 @@ bool GCMarker::markOneColor(SliceBudget& budget) {
|
|||
}
|
||||
|
||||
bool GCMarker::markCurrentColorInParallel(SliceBudget& budget) {
|
||||
AutoUpdateMarkStackRanges updateRanges(*this);
|
||||
|
||||
ParallelMarker::AtomicCount& waitingTaskCount =
|
||||
parallelMarker_->waitingTaskCountRef();
|
||||
|
||||
|
|
@ -1340,6 +1353,26 @@ bool GCMarker::markCurrentColorInParallel(SliceBudget& budget) {
|
|||
return false;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
bool GCMarker::markOneObjectForTest(JSObject* obj) {
|
||||
MOZ_ASSERT(obj->zone()->isGCMarking());
|
||||
MOZ_ASSERT(!obj->isMarked(markColor()));
|
||||
|
||||
size_t oldPosition = stack.position();
|
||||
markAndTraverse<NormalMarkingOptions>(obj);
|
||||
if (stack.position() == oldPosition) {
|
||||
return false;
|
||||
}
|
||||
|
||||
AutoUpdateMarkStackRanges updateRanges(*this);
|
||||
|
||||
SliceBudget unlimited = SliceBudget::unlimited();
|
||||
processMarkStackTop<NormalMarkingOptions>(unlimited);
|
||||
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline void CheckForCompartmentMismatch(JSObject* obj, JSObject* obj2) {
|
||||
#ifdef DEBUG
|
||||
if (MOZ_UNLIKELY(obj->compartment() != obj2->compartment())) {
|
||||
|
|
@ -1366,6 +1399,47 @@ static inline size_t NumUsedDynamicSlots(NativeObject* obj) {
|
|||
return nslots - nfixed;
|
||||
}
|
||||
|
||||
void GCMarker::updateRangesAtStartOfSlice() {
|
||||
for (MarkStackIter iter(stack); !iter.done(); iter.next()) {
|
||||
if (iter.isSlotsOrElementsRange()) {
|
||||
MarkStack::SlotsOrElementsRange& range = iter.slotsOrElementsRange();
|
||||
JSObject* obj = range.ptr().asRangeObject();
|
||||
if (!obj->is<NativeObject>()) {
|
||||
range.setEmpty();
|
||||
} else if (range.kind() == SlotsOrElementsKind::Elements) {
|
||||
NativeObject* obj = &range.ptr().asRangeObject()->as<NativeObject>();
|
||||
size_t index = range.start();
|
||||
size_t numShifted = obj->getElementsHeader()->numShiftedElements();
|
||||
index -= std::min(numShifted, index);
|
||||
range.setStart(index);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
MOZ_ASSERT(!stack.elementsRangesAreValid);
|
||||
stack.elementsRangesAreValid = true;
|
||||
#endif
|
||||
}
|
||||
|
||||
void GCMarker::updateRangesAtEndOfSlice() {
|
||||
for (MarkStackIter iter(stack); !iter.done(); iter.next()) {
|
||||
if (iter.isSlotsOrElementsRange()) {
|
||||
MarkStack::SlotsOrElementsRange& range = iter.slotsOrElementsRange();
|
||||
if (range.kind() == SlotsOrElementsKind::Elements) {
|
||||
NativeObject* obj = &range.ptr().asRangeObject()->as<NativeObject>();
|
||||
size_t numShifted = obj->getElementsHeader()->numShiftedElements();
|
||||
range.setStart(range.start() + numShifted);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
MOZ_ASSERT(stack.elementsRangesAreValid);
|
||||
stack.elementsRangesAreValid = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
template <uint32_t opts>
|
||||
inline bool GCMarker::processMarkStackTop(SliceBudget& budget) {
|
||||
/*
|
||||
|
|
@ -1379,6 +1453,7 @@ inline bool GCMarker::processMarkStackTop(SliceBudget& budget) {
|
|||
*/
|
||||
|
||||
MOZ_ASSERT(!stack.isEmpty());
|
||||
MOZ_ASSERT(stack.elementsRangesAreValid);
|
||||
MOZ_ASSERT_IF(markColor() == MarkColor::Gray, !hasBlackEntries());
|
||||
|
||||
JSObject* obj; // The object being scanned.
|
||||
|
|
@ -1409,12 +1484,7 @@ inline bool GCMarker::processMarkStackTop(SliceBudget& budget) {
|
|||
|
||||
case SlotsOrElementsKind::Elements: {
|
||||
base = nobj->getDenseElements();
|
||||
|
||||
// Account for shifted elements.
|
||||
size_t numShifted = nobj->getElementsHeader()->numShiftedElements();
|
||||
size_t initlen = nobj->getDenseInitializedLength();
|
||||
index = std::max(index, numShifted) - numShifted;
|
||||
end = initlen;
|
||||
end = nobj->getDenseInitializedLength();
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -1590,17 +1660,17 @@ struct MapTypeToMarkStackTag<BaseScript*> {
|
|||
static const auto value = MarkStack::ScriptTag;
|
||||
};
|
||||
|
||||
#ifdef DEBUG
|
||||
static inline bool TagIsRangeTag(MarkStack::Tag tag) {
|
||||
return tag == MarkStack::SlotsOrElementsRangeTag;
|
||||
}
|
||||
#endif
|
||||
|
||||
inline MarkStack::TaggedPtr::TaggedPtr(Tag tag, Cell* ptr)
|
||||
: bits(tag | uintptr_t(ptr)) {
|
||||
assertValid();
|
||||
}
|
||||
|
||||
inline uintptr_t MarkStack::TaggedPtr::asBits() const { return bits; }
|
||||
|
||||
inline uintptr_t MarkStack::TaggedPtr::tagUnchecked() const {
|
||||
return bits & TagMask;
|
||||
}
|
||||
|
|
@ -1661,6 +1731,17 @@ inline size_t MarkStack::SlotsOrElementsRange::start() const {
|
|||
return startAndKind_ >> StartShift;
|
||||
}
|
||||
|
||||
inline void MarkStack::SlotsOrElementsRange::setStart(size_t newStart) {
|
||||
startAndKind_ = (newStart << StartShift) | uintptr_t(kind());
|
||||
MOZ_ASSERT(start() == newStart);
|
||||
}
|
||||
|
||||
inline void MarkStack::SlotsOrElementsRange::setEmpty() {
|
||||
TaggedPtr entry = TaggedPtr(ObjectTag, ptr().asRangeObject());
|
||||
ptr_ = entry;
|
||||
startAndKind_ = entry.asBits();
|
||||
}
|
||||
|
||||
inline MarkStack::TaggedPtr MarkStack::SlotsOrElementsRange::ptr() const {
|
||||
return ptr_;
|
||||
}
|
||||
|
|
@ -1931,6 +2012,45 @@ size_t MarkStack::sizeOfExcludingThis(
|
|||
return stack().sizeOfExcludingThis(mallocSizeOf);
|
||||
}
|
||||
|
||||
MarkStackIter::MarkStackIter(MarkStack& stack)
|
||||
: stack_(stack), pos_(stack.position()) {}
|
||||
|
||||
inline size_t MarkStackIter::position() const { return pos_; }
|
||||
|
||||
inline bool MarkStackIter::done() const { return position() == 0; }
|
||||
|
||||
inline void MarkStackIter::next() {
|
||||
if (isSlotsOrElementsRange()) {
|
||||
MOZ_ASSERT(position() >= ValueRangeWords);
|
||||
pos_ -= ValueRangeWords;
|
||||
return;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(!done());
|
||||
pos_--;
|
||||
}
|
||||
|
||||
inline bool MarkStackIter::isSlotsOrElementsRange() const {
|
||||
return TagIsRangeTag(peekTag());
|
||||
}
|
||||
|
||||
inline MarkStack::Tag MarkStackIter::peekTag() const { return peekPtr().tag(); }
|
||||
|
||||
inline MarkStack::TaggedPtr MarkStackIter::peekPtr() const {
|
||||
MOZ_ASSERT(!done());
|
||||
return stack_.stack()[pos_ - 1];
|
||||
}
|
||||
|
||||
inline MarkStack::SlotsOrElementsRange& MarkStackIter::slotsOrElementsRange() {
|
||||
MOZ_ASSERT(TagIsRangeTag(peekTag()));
|
||||
MOZ_ASSERT(position() >= ValueRangeWords);
|
||||
|
||||
MarkStack::TaggedPtr* ptr = &stack_.stack()[pos_ - ValueRangeWords];
|
||||
auto& range = *reinterpret_cast<MarkStack::SlotsOrElementsRange*>(ptr);
|
||||
range.assertValid();
|
||||
return range;
|
||||
}
|
||||
|
||||
/*** GCMarker ***************************************************************/
|
||||
|
||||
/*
|
||||
|
|
@ -2244,6 +2364,7 @@ void GCRuntime::processDelayedMarkingList(MarkColor color) {
|
|||
// were added.
|
||||
|
||||
AutoSetMarkColor setColor(marker(), color);
|
||||
AutoUpdateMarkStackRanges updateRanges(marker());
|
||||
|
||||
do {
|
||||
delayedMarkingWorkAdded = false;
|
||||
|
|
|
|||
|
|
@ -557,14 +557,17 @@ IncrementalProgress GCRuntime::markWeakReferencesInCurrentGroup(
|
|||
template <class ZoneIterT>
|
||||
IncrementalProgress GCRuntime::markGrayRoots(SliceBudget& budget,
|
||||
gcstats::PhaseKind phase) {
|
||||
MOZ_ASSERT(marker().markColor() == MarkColor::Gray);
|
||||
MOZ_ASSERT(marker().markColor() == MarkColor::Black);
|
||||
|
||||
gcstats::AutoPhase ap(stats(), phase);
|
||||
|
||||
{
|
||||
AutoSetMarkColor setColorGray(marker(), MarkColor::Gray);
|
||||
|
||||
AutoUpdateLiveCompartments updateLive(this);
|
||||
marker().setRootMarkingMode(true);
|
||||
auto guard =
|
||||
mozilla::MakeScopeExit([this]() { marker().setRootMarkingMode(false); });
|
||||
auto guard = mozilla::MakeScopeExit(
|
||||
[this]() { marker().setRootMarkingMode(false); });
|
||||
|
||||
IncrementalProgress result =
|
||||
traceEmbeddingGrayRoots(marker().tracer(), budget);
|
||||
|
|
@ -574,6 +577,12 @@ IncrementalProgress GCRuntime::markGrayRoots(SliceBudget& budget,
|
|||
|
||||
Compartment::traceIncomingCrossCompartmentEdgesForZoneGC(
|
||||
marker().tracer(), Compartment::GrayEdges);
|
||||
}
|
||||
|
||||
// Also mark any incoming cross compartment edges that were originally gray
|
||||
// but have been marked black by a barrier.
|
||||
Compartment::traceIncomingCrossCompartmentEdgesForZoneGC(
|
||||
marker().tracer(), Compartment::BlackEdges);
|
||||
|
||||
return Finished;
|
||||
}
|
||||
|
|
@ -1121,8 +1130,6 @@ IncrementalProgress GCRuntime::markGrayRootsInCurrentGroup(
|
|||
JS::GCContext* gcx, SliceBudget& budget) {
|
||||
gcstats::AutoPhase ap(stats(), gcstats::PhaseKind::MARK);
|
||||
|
||||
AutoSetMarkColor setColorGray(marker(), MarkColor::Gray);
|
||||
|
||||
return markGrayRoots<SweepGroupZonesIter>(budget,
|
||||
gcstats::PhaseKind::MARK_GRAY);
|
||||
}
|
||||
|
|
@ -2269,7 +2276,26 @@ bool GCRuntime::initSweepActions() {
|
|||
return sweepActions != nullptr;
|
||||
}
|
||||
|
||||
void GCRuntime::prepareForSweepSlice(JS::GCReason reason) {
|
||||
// Work that must be done at the start of each slice where we sweep.
|
||||
//
|
||||
// Since this must happen at the start of the slice, it must be called in
|
||||
// marking slices before any sweeping happens. Therefore it is called
|
||||
// conservatively since we may not always transition to sweeping from marking.
|
||||
|
||||
// Clear out whole cell store buffer entries to unreachable cells.
|
||||
if (storeBuffer().mayHavePointersToDeadCells()) {
|
||||
collectNurseryFromMajorGC(reason);
|
||||
}
|
||||
|
||||
// Trace wrapper rooters before marking if we might start sweeping in
|
||||
// this slice.
|
||||
rt->mainContextFromOwnThread()->traceWrapperGCRooters(marker().tracer());
|
||||
}
|
||||
|
||||
IncrementalProgress GCRuntime::performSweepActions(SliceBudget& budget) {
|
||||
MOZ_ASSERT(!storeBuffer().mayHavePointersToDeadCells());
|
||||
|
||||
AutoMajorGCProfilerEntry s(this);
|
||||
gcstats::AutoPhase ap(stats(), gcstats::PhaseKind::SWEEP);
|
||||
|
||||
|
|
@ -2283,21 +2309,20 @@ IncrementalProgress GCRuntime::performSweepActions(SliceBudget& budget) {
|
|||
// Drain the mark stack, possibly in a parallel task if we're in a part of
|
||||
// sweeping that allows it.
|
||||
//
|
||||
// In the first sweep slice where we must not yield to the mutator until we've
|
||||
// starting sweeping a sweep group but in that case the stack must be empty
|
||||
// already.
|
||||
// The first time we enter the sweep phase we must not yield to the mutator
|
||||
// until we've starting sweeping a sweep group but in that case the stack must
|
||||
// be empty already.
|
||||
|
||||
#ifdef DEBUG
|
||||
MOZ_ASSERT(initialState <= State::Sweep);
|
||||
if (initialState != State::Sweep) {
|
||||
assertNoMarkingWork();
|
||||
}
|
||||
#endif
|
||||
bool startOfSweeping = initialState < State::Sweep;
|
||||
|
||||
if (initialState == State::Sweep &&
|
||||
markDuringSweeping(gcx, budget) == NotFinished) {
|
||||
if (startOfSweeping) {
|
||||
assertNoMarkingWork();
|
||||
} else {
|
||||
if (markDuringSweeping(gcx, budget) == NotFinished) {
|
||||
return NotFinished;
|
||||
}
|
||||
}
|
||||
|
||||
// Then continue running sweep actions.
|
||||
|
||||
|
|
|
|||
|
|
@ -613,9 +613,13 @@ void js::gc::MarkingValidator::nonIncrementalMark(AutoGCSession& session) {
|
|||
zone->changeGCState(zone->initialMarkingState(), Zone::MarkBlackAndGray);
|
||||
}
|
||||
|
||||
AutoSetMarkColor setColorGray(*gcmarker, MarkColor::Gray);
|
||||
|
||||
/*
|
||||
* markAllGrayReferences may mark both gray and black, so it manages the
|
||||
* mark color internally.
|
||||
*/
|
||||
gc->markAllGrayReferences(gcstats::PhaseKind::MARK_GRAY);
|
||||
|
||||
AutoSetMarkColor setColorGray(*gcmarker, MarkColor::Gray);
|
||||
gc->markAllWeakReferences();
|
||||
|
||||
/* Restore zone state. */
|
||||
|
|
|
|||
|
|
@ -54,9 +54,11 @@ class js::jit::BailoutStack {
|
|||
# pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#if !defined(JS_CODEGEN_NONE)
|
||||
// Make sure the compiler doesn't add extra padding on 32-bit platforms.
|
||||
static_assert((sizeof(BailoutStack) % 8) == 0,
|
||||
"BailoutStack should be 8-byte aligned.");
|
||||
#endif
|
||||
|
||||
BailoutFrameInfo::BailoutFrameInfo(const JitActivationIterator& activations,
|
||||
BailoutStack* bailout)
|
||||
|
|
|
|||
|
|
@ -125,6 +125,8 @@ class MOZ_STACK_CLASS BaselineStackBuilder {
|
|||
|
||||
BailoutKind bailoutKind_;
|
||||
|
||||
bool canUseTrialInlinedICScripts_ = true;
|
||||
|
||||
// The baseline frames we will reconstruct on the heap are not
|
||||
// rooted, so GC must be suppressed.
|
||||
gc::AutoSuppressGC suppress_;
|
||||
|
|
@ -486,7 +488,8 @@ void BaselineStackBuilder::setNextCallee(
|
|||
JSFunction* nextCallee, TrialInliningState trialInliningState) {
|
||||
nextCallee_ = nextCallee;
|
||||
|
||||
if (trialInliningState == TrialInliningState::Inlined) {
|
||||
if (trialInliningState == TrialInliningState::Inlined &&
|
||||
canUseTrialInlinedICScripts_) {
|
||||
// Update icScript_ to point to the icScript of nextCallee
|
||||
const uint32_t pcOff = script_->pcToOffset(pc_);
|
||||
icScript_ = icScript_->findInlinedChild(pcOff);
|
||||
|
|
@ -496,6 +499,9 @@ void BaselineStackBuilder::setNextCallee(
|
|||
// inlined ICScript available, but we also could not if we transitioned
|
||||
// to TrialInliningState::Failure after being monomorphic inlined.
|
||||
icScript_ = nextCallee->nonLazyScript()->jitScript()->icScript();
|
||||
if (trialInliningState != TrialInliningState::MonomorphicInlined) {
|
||||
canUseTrialInlinedICScripts_ = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -498,9 +498,14 @@ enum class NativeGetPropKind {
|
|||
|
||||
static NativeGetPropKind IsCacheableGetPropCall(NativeObject* obj,
|
||||
NativeObject* holder,
|
||||
PropertyInfo prop) {
|
||||
PropertyInfo prop,
|
||||
jsbytecode* pc = nullptr) {
|
||||
MOZ_ASSERT(IsCacheableProtoChain(obj, holder));
|
||||
|
||||
if (pc && JSOp(*pc) == JSOp::GetBoundName) {
|
||||
return NativeGetPropKind::None;
|
||||
}
|
||||
|
||||
if (!prop.isAccessorProperty()) {
|
||||
return NativeGetPropKind::None;
|
||||
}
|
||||
|
|
@ -593,7 +598,7 @@ static NativeGetPropKind CanAttachNativeGetProp(JSContext* cx, JSObject* obj,
|
|||
return NativeGetPropKind::Slot;
|
||||
}
|
||||
|
||||
return IsCacheableGetPropCall(nobj, *holder, propInfo->ref());
|
||||
return IsCacheableGetPropCall(nobj, *holder, propInfo->ref(), pc);
|
||||
}
|
||||
|
||||
if (!prop.isFound()) {
|
||||
|
|
@ -3130,7 +3135,7 @@ AttachDecision GetNameIRGenerator::tryAttachGlobalNameGetter(ObjOperandId objId,
|
|||
|
||||
GlobalObject* global = &globalLexical->global();
|
||||
|
||||
NativeGetPropKind kind = IsCacheableGetPropCall(global, holder, *prop);
|
||||
NativeGetPropKind kind = IsCacheableGetPropCall(global, holder, *prop, pc_);
|
||||
if (kind != NativeGetPropKind::NativeGetter &&
|
||||
kind != NativeGetPropKind::ScriptedGetter) {
|
||||
return AttachDecision::NoAction;
|
||||
|
|
|
|||
|
|
@ -747,13 +747,13 @@ static bool IsDiamondPattern(MBasicBlock* initialBlock) {
|
|||
MTest* initialTest = ins->toTest();
|
||||
|
||||
MBasicBlock* trueBranch = initialTest->ifTrue();
|
||||
if (trueBranch->numPredecessors() != 1 || trueBranch->numSuccessors() != 1) {
|
||||
if (trueBranch->numPredecessors() != 1 || !trueBranch->lastIns()->isGoto()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
MBasicBlock* falseBranch = initialTest->ifFalse();
|
||||
if (falseBranch->numPredecessors() != 1 ||
|
||||
falseBranch->numSuccessors() != 1) {
|
||||
!falseBranch->lastIns()->isGoto()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -656,11 +656,10 @@ static JitFrameLayout* GetLastProfilingFrame(ResumeFromException* rfe) {
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
void HandleExceptionWasm(JSContext* cx, wasm::WasmFrameIter* iter,
|
||||
static void HandleExceptionWasm(JSContext* cx, wasm::WasmFrameIter* iter,
|
||||
ResumeFromException* rfe) {
|
||||
MOZ_ASSERT(cx->activation()->asJit()->hasWasmExitFP());
|
||||
wasm::HandleThrow(cx, *iter, rfe);
|
||||
MOZ_ASSERT(iter->done());
|
||||
}
|
||||
|
||||
void HandleException(ResumeFromException* rfe) {
|
||||
|
|
@ -707,16 +706,16 @@ void HandleException(ResumeFromException* rfe) {
|
|||
if (iter.isWasm()) {
|
||||
prevJitFrame = nullptr;
|
||||
HandleExceptionWasm(cx, &iter.asWasm(), rfe);
|
||||
// If a wasm try-catch handler is found, we can immediately jump to it
|
||||
// and quit iterating through the stack.
|
||||
if (rfe->kind == ExceptionResumeKind::WasmCatch) {
|
||||
// Jump to a Wasm try-catch handler.
|
||||
MOZ_ASSERT(!iter.done());
|
||||
} else {
|
||||
// Return to the Wasm entry frame.
|
||||
MOZ_ASSERT(rfe->kind == ExceptionResumeKind::Wasm);
|
||||
MOZ_ASSERT(iter.done());
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (!iter.done()) {
|
||||
++iter;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
JSJitFrameIter& frame = iter.asJSJit();
|
||||
|
||||
|
|
@ -897,32 +896,32 @@ static void TraceThisAndArguments(JSTracer* trc, const JSJitFrameIter& frame,
|
|||
return;
|
||||
}
|
||||
|
||||
size_t nargs = layout->numActualArgs();
|
||||
size_t nformals = 0;
|
||||
|
||||
JSFunction* fun = CalleeTokenToFunction(layout->calleeToken());
|
||||
|
||||
size_t numFormals = fun->nargs();
|
||||
size_t numArgs = std::max(layout->numActualArgs(), numFormals);
|
||||
size_t firstArg = 0;
|
||||
|
||||
if (frame.type() != FrameType::JSJitToWasm &&
|
||||
!frame.isExitFrameLayout<CalledFromJitExitFrameLayout>() &&
|
||||
!fun->nonLazyScript()->mayReadFrameArgsDirectly()) {
|
||||
nformals = fun->nargs();
|
||||
firstArg = numFormals;
|
||||
}
|
||||
|
||||
size_t newTargetOffset = std::max(nargs, fun->nargs());
|
||||
|
||||
Value* argv = layout->thisAndActualArgs();
|
||||
|
||||
// Trace |this|.
|
||||
TraceRoot(trc, argv, "ion-thisv");
|
||||
|
||||
// Trace actual arguments beyond the formals. Note + 1 for thisv.
|
||||
for (size_t i = nformals + 1; i < nargs + 1; i++) {
|
||||
TraceRoot(trc, &argv[i], "ion-argv");
|
||||
// Trace arguments. Note + 1 for thisv.
|
||||
for (size_t i = firstArg; i < numArgs; i++) {
|
||||
TraceRoot(trc, &argv[i + 1], "ion-argv");
|
||||
}
|
||||
|
||||
// Always trace the new.target from the frame. It's not in the snapshots.
|
||||
// +1 to pass |this|
|
||||
if (CalleeTokenIsConstructing(layout->calleeToken())) {
|
||||
TraceRoot(trc, &argv[1 + newTargetOffset], "ion-newTarget");
|
||||
TraceRoot(trc, &argv[1 + numArgs], "ion-newTarget");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2662,11 +2662,11 @@ void MacroAssembler::emitMegamorphicCachedSetSlot(
|
|||
branchTest32(Assembler::Zero, scratch2, scratch2, &doAddDynamic);
|
||||
|
||||
AllocatableRegisterSet regs(RegisterSet::Volatile());
|
||||
LiveRegisterSet save(regs.asLiveSet());
|
||||
regs.takeUnchecked(scratch2);
|
||||
|
||||
LiveRegisterSet save(regs.asLiveSet());
|
||||
PushRegsInMask(save);
|
||||
|
||||
regs.takeUnchecked(scratch2);
|
||||
Register tmp;
|
||||
if (regs.has(obj)) {
|
||||
regs.takeUnchecked(obj);
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
#include "vm/JitActivation.h" // js::jit::JitActivation
|
||||
#include "vm/JSContext.h"
|
||||
#include "vm/StringType.h"
|
||||
#include "wasm/WasmStubs.h"
|
||||
|
||||
#include "jit/MacroAssembler-inl.h"
|
||||
|
||||
|
|
@ -3490,15 +3491,7 @@ void MacroAssemblerARMCompat::handleFailureWithHandlerTail(
|
|||
|
||||
// Found a wasm catch handler, restore state and jump to it.
|
||||
bind(&wasmCatch);
|
||||
{
|
||||
ScratchRegisterScope scratch(asMasm());
|
||||
ma_ldr(Address(sp, ResumeFromException::offsetOfTarget()), r1, scratch);
|
||||
ma_ldr(Address(sp, ResumeFromException::offsetOfFramePointer()), r11,
|
||||
scratch);
|
||||
ma_ldr(Address(sp, ResumeFromException::offsetOfStackPointer()), sp,
|
||||
scratch);
|
||||
}
|
||||
jump(r1);
|
||||
wasm::GenerateJumpToCatchHandler(asMasm(), sp, r0, r1);
|
||||
}
|
||||
|
||||
Assembler::Condition MacroAssemblerARMCompat::testStringTruthy(
|
||||
|
|
@ -4592,7 +4585,7 @@ void MacroAssembler::moveValue(const TypedOrValueRegister& src,
|
|||
return;
|
||||
}
|
||||
|
||||
ScratchFloat32Scope scratch(*this);
|
||||
ScratchDoubleScope scratch(*this);
|
||||
FloatRegister freg = reg.fpu();
|
||||
if (type == MIRType::Float32) {
|
||||
convertFloat32ToDouble(freg, scratch);
|
||||
|
|
@ -5843,11 +5836,13 @@ inline void EmitRemainderOrQuotient(bool isRemainder, MacroAssembler& masm,
|
|||
masm.quotient32(rhs, lhsOutput, isUnsigned);
|
||||
}
|
||||
} else {
|
||||
// Ensure that the output registers are saved and restored properly,
|
||||
MOZ_ASSERT(volatileLiveRegs.has(ReturnRegVal0));
|
||||
MOZ_ASSERT(volatileLiveRegs.has(ReturnRegVal1));
|
||||
// Ensure that the output registers are saved and restored properly.
|
||||
LiveRegisterSet liveRegs = volatileLiveRegs;
|
||||
liveRegs.addUnchecked(ReturnRegVal0);
|
||||
liveRegs.addUnchecked(ReturnRegVal1);
|
||||
|
||||
masm.PushRegsInMask(liveRegs);
|
||||
|
||||
masm.PushRegsInMask(volatileLiveRegs);
|
||||
using Fn = int64_t (*)(int, int);
|
||||
{
|
||||
ScratchRegisterScope scratch(masm);
|
||||
|
|
@ -5870,7 +5865,7 @@ inline void EmitRemainderOrQuotient(bool isRemainder, MacroAssembler& masm,
|
|||
|
||||
LiveRegisterSet ignore;
|
||||
ignore.add(lhsOutput);
|
||||
masm.PopRegsInMaskIgnore(volatileLiveRegs, ignore);
|
||||
masm.PopRegsInMaskIgnore(liveRegs, ignore);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -5899,10 +5894,12 @@ void MacroAssembler::flexibleDivMod32(Register rhs, Register lhsOutput,
|
|||
remainder32(rhs, remOutput, isUnsigned);
|
||||
quotient32(rhs, lhsOutput, isUnsigned);
|
||||
} else {
|
||||
// Ensure that the output registers are saved and restored properly,
|
||||
MOZ_ASSERT(volatileLiveRegs.has(ReturnRegVal0));
|
||||
MOZ_ASSERT(volatileLiveRegs.has(ReturnRegVal1));
|
||||
PushRegsInMask(volatileLiveRegs);
|
||||
// Ensure that the output registers are saved and restored properly.
|
||||
LiveRegisterSet liveRegs = volatileLiveRegs;
|
||||
liveRegs.addUnchecked(ReturnRegVal0);
|
||||
liveRegs.addUnchecked(ReturnRegVal1);
|
||||
|
||||
PushRegsInMask(liveRegs);
|
||||
|
||||
using Fn = int64_t (*)(int, int);
|
||||
{
|
||||
|
|
@ -5923,7 +5920,7 @@ void MacroAssembler::flexibleDivMod32(Register rhs, Register lhsOutput,
|
|||
LiveRegisterSet ignore;
|
||||
ignore.add(remOutput);
|
||||
ignore.add(lhsOutput);
|
||||
PopRegsInMaskIgnore(volatileLiveRegs, ignore);
|
||||
PopRegsInMaskIgnore(liveRegs, ignore);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -485,20 +485,11 @@ class FloatRegisters {
|
|||
static_assert(ShiftSingle == 0,
|
||||
"Or the NonVolatileMask must be computed differently");
|
||||
|
||||
// s31 is the ScratchFloatReg.
|
||||
static constexpr SetType NonVolatileSingleMask =
|
||||
SetType((1 << FloatRegisters::s8) | (1 << FloatRegisters::s9) |
|
||||
(1 << FloatRegisters::s10) | (1 << FloatRegisters::s11) |
|
||||
(1 << FloatRegisters::s12) | (1 << FloatRegisters::s13) |
|
||||
(1 << FloatRegisters::s14) | (1 << FloatRegisters::s15) |
|
||||
(1 << FloatRegisters::s16) | (1 << FloatRegisters::s17) |
|
||||
(1 << FloatRegisters::s18) | (1 << FloatRegisters::s19) |
|
||||
(1 << FloatRegisters::s20) | (1 << FloatRegisters::s21) |
|
||||
(1 << FloatRegisters::s22) | (1 << FloatRegisters::s23) |
|
||||
(1 << FloatRegisters::s24) | (1 << FloatRegisters::s25) |
|
||||
(1 << FloatRegisters::s26) | (1 << FloatRegisters::s27) |
|
||||
(1 << FloatRegisters::s28) | (1 << FloatRegisters::s29) |
|
||||
(1 << FloatRegisters::s30));
|
||||
(1 << FloatRegisters::s14) | (1 << FloatRegisters::s15));
|
||||
|
||||
static constexpr SetType NonVolatileMask =
|
||||
(NonVolatileSingleMask << ShiftSingle) |
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
#include "vm/JitActivation.h" // js::jit::JitActivation
|
||||
#include "vm/JSContext.h"
|
||||
#include "vm/StringType.h"
|
||||
#include "wasm/WasmStubs.h"
|
||||
|
||||
#include "jit/MacroAssembler-inl.h"
|
||||
|
||||
|
|
@ -370,16 +371,7 @@ void MacroAssemblerCompat::handleFailureWithHandlerTail(Label* profilerExitTail,
|
|||
|
||||
// Found a wasm catch handler, restore state and jump to it.
|
||||
bind(&wasmCatch);
|
||||
loadPtr(Address(PseudoStackPointer, ResumeFromException::offsetOfTarget()),
|
||||
r0);
|
||||
loadPtr(
|
||||
Address(PseudoStackPointer, ResumeFromException::offsetOfFramePointer()),
|
||||
r29);
|
||||
loadPtr(
|
||||
Address(PseudoStackPointer, ResumeFromException::offsetOfStackPointer()),
|
||||
PseudoStackPointer);
|
||||
syncStackPtr();
|
||||
Br(x0);
|
||||
wasm::GenerateJumpToCatchHandler(asMasm(), PseudoStackPointer, r0, r1);
|
||||
|
||||
MOZ_ASSERT(GetStackPointer64().Is(PseudoStackPointer64));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
#include "util/Memory.h"
|
||||
#include "vm/JitActivation.h" // js::jit::JitActivation
|
||||
#include "vm/JSContext.h"
|
||||
#include "wasm/WasmStubs.h"
|
||||
|
||||
#include "jit/MacroAssembler-inl.h"
|
||||
|
||||
|
|
@ -5341,12 +5342,7 @@ void MacroAssemblerLOONG64Compat::handleFailureWithHandlerTail(
|
|||
|
||||
// Found a wasm catch handler, restore state and jump to it.
|
||||
bind(&wasmCatch);
|
||||
loadPtr(Address(sp, ResumeFromException::offsetOfTarget()), a1);
|
||||
loadPtr(Address(StackPointer, ResumeFromException::offsetOfFramePointer()),
|
||||
FramePointer);
|
||||
loadPtr(Address(StackPointer, ResumeFromException::offsetOfStackPointer()),
|
||||
StackPointer);
|
||||
jump(a1);
|
||||
wasm::GenerateJumpToCatchHandler(asMasm(), sp, a1, a2);
|
||||
}
|
||||
|
||||
CodeOffset MacroAssemblerLOONG64Compat::toggledJump(Label* label) {
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
#include "util/Memory.h"
|
||||
#include "vm/JitActivation.h" // js::jit::JitActivation
|
||||
#include "vm/JSContext.h"
|
||||
#include "wasm/WasmStubs.h"
|
||||
|
||||
#include "jit/MacroAssembler-inl.h"
|
||||
|
||||
|
|
@ -1898,12 +1899,7 @@ void MacroAssemblerMIPSCompat::handleFailureWithHandlerTail(
|
|||
|
||||
// Found a wasm catch handler, restore state and jump to it.
|
||||
bind(&wasmCatch);
|
||||
loadPtr(Address(sp, ResumeFromException::offsetOfTarget()), a1);
|
||||
loadPtr(Address(StackPointer, ResumeFromException::offsetOfFramePointer()),
|
||||
FramePointer);
|
||||
loadPtr(Address(StackPointer, ResumeFromException::offsetOfStackPointer()),
|
||||
StackPointer);
|
||||
jump(a1);
|
||||
wasm::GenerateJumpToCatchHandler(asMasm(), sp, a1, a2);
|
||||
}
|
||||
|
||||
CodeOffset MacroAssemblerMIPSCompat::toggledJump(Label* label) {
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
#include "util/Memory.h"
|
||||
#include "vm/JitActivation.h" // js::jit::JitActivation
|
||||
#include "vm/JSContext.h"
|
||||
#include "wasm/WasmStubs.h"
|
||||
|
||||
#include "jit/MacroAssembler-inl.h"
|
||||
|
||||
|
|
@ -1923,12 +1924,7 @@ void MacroAssemblerMIPS64Compat::handleFailureWithHandlerTail(
|
|||
|
||||
// Found a wasm catch handler, restore state and jump to it.
|
||||
bind(&wasmCatch);
|
||||
loadPtr(Address(sp, ResumeFromException::offsetOfTarget()), a1);
|
||||
loadPtr(Address(StackPointer, ResumeFromException::offsetOfFramePointer()),
|
||||
FramePointer);
|
||||
loadPtr(Address(StackPointer, ResumeFromException::offsetOfStackPointer()),
|
||||
StackPointer);
|
||||
jump(a1);
|
||||
wasm::GenerateJumpToCatchHandler(asMasm(), sp, a1, a2);
|
||||
}
|
||||
|
||||
CodeOffset MacroAssemblerMIPS64Compat::toggledJump(Label* label) {
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
#include "util/Memory.h"
|
||||
#include "vm/JitActivation.h" // jit::JitActivation
|
||||
#include "vm/JSContext.h"
|
||||
#include "wasm/WasmStubs.h"
|
||||
|
||||
#include "jit/MacroAssembler-inl.h"
|
||||
|
||||
|
|
@ -2017,12 +2018,7 @@ void MacroAssemblerRiscv64Compat::handleFailureWithHandlerTail(
|
|||
|
||||
// Found a wasm catch handler, restore state and jump to it.
|
||||
bind(&wasmCatch);
|
||||
loadPtr(Address(sp, ResumeFromException::offsetOfTarget()), a1);
|
||||
loadPtr(Address(StackPointer, ResumeFromException::offsetOfFramePointer()),
|
||||
FramePointer);
|
||||
loadPtr(Address(StackPointer, ResumeFromException::offsetOfStackPointer()),
|
||||
StackPointer);
|
||||
jump(a1);
|
||||
wasm::GenerateJumpToCatchHandler(asMasm(), sp, a1, a2);
|
||||
}
|
||||
|
||||
CodeOffset MacroAssemblerRiscv64Compat::toggledJump(Label* label) {
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
#include "vm/JitActivation.h" // js::jit::JitActivation
|
||||
#include "vm/JSContext.h"
|
||||
#include "vm/StringType.h"
|
||||
#include "wasm/WasmStubs.h"
|
||||
|
||||
#include "jit/MacroAssembler-inl.h"
|
||||
|
||||
|
|
@ -632,10 +633,7 @@ void MacroAssemblerX64::handleFailureWithHandlerTail(Label* profilerExitTail,
|
|||
|
||||
// Found a wasm catch handler, restore state and jump to it.
|
||||
bind(&wasmCatch);
|
||||
loadPtr(Address(rsp, ResumeFromException::offsetOfTarget()), rax);
|
||||
loadPtr(Address(rsp, ResumeFromException::offsetOfFramePointer()), rbp);
|
||||
loadPtr(Address(rsp, ResumeFromException::offsetOfStackPointer()), rsp);
|
||||
jmp(Operand(rax));
|
||||
wasm::GenerateJumpToCatchHandler(asMasm(), rsp, rax, rbx);
|
||||
}
|
||||
|
||||
void MacroAssemblerX64::profilerEnterFrame(Register framePtr,
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
#include "vm/JitActivation.h" // js::jit::JitActivation
|
||||
#include "vm/JSContext.h"
|
||||
#include "vm/StringType.h"
|
||||
#include "wasm/WasmStubs.h"
|
||||
|
||||
#include "jit/MacroAssembler-inl.h"
|
||||
#include "vm/JSScript-inl.h"
|
||||
|
|
@ -637,10 +638,7 @@ void MacroAssemblerX86::handleFailureWithHandlerTail(Label* profilerExitTail,
|
|||
|
||||
// Found a wasm catch handler, restore state and jump to it.
|
||||
bind(&wasmCatch);
|
||||
loadPtr(Address(esp, ResumeFromException::offsetOfTarget()), eax);
|
||||
loadPtr(Address(esp, ResumeFromException::offsetOfFramePointer()), ebp);
|
||||
loadPtr(Address(esp, ResumeFromException::offsetOfStackPointer()), esp);
|
||||
jmp(Operand(eax));
|
||||
wasm::GenerateJumpToCatchHandler(asMasm(), esp, eax, ebx);
|
||||
}
|
||||
|
||||
void MacroAssemblerX86::profilerEnterFrame(Register framePtr,
|
||||
|
|
|
|||
|
|
@ -305,37 +305,6 @@ AsyncGeneratorRequest* AsyncGeneratorRequest::create(
|
|||
return AsyncGeneratorResume(cx, generator, CompletionKind::Throw, reason);
|
||||
}
|
||||
|
||||
// ES2022 draft rev 193211a3d889a61e74ef7da1475dfa356e029f29
|
||||
//
|
||||
// AsyncGeneratorUnwrapYieldResumption ( resumptionValue )
|
||||
// https://tc39.es/ecma262/#sec-asyncgeneratorunwrapyieldresumption
|
||||
//
|
||||
// Steps 1-2.
|
||||
[[nodiscard]] static bool AsyncGeneratorUnwrapYieldResumptionAndResume(
|
||||
JSContext* cx, Handle<AsyncGeneratorObject*> generator,
|
||||
CompletionKind completionKind, HandleValue resumptionValue) {
|
||||
// Step 1. If resumptionValue.[[Type]] is not return, return
|
||||
// Completion(resumptionValue).
|
||||
if (completionKind != CompletionKind::Return) {
|
||||
return AsyncGeneratorResume(cx, generator, completionKind, resumptionValue);
|
||||
}
|
||||
|
||||
// Step 2. Let awaited be Await(resumptionValue.[[Value]]).
|
||||
//
|
||||
// Since we don't have the place that handles return from yield
|
||||
// inside the generator, handle the case here, with extra state
|
||||
// State_AwaitingYieldReturn.
|
||||
generator->setAwaitingYieldReturn();
|
||||
|
||||
const PromiseHandler onFulfilled =
|
||||
PromiseHandler::AsyncGeneratorYieldReturnAwaitedFulfilled;
|
||||
const PromiseHandler onRejected =
|
||||
PromiseHandler::AsyncGeneratorYieldReturnAwaitedRejected;
|
||||
|
||||
return InternalAsyncGeneratorAwait(cx, generator, resumptionValue,
|
||||
onFulfilled, onRejected);
|
||||
}
|
||||
|
||||
// ES2022 draft rev 193211a3d889a61e74ef7da1475dfa356e029f29
|
||||
//
|
||||
// AsyncGeneratorYield ( value )
|
||||
|
|
@ -344,6 +313,9 @@ AsyncGeneratorRequest* AsyncGeneratorRequest::create(
|
|||
// Stesp 10-13.
|
||||
[[nodiscard]] static bool AsyncGeneratorYield(
|
||||
JSContext* cx, Handle<AsyncGeneratorObject*> generator, HandleValue value) {
|
||||
// Step 13.a.
|
||||
generator->setSuspendedYield();
|
||||
|
||||
// Step 10. Perform
|
||||
// ! AsyncGeneratorCompleteStep(generator, completion, false,
|
||||
// previousRealm).
|
||||
|
|
@ -351,37 +323,8 @@ AsyncGeneratorRequest* AsyncGeneratorRequest::create(
|
|||
return false;
|
||||
}
|
||||
|
||||
// Step 11. Let queue be generator.[[AsyncGeneratorQueue]].
|
||||
// Step 12. If queue is not empty, then
|
||||
// Step 13. Else,
|
||||
// (reordered)
|
||||
if (generator->isQueueEmpty()) {
|
||||
// Step 13.a. Set generator.[[AsyncGeneratorState]] to suspendedYield.
|
||||
generator->setSuspendedYield();
|
||||
|
||||
// Steps 13.b-c are done in caller.
|
||||
|
||||
// Step 13.d. Return undefined.
|
||||
return true;
|
||||
}
|
||||
|
||||
// Step 12. If queue is not empty, then
|
||||
// Step 12.a. NOTE: Execution continues without suspending the generator.
|
||||
|
||||
// Step 12.b. Let toYield be the first element of queue.
|
||||
Rooted<AsyncGeneratorRequest*> toYield(
|
||||
cx, AsyncGeneratorObject::peekRequest(generator));
|
||||
if (!toYield) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Step 12.c. Let resumptionValue be toYield.[[Completion]].
|
||||
CompletionKind completionKind = toYield->completionKind();
|
||||
RootedValue resumptionValue(cx, toYield->completionValue());
|
||||
|
||||
// Step 12.d. Return AsyncGeneratorUnwrapYieldResumption(resumptionValue).
|
||||
return AsyncGeneratorUnwrapYieldResumptionAndResume(
|
||||
cx, generator, completionKind, resumptionValue);
|
||||
// Steps 11-13.
|
||||
return AsyncGeneratorDrainQueue(cx, generator);
|
||||
}
|
||||
|
||||
// ES2022 draft rev 193211a3d889a61e74ef7da1475dfa356e029f29
|
||||
|
|
@ -603,7 +546,11 @@ AsyncGeneratorRequest* AsyncGeneratorRequest::create(
|
|||
[[nodiscard]] static bool AsyncGeneratorDrainQueue(
|
||||
JSContext* cx, Handle<AsyncGeneratorObject*> generator) {
|
||||
// Step 1. Assert: generator.[[AsyncGeneratorState]] is completed.
|
||||
MOZ_ASSERT(generator->isCompleted());
|
||||
MOZ_ASSERT(!generator->isExecuting());
|
||||
MOZ_ASSERT(!generator->isAwaitingYieldReturn());
|
||||
if (generator->isAwaitingReturn()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Step 2. Let queue be generator.[[AsyncGeneratorQueue]].
|
||||
// Step 3. If queue is empty, return.
|
||||
|
|
@ -626,6 +573,29 @@ AsyncGeneratorRequest* AsyncGeneratorRequest::create(
|
|||
// Step 5.b. Let completion be next.[[Completion]].
|
||||
CompletionKind completionKind = next->completionKind();
|
||||
|
||||
if (completionKind != CompletionKind::Normal) {
|
||||
if (generator->isSuspendedStart()) {
|
||||
generator->setCompleted();
|
||||
}
|
||||
}
|
||||
if (!generator->isCompleted()) {
|
||||
MOZ_ASSERT(generator->isSuspendedStart() ||
|
||||
generator->isSuspendedYield());
|
||||
|
||||
RootedValue argument(cx, next->completionValue());
|
||||
|
||||
if (completionKind == CompletionKind::Return) {
|
||||
generator->setAwaitingYieldReturn();
|
||||
|
||||
return InternalAsyncGeneratorAwait(
|
||||
cx, generator, argument,
|
||||
PromiseHandler::AsyncGeneratorYieldReturnAwaitedFulfilled,
|
||||
PromiseHandler::AsyncGeneratorYieldReturnAwaitedRejected);
|
||||
}
|
||||
|
||||
return AsyncGeneratorResume(cx, generator, completionKind, argument);
|
||||
}
|
||||
|
||||
// Step 5.c. If completion.[[Type]] is return, then
|
||||
if (completionKind == CompletionKind::Return) {
|
||||
RootedValue value(cx, next->completionValue());
|
||||
|
|
@ -658,6 +628,12 @@ AsyncGeneratorRequest* AsyncGeneratorRequest::create(
|
|||
}
|
||||
}
|
||||
|
||||
MOZ_ASSERT(!generator->isExecuting());
|
||||
MOZ_ASSERT(!generator->isAwaitingYieldReturn());
|
||||
if (generator->isAwaitingReturn()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Step 5.d.iii. If queue is empty, set done to true.
|
||||
if (generator->isQueueEmpty()) {
|
||||
return true;
|
||||
|
|
@ -768,8 +744,7 @@ class MOZ_STACK_CLASS MaybeEnterAsyncGeneratorRealm {
|
|||
|
||||
[[nodiscard]] static bool AsyncGeneratorMethodSanityCheck(
|
||||
JSContext* cx, Handle<AsyncGeneratorObject*> generator) {
|
||||
if (generator->isCompleted() || generator->isSuspendedStart() ||
|
||||
generator->isSuspendedYield()) {
|
||||
if (generator->isSuspendedStart() || generator->isSuspendedYield()) {
|
||||
// The spec assumes the queue is empty when async generator methods are
|
||||
// called with those state, but our debugger allows calling those methods
|
||||
// in unexpected state, such as before suspendedStart.
|
||||
|
|
@ -820,48 +795,15 @@ bool js::AsyncGeneratorNext(JSContext* cx, unsigned argc, Value* vp) {
|
|||
return false;
|
||||
}
|
||||
|
||||
// Step 5. Let state be generator.[[AsyncGeneratorState]].
|
||||
// Step 6. If state is completed, then
|
||||
if (generator->isCompleted()) {
|
||||
// Step 6.a. Let iteratorResult be
|
||||
// ! CreateIterResultObject(undefined, true).
|
||||
JSObject* resultObj =
|
||||
CreateIterResultObject(cx, UndefinedHandleValue, true);
|
||||
if (!resultObj) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Step 6.b. Perform
|
||||
// ! Call(promiseCapability.[[Resolve]], undefined,
|
||||
// « iteratorResult »).
|
||||
RootedValue resultValue(cx, ObjectValue(*resultObj));
|
||||
if (!ResolvePromiseInternal(cx, resultPromise, resultValue)) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
// Step 7. Let completion be NormalCompletion(value).
|
||||
// Step 8. Perform
|
||||
// ! AsyncGeneratorEnqueue(generator, completion,
|
||||
// promiseCapability).
|
||||
// Steps 5-10.
|
||||
if (!AsyncGeneratorEnqueue(cx, generator, CompletionKind::Normal,
|
||||
completionValue, resultPromise)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Step 9. If state is either suspendedStart or suspendedYield, then
|
||||
if (generator->isSuspendedStart() || generator->isSuspendedYield()) {
|
||||
RootedValue resumptionValue(cx, completionValue);
|
||||
// Step 9.a. Perform ! AsyncGeneratorResume(generator, completion).
|
||||
if (!AsyncGeneratorResume(cx, generator, CompletionKind::Normal,
|
||||
resumptionValue)) {
|
||||
if (!generator->isExecuting() && !generator->isAwaitingYieldReturn()) {
|
||||
if (!AsyncGeneratorDrainQueue(cx, generator)) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
// Step 10. Else,
|
||||
// Step 10.a. Assert: state is either executing or awaiting-return.
|
||||
MOZ_ASSERT(generator->isExecuting() || generator->isAwaitingReturn() ||
|
||||
generator->isAwaitingYieldReturn());
|
||||
}
|
||||
}
|
||||
|
||||
// Step 6.c. Return promiseCapability.[[Promise]].
|
||||
|
|
@ -918,29 +860,11 @@ bool js::AsyncGeneratorReturn(JSContext* cx, unsigned argc, Value* vp) {
|
|||
return false;
|
||||
}
|
||||
|
||||
// Step 7. Let state be generator.[[AsyncGeneratorState]].
|
||||
// Step 8. If state is either suspendedStart or completed, then
|
||||
if (generator->isSuspendedStart() || generator->isCompleted()) {
|
||||
// Step 8.a. Set generator.[[AsyncGeneratorState]] to awaiting-return.
|
||||
generator->setAwaitingReturn();
|
||||
|
||||
// Step 8.b. Perform ! AsyncGeneratorAwaitReturn(generator).
|
||||
if (!AsyncGeneratorAwaitReturn(cx, generator, completionValue)) {
|
||||
// Steps 7-10.
|
||||
if (!generator->isExecuting() && !generator->isAwaitingYieldReturn()) {
|
||||
if (!AsyncGeneratorDrainQueue(cx, generator)) {
|
||||
return false;
|
||||
}
|
||||
} else if (generator->isSuspendedYield()) {
|
||||
// Step 9. Else if state is suspendedYield, then
|
||||
|
||||
// Step 9.a. Perform ! AsyncGeneratorResume(generator, completion).
|
||||
if (!AsyncGeneratorUnwrapYieldResumptionAndResume(
|
||||
cx, generator, CompletionKind::Return, completionValue)) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
// Step 10. Else,
|
||||
// Step 10.a. Assert: state is either executing or awaiting-return.
|
||||
MOZ_ASSERT(generator->isExecuting() || generator->isAwaitingReturn() ||
|
||||
generator->isAwaitingYieldReturn());
|
||||
}
|
||||
|
||||
// Step 11. Return promiseCapability.[[Promise]].
|
||||
|
|
@ -985,44 +909,15 @@ bool js::AsyncGeneratorThrow(JSContext* cx, unsigned argc, Value* vp) {
|
|||
return false;
|
||||
}
|
||||
|
||||
// Step 5. Let state be generator.[[AsyncGeneratorState]].
|
||||
// Step 6. If state is suspendedStart, then
|
||||
if (generator->isSuspendedStart()) {
|
||||
// Step 6.a. Set generator.[[AsyncGeneratorState]] to completed.
|
||||
// Step 6.b. Set state to completed.
|
||||
generator->setCompleted();
|
||||
}
|
||||
|
||||
// Step 7. If state is completed, then
|
||||
if (generator->isCompleted()) {
|
||||
// Step 7.a. Perform
|
||||
// ! Call(promiseCapability.[[Reject]], undefined, « exception »).
|
||||
if (!RejectPromiseInternal(cx, resultPromise, completionValue)) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
// Step 8. Let completion be ThrowCompletion(exception).
|
||||
// Step 9. Perform
|
||||
// ! AsyncGeneratorEnqueue(generator, completion,
|
||||
// promiseCapability).
|
||||
// Steps 5-11.
|
||||
if (!AsyncGeneratorEnqueue(cx, generator, CompletionKind::Throw,
|
||||
completionValue, resultPromise)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Step 10. If state is suspendedYield, then
|
||||
if (generator->isSuspendedYield()) {
|
||||
// Step 10.a. Perform ! AsyncGeneratorResume(generator, completion).
|
||||
if (!AsyncGeneratorResume(cx, generator, CompletionKind::Throw,
|
||||
completionValue)) {
|
||||
if (!generator->isExecuting() && !generator->isAwaitingYieldReturn()) {
|
||||
if (!AsyncGeneratorDrainQueue(cx, generator)) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
// Step 11. Else,
|
||||
// Step 11.a. Assert: state is either executing or awaiting-return.
|
||||
MOZ_ASSERT(generator->isExecuting() || generator->isAwaitingReturn() ||
|
||||
generator->isAwaitingYieldReturn());
|
||||
}
|
||||
}
|
||||
|
||||
// Step 7.b. Return promiseCapability.[[Promise]].
|
||||
|
|
|
|||
|
|
@ -398,6 +398,7 @@ class BigInt final : public js::gc::CellWithLengthAndFlags {
|
|||
static JSLinearString* toStringGeneric(JSContext* cx, Handle<BigInt*>,
|
||||
unsigned radix);
|
||||
|
||||
friend struct ::JSStructuredCloneReader; // So it can call the following:
|
||||
static BigInt* destructivelyTrimHighZeroDigits(JSContext* cx, BigInt* x);
|
||||
|
||||
bool absFitsInUint64() const { return digitLength() <= 64 / DigitBits; }
|
||||
|
|
|
|||
|
|
@ -468,13 +468,18 @@ bool Compartment::wrap(JSContext* cx, MutableHandle<GCVector<Value>> vec) {
|
|||
|
||||
static inline bool ShouldTraceWrapper(JSObject* wrapper,
|
||||
Compartment::EdgeSelector whichEdges) {
|
||||
if (whichEdges == Compartment::AllEdges) {
|
||||
switch (whichEdges) {
|
||||
case Compartment::AllEdges:
|
||||
return true;
|
||||
case Compartment::NonGrayEdges:
|
||||
return !wrapper->isMarkedGray();
|
||||
case Compartment::GrayEdges:
|
||||
return wrapper->isMarkedGray();
|
||||
case Compartment::BlackEdges:
|
||||
return wrapper->isMarkedBlack();
|
||||
default:
|
||||
MOZ_CRASH("Unexpected EdgeSelector value");
|
||||
}
|
||||
|
||||
bool isGray = wrapper->isMarkedGray();
|
||||
return (whichEdges == Compartment::NonGrayEdges && !isGray) ||
|
||||
(whichEdges == Compartment::GrayEdges && isGray);
|
||||
}
|
||||
|
||||
void Compartment::traceWrapperTargetsInCollectedZones(JSTracer* trc,
|
||||
|
|
|
|||
|
|
@ -417,7 +417,7 @@ class JS::Compartment {
|
|||
* dangling (full GCs naturally follow pointers across compartments) and
|
||||
* when compacting to update cross-compartment pointers.
|
||||
*/
|
||||
enum EdgeSelector { AllEdges, NonGrayEdges, GrayEdges };
|
||||
enum EdgeSelector { AllEdges, NonGrayEdges, GrayEdges, BlackEdges };
|
||||
void traceWrapperTargetsInCollectedZones(JSTracer* trc,
|
||||
EdgeSelector whichEdges);
|
||||
static void traceIncomingCrossCompartmentEdgesForZoneGC(
|
||||
|
|
|
|||
|
|
@ -120,7 +120,8 @@ inline bool FetchName(JSContext* cx, HandleObject receiver, HandleObject holder,
|
|||
}
|
||||
|
||||
/* Take the slow path if shape was not found in a native object. */
|
||||
if (!receiver->is<NativeObject>() || !holder->is<NativeObject>()) {
|
||||
if (!receiver->is<NativeObject>() || !holder->is<NativeObject>() ||
|
||||
receiver->is<WithEnvironmentObject>()) {
|
||||
Rooted<jsid> id(cx, NameToId(name));
|
||||
if (!GetProperty(cx, receiver, receiver, id, vp)) {
|
||||
return false;
|
||||
|
|
@ -131,11 +132,8 @@ inline bool FetchName(JSContext* cx, HandleObject receiver, HandleObject holder,
|
|||
/* Fast path for Object instance properties. */
|
||||
vp.set(holder->as<NativeObject>().getSlot(propInfo.slot()));
|
||||
} else {
|
||||
// Unwrap 'with' environments for reasons given in
|
||||
// GetNameBoundInEnvironment.
|
||||
RootedObject normalized(cx, MaybeUnwrapWithEnvironment(receiver));
|
||||
RootedId id(cx, NameToId(name));
|
||||
if (!NativeGetExistingProperty(cx, normalized, holder.as<NativeObject>(),
|
||||
if (!NativeGetExistingProperty(cx, receiver, holder.as<NativeObject>(),
|
||||
id, propInfo, vp)) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1221,6 +1221,10 @@ void JSObject::swap(JSContext* cx, HandleObject a, HandleObject b,
|
|||
MOZ_RELEASE_ASSERT(js::ObjectMayBeSwapped(a));
|
||||
MOZ_RELEASE_ASSERT(js::ObjectMayBeSwapped(b));
|
||||
|
||||
// Don't allow a GC which may observe intermediate state or run before we
|
||||
// execute all necessary barriers.
|
||||
gc::AutoSuppressGC nogc(cx);
|
||||
|
||||
if (!Watchtower::watchObjectSwap(cx, a, b)) {
|
||||
oomUnsafe.crash("watchObjectSwap");
|
||||
}
|
||||
|
|
@ -1311,10 +1315,6 @@ void JSObject::swap(JSContext* cx, HandleObject a, HandleObject b,
|
|||
a->as<ProxyObject>().setInlineValueArray();
|
||||
}
|
||||
} else {
|
||||
// Avoid GC in here to avoid confusing the tracing code with our
|
||||
// intermediate state.
|
||||
gc::AutoSuppressGC suppress(cx);
|
||||
|
||||
// When the objects have different sizes, they will have different numbers
|
||||
// of fixed slots before and after the swap, so the slots for native objects
|
||||
// will need to be rearranged. Remember the original values from the
|
||||
|
|
|
|||
|
|
@ -2489,7 +2489,7 @@ BigInt* JSStructuredCloneReader::readBigInt(uint32_t data) {
|
|||
if (!in.readArray(result->digits().data(), length)) {
|
||||
return nullptr;
|
||||
}
|
||||
return result;
|
||||
return JS::BigInt::destructivelyTrimHighZeroDigits(context(), result);
|
||||
}
|
||||
|
||||
static uint32_t TagToV1ArrayType(uint32_t tag) {
|
||||
|
|
|
|||
|
|
@ -538,18 +538,15 @@ static bool HasCatchableException(JitActivation* activation, JSContext* cx,
|
|||
return false;
|
||||
}
|
||||
|
||||
// Unwind the entire activation in response to a thrown exception. This function
|
||||
// is responsible for notifying the debugger of each unwound frame. The return
|
||||
// value is the new stack address which the calling stub will set to the sp
|
||||
// register before executing a return instruction.
|
||||
// Unwind the activation in response to a thrown exception. This function is
|
||||
// responsible for notifying the debugger of each unwound frame.
|
||||
//
|
||||
// This function will also look for try-catch handlers and, if not trapping or
|
||||
// throwing an uncatchable exception, will write the handler info in the return
|
||||
// argument and return true.
|
||||
// This function will look for try-catch handlers and, if not trapping or
|
||||
// throwing an uncatchable exception, will write the handler info in |*rfe|.
|
||||
//
|
||||
// Returns false if a handler isn't found or shouldn't be used (e.g., traps).
|
||||
|
||||
bool wasm::HandleThrow(JSContext* cx, WasmFrameIter& iter,
|
||||
// If no try-catch handler is found, initialize |*rfe| for a return to the entry
|
||||
// frame that called into Wasm.
|
||||
void wasm::HandleThrow(JSContext* cx, WasmFrameIter& iter,
|
||||
jit::ResumeFromException* rfe) {
|
||||
// WasmFrameIter iterates down wasm frames in the activation starting at
|
||||
// JitActivation::wasmExitFP(). Calling WasmFrameIter::startUnwinding pops
|
||||
|
|
@ -615,7 +612,7 @@ bool wasm::HandleThrow(JSContext* cx, WasmFrameIter& iter,
|
|||
activation->finishWasmTrap();
|
||||
}
|
||||
|
||||
return true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -661,7 +658,6 @@ bool wasm::HandleThrow(JSContext* cx, WasmFrameIter& iter,
|
|||
rfe->stackPointer = (uint8_t*)iter.unwoundAddressOfReturnAddress();
|
||||
rfe->instance = (Instance*)FailInstanceReg;
|
||||
rfe->target = nullptr;
|
||||
return false;
|
||||
}
|
||||
|
||||
static void* WasmHandleThrow(jit::ResumeFromException* rfe) {
|
||||
|
|
|
|||
|
|
@ -297,7 +297,7 @@ bool LookupBuiltinThunk(void* pc, const CodeRange** codeRange,
|
|||
|
||||
bool EnsureBuiltinThunksInitialized();
|
||||
|
||||
bool HandleThrow(JSContext* cx, WasmFrameIter& iter,
|
||||
void HandleThrow(JSContext* cx, WasmFrameIter& iter,
|
||||
jit::ResumeFromException* rfe);
|
||||
|
||||
void* SymbolicAddressTarget(SymbolicAddress sym);
|
||||
|
|
|
|||
|
|
@ -1937,6 +1937,39 @@ static void FillArgumentArrayForJitExit(MacroAssembler& masm, Register instance,
|
|||
GenPrintf(DebugChannel::Import, masm, "\n");
|
||||
}
|
||||
|
||||
static bool AddStackCheckForImportFunctionEntry(jit::MacroAssembler& masm,
|
||||
unsigned reserve,
|
||||
const FuncType& funcType,
|
||||
StackMaps* stackMaps) {
|
||||
std::pair<CodeOffset, uint32_t> pair =
|
||||
masm.wasmReserveStackChecked(reserve, BytecodeOffset(0));
|
||||
|
||||
// Attempt to create stack maps for masm.wasmReserveStackChecked.
|
||||
ArgTypeVector argTypes(funcType);
|
||||
RegisterOffsets trapExitLayout;
|
||||
size_t trapExitLayoutNumWords;
|
||||
GenerateTrapExitRegisterOffsets(&trapExitLayout, &trapExitLayoutNumWords);
|
||||
CodeOffset trapInsnOffset = pair.first;
|
||||
size_t nBytesReservedBeforeTrap = pair.second;
|
||||
size_t nInboundStackArgBytes = StackArgAreaSizeUnaligned(argTypes);
|
||||
wasm::StackMap* stackMap = nullptr;
|
||||
if (!CreateStackMapForFunctionEntryTrap(
|
||||
argTypes, trapExitLayout, trapExitLayoutNumWords,
|
||||
nBytesReservedBeforeTrap, nInboundStackArgBytes, &stackMap)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// In debug builds, we'll always have a stack map, even if there are no
|
||||
// refs to track.
|
||||
MOZ_ASSERT(stackMap);
|
||||
if (stackMap &&
|
||||
!stackMaps->add((uint8_t*)(uintptr_t)trapInsnOffset.offset(), stackMap)) {
|
||||
stackMap->destroy();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Generate a wrapper function with the standard intra-wasm call ABI which
|
||||
// simply calls an import. This wrapper function allows any import to be treated
|
||||
// like a normal wasm function for the purposes of exports and table calls. In
|
||||
|
|
@ -1948,7 +1981,7 @@ static bool GenerateImportFunction(jit::MacroAssembler& masm,
|
|||
const FuncImport& fi,
|
||||
const FuncType& funcType,
|
||||
CallIndirectId callIndirectId,
|
||||
FuncOffsets* offsets) {
|
||||
FuncOffsets* offsets, StackMaps* stackMaps) {
|
||||
AutoCreatedBy acb(masm, "wasm::GenerateImportFunction");
|
||||
|
||||
AssertExpectedSP(masm);
|
||||
|
|
@ -1961,7 +1994,12 @@ static bool GenerateImportFunction(jit::MacroAssembler& masm,
|
|||
WasmStackAlignment,
|
||||
sizeof(Frame), // pushed by prologue
|
||||
StackArgBytesForWasmABI(funcType) + sizeOfInstanceSlot);
|
||||
masm.wasmReserveStackChecked(framePushed, BytecodeOffset(0));
|
||||
|
||||
if (!AddStackCheckForImportFunctionEntry(masm, framePushed, funcType,
|
||||
stackMaps)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(masm.framePushed() == framePushed);
|
||||
|
||||
masm.storePtr(InstanceReg, Address(masm.getStackPointer(),
|
||||
|
|
@ -2025,7 +2063,8 @@ bool wasm::GenerateImportFunctions(const ModuleEnvironment& env,
|
|||
CallIndirectId callIndirectId = CallIndirectId::forFunc(env, funcIndex);
|
||||
|
||||
FuncOffsets offsets;
|
||||
if (!GenerateImportFunction(masm, fi, funcType, callIndirectId, &offsets)) {
|
||||
if (!GenerateImportFunction(masm, fi, funcType, callIndirectId, &offsets,
|
||||
&code->stackMaps)) {
|
||||
return false;
|
||||
}
|
||||
if (!code->codeRanges.emplaceBack(funcIndex, /* bytecodeOffset = */ 0,
|
||||
|
|
@ -2787,6 +2826,24 @@ static void ClobberWasmRegsForLongJmp(MacroAssembler& masm, Register jumpReg) {
|
|||
}
|
||||
}
|
||||
|
||||
// Generates code to jump to a Wasm catch handler after unwinding the stack.
|
||||
// The |rfe| register stores a pointer to the ResumeFromException struct
|
||||
// allocated on the stack.
|
||||
void wasm::GenerateJumpToCatchHandler(MacroAssembler& masm, Register rfe,
|
||||
Register scratch1, Register scratch2) {
|
||||
masm.loadPtr(Address(rfe, ResumeFromException::offsetOfInstance()),
|
||||
InstanceReg);
|
||||
masm.loadWasmPinnedRegsFromInstance();
|
||||
masm.switchToWasmInstanceRealm(scratch1, scratch2);
|
||||
masm.loadPtr(Address(rfe, ResumeFromException::offsetOfTarget()), scratch1);
|
||||
masm.loadPtr(Address(rfe, ResumeFromException::offsetOfFramePointer()),
|
||||
FramePointer);
|
||||
masm.loadStackPtr(Address(rfe, ResumeFromException::offsetOfStackPointer()));
|
||||
MoveSPForJitABI(masm);
|
||||
ClobberWasmRegsForLongJmp(masm, scratch1);
|
||||
masm.jump(scratch1);
|
||||
}
|
||||
|
||||
// Generate a stub that restores the stack pointer to what it was on entry to
|
||||
// the wasm activation, sets the return register to 'false' and then executes a
|
||||
// return which will return from this wasm activation to the caller. This stub
|
||||
|
|
@ -2856,19 +2913,7 @@ static bool GenerateThrowStub(MacroAssembler& masm, Label* throwLabel,
|
|||
|
||||
// The case where a Wasm catch handler was found while unwinding the stack.
|
||||
masm.bind(&resumeCatch);
|
||||
masm.loadPtr(Address(ReturnReg, ResumeFromException::offsetOfInstance()),
|
||||
InstanceReg);
|
||||
masm.loadWasmPinnedRegsFromInstance();
|
||||
masm.switchToWasmInstanceRealm(scratch1, scratch2);
|
||||
masm.loadPtr(Address(ReturnReg, ResumeFromException::offsetOfTarget()),
|
||||
scratch1);
|
||||
masm.loadPtr(Address(ReturnReg, ResumeFromException::offsetOfFramePointer()),
|
||||
FramePointer);
|
||||
masm.loadStackPtr(
|
||||
Address(ReturnReg, ResumeFromException::offsetOfStackPointer()));
|
||||
MoveSPForJitABI(masm);
|
||||
ClobberWasmRegsForLongJmp(masm, scratch1);
|
||||
masm.jump(scratch1);
|
||||
GenerateJumpToCatchHandler(masm, ReturnReg, scratch1, scratch2);
|
||||
|
||||
// No catch handler was found, so we will just return out.
|
||||
masm.bind(&leaveWasm);
|
||||
|
|
|
|||
|
|
@ -364,6 +364,11 @@ extern void GenerateDirectCallFromJit(jit::MacroAssembler& masm,
|
|||
jit::Register scratch,
|
||||
uint32_t* callOffset);
|
||||
|
||||
extern void GenerateJumpToCatchHandler(jit::MacroAssembler& masm,
|
||||
jit::Register rfe,
|
||||
jit::Register scratch1,
|
||||
jit::Register scratch2);
|
||||
|
||||
} // namespace wasm
|
||||
} // namespace js
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@
|
|||
# include <werapi.h> // For WerRegisterRuntimeExceptionModule()
|
||||
# include <stdlib.h>
|
||||
|
||||
# include "mozilla/mozalloc_oom.h"
|
||||
# include "mozilla/Unused.h"
|
||||
|
||||
using mozilla::Unused;
|
||||
|
|
@ -31,12 +30,6 @@ namespace CrashReporter {
|
|||
|
||||
#ifdef XP_WIN
|
||||
|
||||
struct InProcessWindowsErrorReportingData {
|
||||
uint32_t mProcessType;
|
||||
size_t* mOOMAllocationSizePtr;
|
||||
};
|
||||
|
||||
static InProcessWindowsErrorReportingData gInProcessWerData;
|
||||
const static size_t kModulePathLength = MAX_PATH + 1;
|
||||
static wchar_t sModulePath[kModulePathLength];
|
||||
|
||||
|
|
@ -86,10 +79,9 @@ void RegisterRuntimeExceptionModule() {
|
|||
return;
|
||||
}
|
||||
|
||||
gInProcessWerData.mProcessType = mozilla::GetGeckoProcessType();
|
||||
gInProcessWerData.mOOMAllocationSizePtr = &gOOMAllocationSize;
|
||||
if (FAILED(::WerRegisterRuntimeExceptionModule(sModulePath,
|
||||
&gInProcessWerData))) {
|
||||
if (FAILED(::WerRegisterRuntimeExceptionModule(
|
||||
sModulePath,
|
||||
reinterpret_cast<PVOID>(mozilla::GetGeckoProcessType())))) {
|
||||
// The registration failed null out sModulePath to record this.
|
||||
*sModulePath = L'\0';
|
||||
return;
|
||||
|
|
@ -101,8 +93,8 @@ void UnregisterRuntimeExceptionModule() {
|
|||
#ifdef XP_WIN
|
||||
// If sModulePath is set then we have registered the module.
|
||||
if (*sModulePath) {
|
||||
Unused << ::WerUnregisterRuntimeExceptionModule(sModulePath,
|
||||
&gInProcessWerData);
|
||||
Unused << ::WerUnregisterRuntimeExceptionModule(
|
||||
sModulePath, reinterpret_cast<PVOID>(mozilla::GetGeckoProcessType()));
|
||||
*sModulePath = L'\0';
|
||||
}
|
||||
#endif // XP_WIN
|
||||
|
|
|
|||
|
|
@ -8,8 +8,9 @@ set -vx
|
|||
|
||||
NAME=spidermonkey
|
||||
|
||||
LIB_GIT_BRANCH=spidermonkey-esr115.7-cpp-only
|
||||
LIB_GIT_REVISION=22954e1ce6bf72c7cf36f3a29ef030fff4ff6d33
|
||||
VERSION="115.19.0esr"
|
||||
LIB_GIT_BRANCH=spidermonkey-esr115.19-cpp-only
|
||||
LIB_GIT_REVISION=4c197344dfc48dfbbd242333878f17f0379e6205
|
||||
LIB_GIT_REPO=git@github.com:mongodb-forks/spidermonkey.git
|
||||
|
||||
DEST_DIR=$(git rev-parse --show-toplevel)/src/third_party/mozjs
|
||||
|
|
|
|||
|
|
@ -1242,6 +1242,59 @@ class MOZ_RAII PEExportSection {
|
|||
return rvaToFunction;
|
||||
}
|
||||
|
||||
BOOL ReplaceExportNameTableEntry(const char* aFunctionNameASCII,
|
||||
const char* aReplFunctionNameASCII) const {
|
||||
if (!*this || !aFunctionNameASCII || !aReplFunctionNameASCII) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
struct NameTableComparator {
|
||||
NameTableComparator(const PEExportSection<MMPolicy>& aExportSection,
|
||||
const char* aTarget)
|
||||
: mExportSection(aExportSection),
|
||||
mTargetName(aTarget),
|
||||
mTargetNamelength(StrlenASCII(aTarget)) {}
|
||||
|
||||
int operator()(DWORD aRVAToString) const {
|
||||
mozilla::interceptor::TargetObjectArray<MMPolicy, char> itemString(
|
||||
mExportSection.mMMPolicy, mExportSection.mImageBase + aRVAToString,
|
||||
mTargetNamelength + 1);
|
||||
return StrcmpASCII(mTargetName, itemString[0]);
|
||||
}
|
||||
|
||||
const PEExportSection<MMPolicy>& mExportSection;
|
||||
const char* mTargetName;
|
||||
size_t mTargetNamelength;
|
||||
};
|
||||
|
||||
const NameTableComparator comp(*this, aFunctionNameASCII);
|
||||
|
||||
size_t match;
|
||||
if (!mExportNameTable.BinarySearchIf(comp, &match)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
const DWORD* rvaToString = mExportNameTable[match];
|
||||
if (!rvaToString) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
auto replNameLen = StrlenASCII(aReplFunctionNameASCII);
|
||||
char* namePtr = reinterpret_cast<char*>(mImageBase + *rvaToString);
|
||||
if (StrlenASCII(namePtr) < replNameLen) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
auto replNameLenIncNull = replNameLen + 1;
|
||||
AutoVirtualProtect prot(namePtr, replNameLenIncNull, PAGE_READWRITE);
|
||||
if (!prot) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
memcpy(namePtr, aReplFunctionNameASCII, replNameLenIncNull);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* This functions behaves the same as the native ::GetProcAddress except
|
||||
* the following cases:
|
||||
|
|
|
|||
|
|
@ -1242,6 +1242,59 @@ class MOZ_RAII PEExportSection {
|
|||
return rvaToFunction;
|
||||
}
|
||||
|
||||
BOOL ReplaceExportNameTableEntry(const char* aFunctionNameASCII,
|
||||
const char* aReplFunctionNameASCII) const {
|
||||
if (!*this || !aFunctionNameASCII || !aReplFunctionNameASCII) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
struct NameTableComparator {
|
||||
NameTableComparator(const PEExportSection<MMPolicy>& aExportSection,
|
||||
const char* aTarget)
|
||||
: mExportSection(aExportSection),
|
||||
mTargetName(aTarget),
|
||||
mTargetNamelength(StrlenASCII(aTarget)) {}
|
||||
|
||||
int operator()(DWORD aRVAToString) const {
|
||||
mozilla::interceptor::TargetObjectArray<MMPolicy, char> itemString(
|
||||
mExportSection.mMMPolicy, mExportSection.mImageBase + aRVAToString,
|
||||
mTargetNamelength + 1);
|
||||
return StrcmpASCII(mTargetName, itemString[0]);
|
||||
}
|
||||
|
||||
const PEExportSection<MMPolicy>& mExportSection;
|
||||
const char* mTargetName;
|
||||
size_t mTargetNamelength;
|
||||
};
|
||||
|
||||
const NameTableComparator comp(*this, aFunctionNameASCII);
|
||||
|
||||
size_t match;
|
||||
if (!mExportNameTable.BinarySearchIf(comp, &match)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
const DWORD* rvaToString = mExportNameTable[match];
|
||||
if (!rvaToString) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
auto replNameLen = StrlenASCII(aReplFunctionNameASCII);
|
||||
char* namePtr = reinterpret_cast<char*>(mImageBase + *rvaToString);
|
||||
if (StrlenASCII(namePtr) < replNameLen) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
auto replNameLenIncNull = replNameLen + 1;
|
||||
AutoVirtualProtect prot(namePtr, replNameLenIncNull, PAGE_READWRITE);
|
||||
if (!prot) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
memcpy(namePtr, aReplFunctionNameASCII, replNameLenIncNull);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* This functions behaves the same as the native ::GetProcAddress except
|
||||
* the following cases:
|
||||
|
|
|
|||
|
|
@ -71,10 +71,10 @@
|
|||
#define MALLOC_H <malloc.h>
|
||||
#define MALLOC_USABLE_SIZE_CONST_PTR
|
||||
#define MOZILLA_UAVERSION "115.0"
|
||||
#define MOZILLA_VERSION "115.8.0"
|
||||
#define MOZILLA_VERSION_U 115.8.0
|
||||
#define MOZILLA_VERSION "115.20.0"
|
||||
#define MOZILLA_VERSION_U 115.20.0
|
||||
#define MOZJS_MAJOR_VERSION 115
|
||||
#define MOZJS_MINOR_VERSION 8
|
||||
#define MOZJS_MINOR_VERSION 20
|
||||
#define MOZ_AARCH64_JSCVT 0
|
||||
#define MOZ_BUILD_APP js
|
||||
#define MOZ_DLL_PREFIX "lib"
|
||||
|
|
|
|||
|
|
@ -71,10 +71,10 @@
|
|||
#define MALLOC_H <malloc.h>
|
||||
#define MALLOC_USABLE_SIZE_CONST_PTR
|
||||
#define MOZILLA_UAVERSION "115.0"
|
||||
#define MOZILLA_VERSION "115.8.0"
|
||||
#define MOZILLA_VERSION_U 115.8.0
|
||||
#define MOZILLA_VERSION "115.20.0"
|
||||
#define MOZILLA_VERSION_U 115.20.0
|
||||
#define MOZJS_MAJOR_VERSION 115
|
||||
#define MOZJS_MINOR_VERSION 8
|
||||
#define MOZJS_MINOR_VERSION 20
|
||||
#define MOZ_AARCH64_JSCVT 0
|
||||
#define MOZ_BUILD_APP js
|
||||
#define MOZ_DLL_PREFIX "lib"
|
||||
|
|
|
|||
|
|
@ -72,6 +72,6 @@
|
|||
|
||||
/* MOZILLA JSAPI version number components */
|
||||
#define MOZJS_MAJOR_VERSION 115
|
||||
#define MOZJS_MINOR_VERSION 8
|
||||
#define MOZJS_MINOR_VERSION 20
|
||||
|
||||
#endif /* js_config_h */
|
||||
|
|
|
|||
|
|
@ -55,10 +55,10 @@
|
|||
#define MALLOC_H <malloc/malloc.h>
|
||||
#define MALLOC_USABLE_SIZE_CONST_PTR const
|
||||
#define MOZILLA_UAVERSION "115.0"
|
||||
#define MOZILLA_VERSION "115.8.0"
|
||||
#define MOZILLA_VERSION_U 115.8.0
|
||||
#define MOZILLA_VERSION "115.20.0"
|
||||
#define MOZILLA_VERSION_U 115.20.0
|
||||
#define MOZJS_MAJOR_VERSION 115
|
||||
#define MOZJS_MINOR_VERSION 8
|
||||
#define MOZJS_MINOR_VERSION 20
|
||||
#define MOZ_AARCH64_JSCVT 1
|
||||
#define MOZ_BUILD_APP js
|
||||
#define MOZ_DLL_PREFIX "lib"
|
||||
|
|
|
|||
|
|
@ -55,10 +55,10 @@
|
|||
#define MALLOC_H <malloc/malloc.h>
|
||||
#define MALLOC_USABLE_SIZE_CONST_PTR const
|
||||
#define MOZILLA_UAVERSION "115.0"
|
||||
#define MOZILLA_VERSION "115.8.0"
|
||||
#define MOZILLA_VERSION_U 115.8.0
|
||||
#define MOZILLA_VERSION "115.20.0"
|
||||
#define MOZILLA_VERSION_U 115.20.0
|
||||
#define MOZJS_MAJOR_VERSION 115
|
||||
#define MOZJS_MINOR_VERSION 8
|
||||
#define MOZJS_MINOR_VERSION 20
|
||||
#define MOZ_AARCH64_JSCVT 1
|
||||
#define MOZ_BUILD_APP js
|
||||
#define MOZ_DLL_PREFIX "lib"
|
||||
|
|
|
|||
|
|
@ -72,6 +72,6 @@
|
|||
|
||||
/* MOZILLA JSAPI version number components */
|
||||
#define MOZJS_MAJOR_VERSION 115
|
||||
#define MOZJS_MINOR_VERSION 8
|
||||
#define MOZJS_MINOR_VERSION 20
|
||||
|
||||
#endif /* js_config_h */
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
#define HAVE_GETC_UNLOCKED 1
|
||||
#define HAVE_GETOPT_H 1
|
||||
#define HAVE_GETPAGESIZE 1
|
||||
#define HAVE_GETTID 1
|
||||
#define HAVE_GMTIME_R 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_LANGINFO_CODESET 1
|
||||
|
|
@ -38,6 +39,7 @@
|
|||
#define HAVE_NETINET_IN_H 1
|
||||
#define HAVE_NL_TYPES_H 1
|
||||
#define HAVE_POSIX_MEMALIGN 1
|
||||
#define HAVE_PTHREAD_GETNAME_NP 1
|
||||
#define HAVE_RES_NINIT 1
|
||||
#define HAVE_SETPRIORITY 1
|
||||
#define HAVE_SSIZE_T 1
|
||||
|
|
@ -69,10 +71,10 @@
|
|||
#define MALLOC_H <malloc.h>
|
||||
#define MALLOC_USABLE_SIZE_CONST_PTR
|
||||
#define MOZILLA_UAVERSION "115.0"
|
||||
#define MOZILLA_VERSION "115.8.0"
|
||||
#define MOZILLA_VERSION_U 115.8.0
|
||||
#define MOZILLA_VERSION "115.20.0"
|
||||
#define MOZILLA_VERSION_U 115.20.0
|
||||
#define MOZJS_MAJOR_VERSION 115
|
||||
#define MOZJS_MINOR_VERSION 8
|
||||
#define MOZJS_MINOR_VERSION 20
|
||||
#define MOZ_AARCH64_JSCVT 0
|
||||
#define MOZ_BUILD_APP js
|
||||
#define MOZ_DLL_PREFIX "lib"
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
#define HAVE_GETC_UNLOCKED 1
|
||||
#define HAVE_GETOPT_H 1
|
||||
#define HAVE_GETPAGESIZE 1
|
||||
#define HAVE_GETTID 1
|
||||
#define HAVE_GMTIME_R 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_LANGINFO_CODESET 1
|
||||
|
|
@ -38,6 +39,7 @@
|
|||
#define HAVE_NETINET_IN_H 1
|
||||
#define HAVE_NL_TYPES_H 1
|
||||
#define HAVE_POSIX_MEMALIGN 1
|
||||
#define HAVE_PTHREAD_GETNAME_NP 1
|
||||
#define HAVE_RES_NINIT 1
|
||||
#define HAVE_SETPRIORITY 1
|
||||
#define HAVE_SSIZE_T 1
|
||||
|
|
@ -69,10 +71,10 @@
|
|||
#define MALLOC_H <malloc.h>
|
||||
#define MALLOC_USABLE_SIZE_CONST_PTR
|
||||
#define MOZILLA_UAVERSION "115.0"
|
||||
#define MOZILLA_VERSION "115.8.0"
|
||||
#define MOZILLA_VERSION_U 115.8.0
|
||||
#define MOZILLA_VERSION "115.20.0"
|
||||
#define MOZILLA_VERSION_U 115.20.0
|
||||
#define MOZJS_MAJOR_VERSION 115
|
||||
#define MOZJS_MINOR_VERSION 8
|
||||
#define MOZJS_MINOR_VERSION 20
|
||||
#define MOZ_AARCH64_JSCVT 0
|
||||
#define MOZ_BUILD_APP js
|
||||
#define MOZ_DLL_PREFIX "lib"
|
||||
|
|
|
|||
|
|
@ -72,6 +72,6 @@
|
|||
|
||||
/* MOZILLA JSAPI version number components */
|
||||
#define MOZJS_MAJOR_VERSION 115
|
||||
#define MOZJS_MINOR_VERSION 8
|
||||
#define MOZJS_MINOR_VERSION 20
|
||||
|
||||
#endif /* js_config_h */
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
#define HAVE_GETC_UNLOCKED 1
|
||||
#define HAVE_GETOPT_H 1
|
||||
#define HAVE_GETPAGESIZE 1
|
||||
#define HAVE_GETTID 1
|
||||
#define HAVE_GMTIME_R 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_LANGINFO_CODESET 1
|
||||
|
|
@ -38,6 +39,7 @@
|
|||
#define HAVE_NETINET_IN_H 1
|
||||
#define HAVE_NL_TYPES_H 1
|
||||
#define HAVE_POSIX_MEMALIGN 1
|
||||
#define HAVE_PTHREAD_GETNAME_NP 1
|
||||
#define HAVE_RES_NINIT 1
|
||||
#define HAVE_SETPRIORITY 1
|
||||
#define HAVE_SSIZE_T 1
|
||||
|
|
@ -69,10 +71,10 @@
|
|||
#define MALLOC_H <malloc.h>
|
||||
#define MALLOC_USABLE_SIZE_CONST_PTR
|
||||
#define MOZILLA_UAVERSION "115.0"
|
||||
#define MOZILLA_VERSION "115.8.0"
|
||||
#define MOZILLA_VERSION_U 115.8.0
|
||||
#define MOZILLA_VERSION "115.20.0"
|
||||
#define MOZILLA_VERSION_U 115.20.0
|
||||
#define MOZJS_MAJOR_VERSION 115
|
||||
#define MOZJS_MINOR_VERSION 8
|
||||
#define MOZJS_MINOR_VERSION 20
|
||||
#define MOZ_AARCH64_JSCVT 0
|
||||
#define MOZ_BUILD_APP js
|
||||
#define MOZ_DLL_PREFIX "lib"
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
#define HAVE_GETC_UNLOCKED 1
|
||||
#define HAVE_GETOPT_H 1
|
||||
#define HAVE_GETPAGESIZE 1
|
||||
#define HAVE_GETTID 1
|
||||
#define HAVE_GMTIME_R 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_LANGINFO_CODESET 1
|
||||
|
|
@ -38,6 +39,7 @@
|
|||
#define HAVE_NETINET_IN_H 1
|
||||
#define HAVE_NL_TYPES_H 1
|
||||
#define HAVE_POSIX_MEMALIGN 1
|
||||
#define HAVE_PTHREAD_GETNAME_NP 1
|
||||
#define HAVE_RES_NINIT 1
|
||||
#define HAVE_SETPRIORITY 1
|
||||
#define HAVE_SSIZE_T 1
|
||||
|
|
@ -69,10 +71,10 @@
|
|||
#define MALLOC_H <malloc.h>
|
||||
#define MALLOC_USABLE_SIZE_CONST_PTR
|
||||
#define MOZILLA_UAVERSION "115.0"
|
||||
#define MOZILLA_VERSION "115.8.0"
|
||||
#define MOZILLA_VERSION_U 115.8.0
|
||||
#define MOZILLA_VERSION "115.20.0"
|
||||
#define MOZILLA_VERSION_U 115.20.0
|
||||
#define MOZJS_MAJOR_VERSION 115
|
||||
#define MOZJS_MINOR_VERSION 8
|
||||
#define MOZJS_MINOR_VERSION 20
|
||||
#define MOZ_AARCH64_JSCVT 0
|
||||
#define MOZ_BUILD_APP js
|
||||
#define MOZ_DLL_PREFIX "lib"
|
||||
|
|
|
|||
|
|
@ -72,6 +72,6 @@
|
|||
|
||||
/* MOZILLA JSAPI version number components */
|
||||
#define MOZJS_MAJOR_VERSION 115
|
||||
#define MOZJS_MINOR_VERSION 8
|
||||
#define MOZJS_MINOR_VERSION 20
|
||||
|
||||
#endif /* js_config_h */
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -72,10 +72,10 @@
|
|||
#define MALLOC_H <malloc.h>
|
||||
#define MALLOC_USABLE_SIZE_CONST_PTR
|
||||
#define MOZILLA_UAVERSION "115.0"
|
||||
#define MOZILLA_VERSION "115.8.0"
|
||||
#define MOZILLA_VERSION_U 115.8.0
|
||||
#define MOZILLA_VERSION "115.20.0"
|
||||
#define MOZILLA_VERSION_U 115.20.0
|
||||
#define MOZJS_MAJOR_VERSION 115
|
||||
#define MOZJS_MINOR_VERSION 8
|
||||
#define MOZJS_MINOR_VERSION 20
|
||||
#define MOZ_AARCH64_JSCVT 0
|
||||
#define MOZ_BUILD_APP js
|
||||
#define MOZ_DLL_PREFIX "lib"
|
||||
|
|
|
|||
|
|
@ -72,10 +72,10 @@
|
|||
#define MALLOC_H <malloc.h>
|
||||
#define MALLOC_USABLE_SIZE_CONST_PTR
|
||||
#define MOZILLA_UAVERSION "115.0"
|
||||
#define MOZILLA_VERSION "115.8.0"
|
||||
#define MOZILLA_VERSION_U 115.8.0
|
||||
#define MOZILLA_VERSION "115.20.0"
|
||||
#define MOZILLA_VERSION_U 115.20.0
|
||||
#define MOZJS_MAJOR_VERSION 115
|
||||
#define MOZJS_MINOR_VERSION 8
|
||||
#define MOZJS_MINOR_VERSION 20
|
||||
#define MOZ_AARCH64_JSCVT 0
|
||||
#define MOZ_BUILD_APP js
|
||||
#define MOZ_DLL_PREFIX "lib"
|
||||
|
|
|
|||
|
|
@ -72,6 +72,6 @@
|
|||
|
||||
/* MOZILLA JSAPI version number components */
|
||||
#define MOZJS_MAJOR_VERSION 115
|
||||
#define MOZJS_MINOR_VERSION 8
|
||||
#define MOZJS_MINOR_VERSION 20
|
||||
|
||||
#endif /* js_config_h */
|
||||
|
|
|
|||
|
|
@ -56,10 +56,10 @@
|
|||
#define MALLOC_H <malloc/malloc.h>
|
||||
#define MALLOC_USABLE_SIZE_CONST_PTR const
|
||||
#define MOZILLA_UAVERSION "115.0"
|
||||
#define MOZILLA_VERSION "115.8.0"
|
||||
#define MOZILLA_VERSION_U 115.8.0
|
||||
#define MOZILLA_VERSION "115.20.0"
|
||||
#define MOZILLA_VERSION_U 115.20.0
|
||||
#define MOZJS_MAJOR_VERSION 115
|
||||
#define MOZJS_MINOR_VERSION 8
|
||||
#define MOZJS_MINOR_VERSION 20
|
||||
#define MOZ_AARCH64_JSCVT 0
|
||||
#define MOZ_BUILD_APP js
|
||||
#define MOZ_DLL_PREFIX "lib"
|
||||
|
|
|
|||
|
|
@ -56,10 +56,10 @@
|
|||
#define MALLOC_H <malloc/malloc.h>
|
||||
#define MALLOC_USABLE_SIZE_CONST_PTR const
|
||||
#define MOZILLA_UAVERSION "115.0"
|
||||
#define MOZILLA_VERSION "115.8.0"
|
||||
#define MOZILLA_VERSION_U 115.8.0
|
||||
#define MOZILLA_VERSION "115.20.0"
|
||||
#define MOZILLA_VERSION_U 115.20.0
|
||||
#define MOZJS_MAJOR_VERSION 115
|
||||
#define MOZJS_MINOR_VERSION 8
|
||||
#define MOZJS_MINOR_VERSION 20
|
||||
#define MOZ_AARCH64_JSCVT 0
|
||||
#define MOZ_BUILD_APP js
|
||||
#define MOZ_DLL_PREFIX "lib"
|
||||
|
|
|
|||
|
|
@ -72,6 +72,6 @@
|
|||
|
||||
/* MOZILLA JSAPI version number components */
|
||||
#define MOZJS_MAJOR_VERSION 115
|
||||
#define MOZJS_MINOR_VERSION 8
|
||||
#define MOZJS_MINOR_VERSION 20
|
||||
|
||||
#endif /* js_config_h */
|
||||
|
|
|
|||
|
|
@ -30,10 +30,10 @@
|
|||
#define MALLOC_H <malloc.h>
|
||||
#define MALLOC_USABLE_SIZE_CONST_PTR const
|
||||
#define MOZILLA_UAVERSION "115.0"
|
||||
#define MOZILLA_VERSION "115.8.0"
|
||||
#define MOZILLA_VERSION_U 115.8.0
|
||||
#define MOZILLA_VERSION "115.20.0"
|
||||
#define MOZILLA_VERSION_U 115.20.0
|
||||
#define MOZJS_MAJOR_VERSION 115
|
||||
#define MOZJS_MINOR_VERSION 8
|
||||
#define MOZJS_MINOR_VERSION 20
|
||||
#define MOZ_AARCH64_JSCVT 0
|
||||
#define MOZ_BUILD_APP js
|
||||
#define MOZ_DLL_PREFIX ""
|
||||
|
|
|
|||
|
|
@ -30,10 +30,10 @@
|
|||
#define MALLOC_H <malloc.h>
|
||||
#define MALLOC_USABLE_SIZE_CONST_PTR const
|
||||
#define MOZILLA_UAVERSION "115.0"
|
||||
#define MOZILLA_VERSION "115.8.0"
|
||||
#define MOZILLA_VERSION_U 115.8.0
|
||||
#define MOZILLA_VERSION "115.20.0"
|
||||
#define MOZILLA_VERSION_U 115.20.0
|
||||
#define MOZJS_MAJOR_VERSION 115
|
||||
#define MOZJS_MINOR_VERSION 8
|
||||
#define MOZJS_MINOR_VERSION 20
|
||||
#define MOZ_AARCH64_JSCVT 0
|
||||
#define MOZ_BUILD_APP js
|
||||
#define MOZ_DLL_PREFIX ""
|
||||
|
|
|
|||
|
|
@ -72,6 +72,6 @@
|
|||
|
||||
/* MOZILLA JSAPI version number components */
|
||||
#define MOZJS_MAJOR_VERSION 115
|
||||
#define MOZJS_MINOR_VERSION 8
|
||||
#define MOZJS_MINOR_VERSION 20
|
||||
|
||||
#endif /* js_config_h */
|
||||
|
|
|
|||
Loading…
Reference in New Issue