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)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: shaver, Assigned: shaver)
References
Details
Attachments
(2 files, 3 obsolete files)
46.65 KB,
patch
|
brendan
:
review+
brendan
:
approval1.9+
|
Details | Diff | Splinter Review |
2.80 KB,
patch
|
Details | Diff | Splinter Review |
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!)
Assignee | ||
Comment 1•17 years ago
|
||
Assignee | ||
Comment 2•17 years ago
|
||
MikeM: would love your abuse of this patch, and subsequent ones, if you get a chance.
Assignee | ||
Comment 3•17 years ago
|
||
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 | ||
Comment 4•17 years ago
|
||
Assignee: general → shaver
Attachment #302430 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #302507 -
Flags: review?(brendan)
Attachment #302430 -
Flags: review?(brendan)
Comment 5•17 years ago
|
||
Seems valgrind clean in browser.
Comment 6•17 years ago
|
||
So what is the goal of this patch? Speed improvements? Just curious what the motivation was...
Assignee | ||
Comment 7•17 years ago
|
||
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.
Comment 8•17 years ago
|
||
Attachment 302507 [details] [diff] passes the threading tests of bug 404879. No failures debug or opt.
Assignee | ||
Comment 9•17 years ago
|
||
Better name.
Attachment #302507 -
Attachment is obsolete: true
Attachment #302954 -
Flags: review?(brendan)
Attachment #302507 -
Flags: review?(brendan)
Comment 10•17 years ago
|
||
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
Assignee | ||
Comment 11•17 years ago
|
||
As you requested, so it shall be.
Attachment #302954 -
Attachment is obsolete: true
Attachment #303266 -
Flags: review?(brendan)
Attachment #302954 -
Flags: review?(brendan)
Assignee | ||
Comment 12•17 years ago
|
||
Comment 13•17 years ago
|
||
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+
Assignee | ||
Comment 14•17 years ago
|
||
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
Comment 15•17 years ago
|
||
Canadian bilingual correctness alert! I'm going to make cbeard say something in bad Frensh to you, just for that :-P.
/be
Updated•17 years ago
|
Flags: in-testsuite-
Flags: in-litmus-
You need to log in
before you can comment on or make changes to this bug.
Description
•