Commit graph

60 commits

Author SHA1 Message Date
Martok
dc5702a0f2 Issue #2172 - add null zone sanity checks 2023-08-10 22:14:10 +08:00
Martok
cd1920af58 Issue #2172 - add missing RegExpShared TraceKind declaration 2023-08-10 22:13:21 +08:00
Brian Smith
f041afc61d Issue #1240 - Part 1 - Define a new BigInt primitive type. Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1366287 Part 1.0. However leaving out the --enable-bigint changes. 2023-07-25 09:08:03 +08:00
Moonchild
890e1eb84d Fix debug builds 2023-07-03 14:59:18 +08:00
Moonchild
24b1a0f166 Avoid TLS lookups when checking if zones need to be marked for GC.
This converts the fromPointer() calls to an object cast to (hopefully)
avoid the GC crashes. Logic is reversed from MustSkipMarking to
ShouldMark with appropriate renames.
2023-07-03 14:59:02 +08:00
Moonchild
95a1e4b7a3 Simplify incremental GC sweeping
Splitting several parts of `SweepPhase` into constituent parts to
separate out sweeping code from code that handles yielding to the
mutator and resuming.
2023-07-03 14:58:44 +08:00
Job Bautista
2c8387f4fa Issue #62 - Fix xul.dll link bustage related to MovableCellHasher.
The unsafeSet method is based on Jon Coppeard's part 2 patch for Mozilla bug
1306008. This is needed because of the use of unsafeSet in rekey() of
MovableCellHasher<JS::Heap<T>>
2023-03-28 12:09:30 +08:00
Job Bautista
9824659d3c Issue #2083 - Part 4: Give RegExpShared a finalizer.
Based on Mozilla bug 1345177.
2023-02-01 07:36:42 +08:00
Job Bautista
3796c7c1e1 Issue #2083 - Part 1: Make RegExpShared a GC thing.
Based on Mozilla bug 1345177.
Changes from the original bug's patch:

- We don't have JS::CurrentThreadIsHeapCollecting, so let's use
  trc->runtime()->isHeapCollecting() instead.
- Mozilla bug 1337117 renamed runtimeFromMainThread to
  runtimeFromActiveCooperatingThread for Firefox 54, so let's use the former
2023-02-01 07:35:50 +08:00
Moonchild
8da86488ea Revert "Issue #1676 - Part 10: Split gc sources out of js/src/moz.build"
This reverts commit 65eac50e2dd9d2c4773a927aa7909eff13bc121c.
2022-09-07 11:00:25 +08:00
Moonchild
d83377b8ce Revert "Issue #1676 - Part 17: Put remaining source files which have debug code ifdef'd behind MOZ_DEBUG"
This reverts commit ff355fe9ac5327a62cdbd05f99dff9febe5de5df.
2022-09-07 10:41:18 +08:00
Moonchild
aedbffe910 Issue #1956 - Fix C++ code standard conformance issue in StoreBuffer.h 2022-09-01 10:18:54 +08:00
Jeremy Andrews
1cdbf6eb6a Issue #1742 - Part 5: Remove unnecessary GCPtr::unbarrieredGet
Ref: BZ 1323441
2022-05-31 09:12:51 +08:00
Jeremy Andrews
e632fc1e8c Issue #1742 - Part 4: Don't trigger read barriers when comparing wrapped pointers types
This is actually an undocumented dependency of Bug 1325406 for Linux and
SunOS.

Ref: BZ 1308236
2022-05-31 09:12:45 +08:00
Moonchild
30a3ec27a2 Issue #1742 - Remove the ambiguous portions of gc that dealt with tagged pointers for shapes.
Nobody likes "isNullLike(obj)" when trying to garbage collect. It either is or
is not. Master Yoda would be pleased with this change.
2022-05-31 09:12:38 +08:00
Moonchild
80d7d43961 Issue #1742 - Part 1: Refactor rooting base class templates
Based on Bug 1325406
2022-05-31 09:12:19 +08:00
Moonchild
87982cb409 Issue #1679 - Part 2: Some small issues to address buildability.
- Explicitly |this| the Asserts in Cell.as<>
- Unified deprot in regexp-error.h
- Convert RegExpShared* inner() to a reinterpret_cast because for SOME reason
  .as<> no longer works after the reimport (which is a static cast)
