Closed Bug 783465 Opened 12 years ago Closed 10 years ago

Add a C++-style doubly linked list class to ds/

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: billm, Assigned: billm)

Details

(Whiteboard: [js:t])

Attachments

(1 file)

Attached patch patchSplinter Review
We have JSCList, but it's kind of old. This is nicer. Unfortunately, we can't remove JSCList entirely because it's used outside the JS engine.
Attachment #652676 - Flags: review?(luke)
Is http://mxr.mozilla.org/mozilla-central/source/mfbt/LinkedList.h not usable here?

And fwiw, the only non-js-engine uses of JSCList are XBL code, which should be able to migrated to the mfbt LinkedList.
Hrm, I didn't know about that. It doesn't allow elements to belong to more than one list, which we do need in one case. But I guess it would be better to adapt it than to make a new one. I'll look into that tomorrow.
FWIW, IonMonkey branch added http://hg.mozilla.org/projects/ionmonkey/file/f6c3f006b57a/js/src/ion/InlineList.h

Which supports both single linked lists (with a forward iterator) and a doubly-linked list that has forward and reverse iterators. It doesn't support adding to more than one list though. I've been meaning to move it to js/src/ or something.
Whiteboard: [js:t]
Unassigning myself from old bugs. Don't worry, not quitting.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: