115 Commits

Author SHA1 Message Date
igor%mir2.org
9a55ab16b9 Taking out the patches for bug 375999 and bug 375808 until the reason for ref counting leak would be clear.
git-svn-id: svn://10.0.0.236/trunk@223968 18797224-902f-48f8-a5cc-f745e15eee43
2007-04-01 06:48:21 +00:00
igor%mir2.org
148097b114 Bug 375808 - GCX_PRIVATE is replaced by GCX_FUNCTION. r=brendan
git-svn-id: svn://10.0.0.236/trunk@222622 18797224-902f-48f8-a5cc-f745e15eee43
2007-03-30 06:23:02 +00:00
igor%mir2.org
e61a65acb5 Removal of broken patch for bug 375808
git-svn-id: svn://10.0.0.236/trunk@222620 18797224-902f-48f8-a5cc-f745e15eee43
2007-03-30 01:19:50 +00:00
igor%mir2.org
f160c46e22 Bug 375808 - GCX_PRIVATE is replaced by GCX_FUNCTION. r=brendan
git-svn-id: svn://10.0.0.236/trunk@222619 18797224-902f-48f8-a5cc-f745e15eee43
2007-03-30 00:56:14 +00:00
peterv%propagandism.org
cec4c8799b Fix for bug 372960 (Make XPConnect traverse more JS edges). r=brendan, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@221743 18797224-902f-48f8-a5cc-f745e15eee43
2007-03-11 15:03:00 +00:00
igor.bukanov%gmail.com
6997abb908 Bug 366975: Allow to allocate new GC things from JSGC_END callback. r=brendan
git-svn-id: svn://10.0.0.236/trunk@218642 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 23:36:41 +00:00
igor.bukanov%gmail.com
bc26e09d70 Bug 357169: temp root macros are type-safe now and details of AddRoot etc. implementation do not leak ouside jsgc.c. r=brendan
git-svn-id: svn://10.0.0.236/trunk@214256 18797224-902f-48f8-a5cc-f745e15eee43
2006-10-27 19:38:33 +00:00
igor.bukanov%gmail.com
afeebc3eed making sure thta TryMethod deals xml objects properly. bug=352846 r=brendan
git-svn-id: svn://10.0.0.236/trunk@211974 18797224-902f-48f8-a5cc-f745e15eee43
2006-09-19 06:48:25 +00:00
brendan%mozilla.org
b7ba80705e Checking in igor's patch for bug 349272, r=me.
git-svn-id: svn://10.0.0.236/trunk@211848 18797224-902f-48f8-a5cc-f745e15eee43
2006-09-16 07:50:05 +00:00
igor.bukanov%gmail.com
877493cc62 Bug 349320: generator cleanup, r=brendan
git-svn-id: svn://10.0.0.236/trunk@208511 18797224-902f-48f8-a5cc-f745e15eee43
2006-08-26 09:18:57 +00:00
igor.bukanov%gmail.com
bc0e6489d5 Bug 346968: The last ditch GC no longer run the branch callback as the callback can violate assumptions that callers of js_NewGCThing make. r=brendan
git-svn-id: svn://10.0.0.236/trunk@206667 18797224-902f-48f8-a5cc-f745e15eee43
2006-08-06 09:38:41 +00:00
igor.bukanov%gmail.com
c3d19cda9a Bug 341821: Running close hooks of generator objects outside GC locks. r=brendan sr=mrbkap
git-svn-id: svn://10.0.0.236/trunk@206664 18797224-902f-48f8-a5cc-f745e15eee43
2006-08-06 09:23:26 +00:00
igor.bukanov%gmail.com
71eee9736e Bug 346450: The support for close hooks for generators is implemented through internal API and JSExtendedClass.close is removed as a premature feature. r=brendan sr=mrbkap
git-svn-id: svn://10.0.0.236/trunk@206329 18797224-902f-48f8-a5cc-f745e15eee43
2006-08-01 21:01:59 +00:00
igor.bukanov%gmail.com
9eb90f97eb Bug 341821: Taking out the fix for the bug once again. The fix exposed the problem reported in bug 341815 and it better to address everything as single patch.
git-svn-id: svn://10.0.0.236/trunk@206120 18797224-902f-48f8-a5cc-f745e15eee43
2006-07-31 08:40:44 +00:00
igor.bukanov%gmail.com
8980741eea Bug 341821: close hooks are run outside GC locks. r=brendan,sr=mrbkap
git-svn-id: svn://10.0.0.236/trunk@205903 18797224-902f-48f8-a5cc-f745e15eee43
2006-07-29 07:26:40 +00:00
igor.bukanov%gmail.com
19edf80584 Bug 341821: removing the previous commit, the patch was broken.
git-svn-id: svn://10.0.0.236/trunk@205043 18797224-902f-48f8-a5cc-f745e15eee43
2006-07-28 13:23:09 +00:00
igor.bukanov%gmail.com
2ea793fe10 Bug 341821: Close hooks are run outside GC locks. r=brendan,sr=mrbkap
git-svn-id: svn://10.0.0.236/trunk@205034 18797224-902f-48f8-a5cc-f745e15eee43
2006-07-28 08:05:56 +00:00
igor.bukanov%gmail.com
395c406711 Bug 342625: Fix js_GC to return false only for branch callback cancelations restoring WAY_TOO_MUCH_GC. r=mrbkap,sr=brendan
git-svn-id: svn://10.0.0.236/trunk@201256 18797224-902f-48f8-a5cc-f745e15eee43
2006-06-29 19:13:51 +00:00
igor.bukanov%gmail.com
d31a3e55a3 Bug 341896: GC finalizes the states of native iterators before finalizing the rest of object. It avoids using expensive close hooks. r=brendan
git-svn-id: svn://10.0.0.236/trunk@201212 18797224-902f-48f8-a5cc-f745e15eee43
2006-06-29 06:51:33 +00:00
igor.bukanov%gmail.com
8304f638b7 Bug 341896: Call the branch callback outside GC lock. r=brendan
git-svn-id: svn://10.0.0.236/trunk@200362 18797224-902f-48f8-a5cc-f745e15eee43
2006-06-19 22:46:39 +00:00
brendan%mozilla.org
6274493000 Coroutine generators, a la Python 2.5 (326466, r=igor).
git-svn-id: svn://10.0.0.236/trunk@198979 18797224-902f-48f8-a5cc-f745e15eee43
2006-06-04 02:19:09 +00:00
igor.bukanov%gmail.com
deb08eaa35 Bug 338653: Check for JSRuntime.gcMaxMallocLimit on each allocation in js_NewGCThing to trigger GC sooner to prevent accumulation of garbage with large allocations. r=brendan
git-svn-id: svn://10.0.0.236/trunk@198837 18797224-902f-48f8-a5cc-f745e15eee43
2006-06-01 22:13:56 +00:00
igor%mir2.org
d34771b2e5 Bug 312238: using thread-local pool to speedup the allocation of GC things. This is a version of the original patch from Feng Qian <feng.qian.moz@gmail.com> with changes by Brendan and my tunings. r=feng.qian.moz,sr=brendan
git-svn-id: svn://10.0.0.236/trunk@197989 18797224-902f-48f8-a5cc-f745e15eee43
2006-05-19 10:25:36 +00:00
igor%mir2.org
a4a6d0ff40 Bug 312238: reverting untill build problems will be sort out.
git-svn-id: svn://10.0.0.236/trunk@197984 18797224-902f-48f8-a5cc-f745e15eee43
2006-05-19 09:35:11 +00:00
igor%mir2.org
d456690b29 Bug 312238: using thread-local pool to speedup the allocation of GC things. This is a version of the original patch from Feng Qian <feng.qian.moz@gmail.com> with changes by Brendan and my tunings. r=feng.qian.moz,sr=brendan
git-svn-id: svn://10.0.0.236/trunk@197982 18797224-902f-48f8-a5cc-f745e15eee43
2006-05-19 09:31:32 +00:00
brendan%mozilla.org
a5d1f637ee js_MarkStackFrame prototype, for bug 326466 pre-patch that already landed.
git-svn-id: svn://10.0.0.236/trunk@195495 18797224-902f-48f8-a5cc-f745e15eee43
2006-04-27 00:46:30 +00:00
igor%mir2.org
2cb61dd30f Bug 331770: Extending JS_GCMETER to include average free list density and free list recycle/new allocation ratio.
git-svn-id: svn://10.0.0.236/trunk@193125 18797224-902f-48f8-a5cc-f745e15eee43
2006-03-28 08:41:40 +00:00
igor%mir2.org
e9732b9053 Bug 331456: Cache of deflated string bytes is per runtime now. To preserve
API compatibility JS_GetStringBytes(JSString *str) calls newly introduced
js_GetGCStringRuntime(JSString *str) to extract JSRuntime* instance based
on the layout of GC structures. r=brendan


git-svn-id: svn://10.0.0.236/trunk@192999 18797224-902f-48f8-a5cc-f745e15eee43
2006-03-25 22:55:00 +00:00
igor%mir2.org
ea7f683bbe Bug 331598: Cleanup/simplifications after landing of patch for recursion-free GC from bug 324278.
git-svn-id: svn://10.0.0.236/trunk@192995 18797224-902f-48f8-a5cc-f745e15eee43
2006-03-25 20:21:31 +00:00
igor%mir2.org
688a6438cf Bug 330692: GC_MARK_DEBUG-only arguments are removed when GC_MARK_DEBUG is not defined. r=brendan
git-svn-id: svn://10.0.0.236/trunk@192847 18797224-902f-48f8-a5cc-f745e15eee43
2006-03-23 11:50:30 +00:00
igor%mir2.org
50e27318b9 Bug 324278: Implementation of GC marking algorithm that uses constant space for
any kind of GC things. r=brendan

The main idea is to put a GC thing to a special "unscanned bag" instead of recursively calling GC_MARK on thing's children when C stack is slow. Then later the code loops through the bag marking the children until the bag is empty.

The unscanned bag is implemented as a linked list of GC arenas where things that belongs to the bug marked with GCF_MARK|GCF_FINAL combination. To avoid long scanning of arenas on the list, the code uses a bitmask per arena to indicate which pages within the arena contains unscanned things and an extra bitmask per page to indicate offset range withing the page of the unscanned things.


git-svn-id: svn://10.0.0.236/trunk@192779 18797224-902f-48f8-a5cc-f745e15eee43
2006-03-22 15:38:43 +00:00
igor%mir2.org
5b8063caa0 Bug 294499: GC directly calls malloc instead of using JSArena for paged
allocation to avoid overhead of arena headers that GC does not use. r=brendan


git-svn-id: svn://10.0.0.236/trunk@187700 18797224-902f-48f8-a5cc-f745e15eee43
2006-01-17 01:26:35 +00:00
brendan%mozilla.org
77b50686dd Fix bugs 296772 and 262948 (r=shaver, sr=jst, a=me).
git-svn-id: svn://10.0.0.236/trunk@174267 18797224-902f-48f8-a5cc-f745e15eee43
2005-06-08 02:13:10 +00:00
brendan%mozilla.org
c1174d1919 Big patch from jst and me to beef up and automate, configurably, XPCNativeWrapper (281988, r+sr=bz/shaver, a=drivers).
git-svn-id: svn://10.0.0.236/trunk@173622 18797224-902f-48f8-a5cc-f745e15eee43
2005-05-20 03:12:22 +00:00
brendan%mozilla.org
c06c3686f6 JS_FRIEND_API for js_DumpGCStats (#ifdef JS_GCMETER only, not part of build).
git-svn-id: svn://10.0.0.236/trunk@171595 18797224-902f-48f8-a5cc-f745e15eee43
2005-04-04 20:43:47 +00:00
brendan%mozilla.org
1a6095dab1 s/DEBUG_brendan/DEBUG_notme/g
git-svn-id: svn://10.0.0.236/trunk@168312 18797224-902f-48f8-a5cc-f745e15eee43
2005-01-25 19:39:45 +00:00
brendan%mozilla.org
a8e2a690ad Revamp the GC to fix E4X private data dueling GC bugs, to reduce malloc costs for small-ish objects and functions, and to pave the way for further GC wins (123668, r=shaver, TAKE 2).
git-svn-id: svn://10.0.0.236/trunk@167293 18797224-902f-48f8-a5cc-f745e15eee43
2005-01-05 06:15:03 +00:00
brendan%mozilla.org
4c0635a125 Back out, broke liveconnect at least.
git-svn-id: svn://10.0.0.236/trunk@167288 18797224-902f-48f8-a5cc-f745e15eee43
2005-01-05 03:58:19 +00:00
brendan%mozilla.org
7a816352a4 Revamp the GC to fix E4X private data dueling GC bugs, to reduce malloc costs for small-ish objects and functions, and to pave the way for further GC wins (123668, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@167286 18797224-902f-48f8-a5cc-f745e15eee43
2005-01-05 02:56:36 +00:00
brendan%mozilla.org
3b56ceb6d1 Implement Deutsch-Schorr-Waite, plus related GC metering improvements, to avoid stack overflow crashes when marking very deep object lists (203278, r=igor@fastmail.fm and Igor wrote the tail-recursion elimination code).
git-svn-id: svn://10.0.0.236/trunk@166357 18797224-902f-48f8-a5cc-f745e15eee43
2004-12-06 23:17:19 +00:00
brendan%mozilla.org
e1d64a36be Initial E4X check-in, configured off (246441, rs=shaver).
git-svn-id: svn://10.0.0.236/trunk@163236 18797224-902f-48f8-a5cc-f745e15eee43
2004-10-05 10:19:07 +00:00
brendan%mozilla.org
25a4d6d341 - Improve global variable performance from 3x slower to 1.2x slower than
locals (169559, r=shaver).
- Also fix longstanding bug where global regexps in precompiled scripts were
  wrongly shared among threads/contexts (165201, r=shaver).
- Also fix strict-aliasing gcc warning causes (206599, r=bryner).


git-svn-id: svn://10.0.0.236/trunk@154749 18797224-902f-48f8-a5cc-f745e15eee43
2004-04-13 01:25:17 +00:00
gerv%gerv.net
123c4a9492 Bug 205418 - Relicense Spidermonkey (js/src) to MPL/LGPL/GPL. Patch by gerv; r,a=brendan.
git-svn-id: svn://10.0.0.236/trunk@149331 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-15 00:11:16 +00:00
brendan%mozilla.org
2a4866c57c My tweaks on top of a patch from Mark Hawlitzeck <mhawlitzeck1@earthlink.net> to avoid last-ditch gc failure (162779, sr=jband/shaver).
git-svn-id: svn://10.0.0.236/trunk@127928 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-23 07:56:11 +00:00
bryner%netscape.com
870e2e8bf7 Adding the functions JS_LockGCThingRT and JS_UnlockGCThingRT, which are variants that only require a JSRuntime, not a JSContext. Converted some internal callers to use the new interface. Bug 141356, patch from shaver, r=bryner, sr=brendan.
git-svn-id: svn://10.0.0.236/trunk@120782 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-04 05:28:09 +00:00
brendan%mozilla.org
26633b1aa8 Fix next-to-last vs. last context GC race, plus ClaimScope vs. js_DestroyContext race; removed js_ForceGC from the FRIEND JS API (133773, sr=jband&shaver, a=asa).
git-svn-id: svn://10.0.0.236/trunk@117899 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-02 04:23:21 +00:00
timeless%mac.com
69ae314807 Bug 106386 rid source of misspellings
r=db48x sr=blake a=asa


git-svn-id: svn://10.0.0.236/trunk@116832 18797224-902f-48f8-a5cc-f745e15eee43
2002-03-19 04:30:17 +00:00
brendan%mozilla.org
2163e55b8e Add mutable (growable or dependent, two subtypes) strings to solve O(n^2) and O(n^3) growth rates (56940, r=rogerl, sr=jband&shaver).
git-svn-id: svn://10.0.0.236/trunk@106213 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-25 00:26:38 +00:00
gerv%gerv.net
ae1d5501a1 Oops.
git-svn-id: svn://10.0.0.236/trunk@103236 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-20 00:02:59 +00:00
scc%mozilla.org
2281a4d137 bug #98089: ripped new license
git-svn-id: svn://10.0.0.236/trunk@103230 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-19 22:39:41 +00:00