2020-11-13 09:15:22 +08:00
Matt A. Tobin
d646d4403f Bug 1328948 - Add is(), as() to Cell.
Tag #1679
2020-11-13 09:15:16 +08:00
Matt A. Tobin
fc371224e1 Issue #1676 - Part 17: Put remaining source files which have debug code ifdef'd behind MOZ_DEBUG 2020-11-06 09:43:28 +08:00
Matt A. Tobin
25a9cb15e8 Issue #1676 - Part 10: Split gc sources out of js/src/moz.build 2020-11-06 09:43:19 +08:00
Moonchild
dabd32f955 Issue #1656 - Part 7: Nuke vim config lines in JS 2020-09-25 22:04:24 +08:00
Moonchild
b52bc1586d [js] Try to catch bad pointers for GC and bail if not valid. 2020-08-06 10:23:26 +08:00
JMadgwick
1640ee7bc6 Issue #1471 - Fix building on sparc64 Linux
Correct various pre-processor defines for sparc64 and in mozjemalloc use the JS arm64 allocator on Linux/sparc64.
This corrects build problems opn Linux sparc64 and is in line with bugzilla bug #1275204.
2020-04-03 09:26:50 +08:00
wolfbeast
2996c783d8 Revert #1091 Remove unboxed object code phase 1 + extras.
This should be the last code backout for this. merging this branch
should get us back to the way we were (+ additional code changes for
later changes) as fasr as the unused unboxed code is concerned.
2020-02-27 07:34:57 +08:00
wolfbeast
cfed2447da Revert #1137 - Remove unboxed arrays
- accounting for removal of watch()/unwatch()
- updated for intermediate code changes.
2020-02-27 07:34:50 +08:00
wolfbeast
1e553d0e73 Issue #316 - Make the memory GC performance object conditional (WIP)
This was only added for GCubench and likely interfering with building
without devtools-server.
2020-02-21 07:05:16 +08:00
athenian200
45bf760ac5 MoonchildProductions#1251 - Part 27: Fix ifdef style.
This should do it for all the commits to files I changed, but while I'm in here I could probably go ahead and turn ALL the singular if defined statements into ifdef statements by using grep/find on the tree. On the other hand, perhaps we should do that as a separate issue so that this doesn't become a case of scope creep.
2019-11-04 11:54:07 +08:00
athenian200
0239eb8ac9 MoonchildProductions#1251 - Part 23: Allow AMD64 build to work.
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Compiling_32-bit_Firefox_on_a_Linux_64-bit_OS

Setting this up turned out to be easier than I thought it would be. All I had to do was apply these instructions in reverse and add the following to my .mozconfig file:

CC="gcc -m64"
CXX="g++ -m64"
AS="gas --64"
ac_add_options --target=x86_64-pc-solaris2.11
export PKG_CONFIG_PATH=/usr/lib/amd64/pkgconfig
ac_add_options --libdir=/usr/lib/amd64
ac_add_options --x-libraries=/usr/lib/amd64

Most of these changes were fairly trivial, just requiring me to make a few of the changes I made earlier conditional on a 32-bit build. The biggest challenge was figuring out why the JavaScript engine triggered a segfault everytime it tried to allocate memory. But this patch fixes it:

https://github.com/OpenIndiana/oi-userland/blob/oi/hipster/components/web/firefox/patches/patch-js_src_gc_Memory.cpp.patch

Turns out that Solaris on AMD64 handles memory management in a fairly unusual way with a segmented memory model, but it's not that different from what we see on other 64-bit processors. In fact, I saw a SPARC crash for a similar reason, and noticed that it looked just like mine except the numbers in the first segment were reversed. Having played around with hex editors before, I had a feeling I might be dealing with a little-endian version of a big-endian problem, but I didn't expect that knowledge to actually yield an easy solution.

https://bugzilla.mozilla.org/show_bug.cgi?id=577056

https://www.oracle.com/technetwork/server-storage/solaris10/solaris-memory-135224.html

As far as I can tell, this was the last barrier to an AMD64 Solaris build of Pale Moon.
2019-11-04 11:54:02 +08:00
athenian200
b652dd59ae MoonchildProductions#1251 - Part 7: All the posix_m* memory-related stuff, gathered together.
https://bugzilla.mozilla.org/show_bug.cgi?id=1158445
https://bugzilla.mozilla.org/show_bug.cgi?id=963983
https://bugzilla.mozilla.org/show_bug.cgi?id=1542758

Solaris madvise and malign don't perfectly map to their POSIX counterparts, and some Linux versions (especially Android) don't define the POSIX counterparts at all, so options are limited. Ideally posix_madvise and posix_malign should be the safer and more portable options for all platforms.
2019-11-04 11:52:22 +08:00
wolfbeast
ca9e376e55 Issue #1257 - Part 2: Remove watch/unwatch and JS watchpoint class. 2019-11-01 10:24:09 +08:00
wolfbeast
54b6b407a9 Remove UnboxedArray code part 2 2019-06-19 21:34:02 +08:00
wolfbeast
d73dc74bd1 Remove unboxed objects from GC 2019-05-24 21:55:58 +08:00
win7-7
965a10e9ce tab to spaces js/src/gc 2019-05-03 21:32:20 +08:00
win7-7
9051e1dd6a add newline at end of files js/src/gc 2019-05-03 21:32:09 +08:00
win7-7
c1b4fc1442 Improve dead compartment collection js/src/gc 2019-05-03 21:31:57 +08:00
wolfbeast
78d61fd2b1 Issue #187: Remove solaris conditional code. 2019-04-04 20:26:26 +08:00
Jon Coppeard
4105e6bba4 Reset nursery position when it's disabled. 2019-03-23 06:44:21 +08:00
adeshkp
521c918660 Remove telemetry leftovers from JS engine. 2019-02-16 00:27:38 +08:00
trav90
02e07860b2 Stop using PodZero in several places to initialize values of non-trivial type 2019-02-16 00:13:45 +08:00
trav90
4cbf54089a Convert the trailing array of BindingNames at the end of the various kinds of scope data into raw unsigned chars into which those BindingNames are placement-new'd, rather than memcpy-ing non-trivial classes around and failing to comply with the C++ object model 2019-02-16 00:12:57 +08:00
trav90
4f91b109d0 Simplify HeapSlot to make it trivially copyable
This removes the constructors, which were never called since we allocate arrays of HeapSlot with pod_malloc. The destructor is only ever called explicitly since we free this memory with js_free so it has been renamed to destroy(). Also removed is an unused manual barrier.
2019-02-16 00:11:06 +08:00
Jon Coppeard
89e332cfec Bug 1465108 - Use function pointers rather than virtual run method for GC parallel tasks r=sfink a=abillings a=RyanVM 2019-02-16 00:01:53 +08:00
trav90
10b24b8110 Fix Value::isGCThing footgun, stop returning true for NullValue 2019-02-15 23:41:26 +08:00
janekptacijarabaci
49ce6a7928 Bug 1323868: Report object allocation failure when running off-main-thread
Issue #77
[Depends on] Bug 1192038: RegExp.prototype should be an ordinary object
2019-02-15 23:38:31 +08:00
wolfbeast
54cfba5b8f Always initialize nursery data structures even if size is smaller than one chunk. 2019-02-15 23:29:41 +08:00
wolfbeast
93578c788f Remove unused compileBarriers() 2019-02-14 14:38:16 +08:00
wolfbeast
f8ab99eba0 Remove SetGCZeal() stub and its callers. 2019-02-14 14:38:14 +08:00
wolfbeast
ed9ef4d079 Remove runDebugGC() stub 2019-02-14 14:38:13 +08:00
wolfbeast
7e54c3428c Remove pushZealSelectedObjects() and caller 2019-02-14 14:38:11 +08:00
wolfbeast
55743711cc Remove finishMarkingValidation and caller 2019-02-14 14:38:10 +08:00