Closed Bug 416675 Opened 17 years ago Closed 17 years ago

refactor JSScope locking for reuse on non-native objects

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: shaver, Assigned: shaver)

References

Details

Attachments

(2 files, 3 obsolete files)

Plan: - refactor JSScope's locking members into a JSOwnable struct, and adapt the locking macros. Locking members are ownercx, lock, count, link, file, line - rewrite the locking macros in terms of ones that operate on the JSOwnable (- use the new locking macros in arrays for threadsafety!)
MikeM: would love your abuse of this patch, and subsequent ones, if you get a chance.
Comment on attachment 302430 [details] [diff] [review] untested, but builds JS_THREADSAFE with NSPR and starts ...and it passes the test suite, so let's see what Mr Bacon thinks of it.
Attachment #302430 - Flags: review?(brendan)
Assignee: general → shaver
Attachment #302430 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #302507 - Flags: review?(brendan)
Attachment #302430 - Flags: review?(brendan)
Seems valgrind clean in browser.
So what is the goal of this patch? Speed improvements? Just curious what the motivation was...
The goal is to allow the use of the single-thread-optimized, request-based locking system for objects that don't use JSScope. One important such set of objects is the new custom-ops Array implementation in bug 322889, which needs threadsafety.
Attachment 302507 [details] [diff] passes the threading tests of bug 404879. No failures debug or opt.
Attached patch WIP 3: s/ownable/title/ (obsolete) — Splinter Review
Better name.
Attachment #302507 - Attachment is obsolete: true
Attachment #302954 - Flags: review?(brendan)
Attachment #302507 - Flags: review?(brendan)
Comment on attachment 302954 [details] [diff] [review] WIP 3: s/ownable/title/ js_TransferTitleLock => js_TransferTitle ;-) js_DestroyTitle => js_FinishTitle Comment requirement that JSObjectMap precede JSTitle? FIXME should cite https://bugzilla.mozilla.org/show_bug.cgi?id=408416 Great otherwise! /be
As you requested, so it shall be.
Attachment #302954 - Attachment is obsolete: true
Attachment #303266 - Flags: review?(brendan)
Attachment #302954 - Flags: review?(brendan)
Comment on attachment 303266 [details] [diff] [review] updated to review comments Thanks for the interdiff but please use old on left USENET standard, I'm old too ;-). Also, lose the French spacing in that comment! /be
Attachment #303266 - Flags: review?(brendan)
Attachment #303266 - Flags: review+
Attachment #303266 - Flags: approval1.9+
Dammit, I forgot to fix the French spacing. I'll bundle it into something else, sorry. Checking in jsapi.c; /cvsroot/mozilla/js/src/jsapi.c,v <-- jsapi.c new revision: 3.409; previous revision: 3.408 done Checking in jscntxt.h; /cvsroot/mozilla/js/src/jscntxt.h,v <-- jscntxt.h new revision: 3.194; previous revision: 3.193 done Checking in jslock.c; /cvsroot/mozilla/js/src/jslock.c,v <-- jslock.c new revision: 3.79; previous revision: 3.78 done Checking in jslock.h; /cvsroot/mozilla/js/src/jslock.h,v <-- jslock.h new revision: 3.39; previous revision: 3.38 done Checking in jsobj.h; /cvsroot/mozilla/js/src/jsobj.h,v <-- jsobj.h new revision: 3.86; previous revision: 3.85 done Checking in jsscope.c; /cvsroot/mozilla/js/src/jsscope.c,v <-- jsscope.c new revision: 3.79; previous revision: 3.78 done Checking in jsscope.h; /cvsroot/mozilla/js/src/jsscope.h,v <-- jsscope.h new revision: 3.56; previous revision: 3.55 done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Canadian bilingual correctness alert! I'm going to make cbeard say something in bad Frensh to you, just for that :-P. /be
Flags: in-testsuite-
Flags: in-litmus-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: