Closed Bug 624604 Opened 14 years ago Closed 11 years ago

nanojit: expose much less code to embedders

Categories

(Core Graveyard :: Nanojit, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: n.nethercote, Unassigned)

References

Details

Attachments

(1 file)

nanojit.h is the header imported by Nanojit embedders.  It contains pretty much every single non-local declaration in Nanojit, ie. way more stuff is exposed than necessary.  We should fix this, and in the process get a better idea of what the interface between Nanojit and the embedder is.
related: bug 559132
Blocks: 559132
Here's a rough list of things used by the embedder that come from the headers included by nanojit.h:

  - Assembler.h:
    - Assembler()
    - Assembler::{savedRegs,patch(),compile(),error(),setError()}
    - Tamarin uses a bunch more
  - Fragmento.h:
    - class Fragment
  - RegAlloc.h:
    - nothing
  - LIR.h:
    - LOpcode, AbiKind, AccSet, CallInfo, LIns, LirBuffer, LirWriter,
      LirReader, CseFilter, etc
    - ReverseLister, StackFilter could be moved into Assembler.cpp
  - CodeAlloc.h:
    - CodeAlloc
    - CodeList need not be public
  - Native.h:
    - NIns used in CodeAlloc.h
  - NativeXYZ.h:
    - all that stuff is used in Assembler.cpp, mostly
    - could split into two, one exported, one NJ-local
  - CodeAlloc.h:
    - CodeAlloc
    - CodeList used only in CodeAlloc.cpp, Assembler.cpp
  - Containers.h:
    - Seq, HashMap, etc
  - Allocator.h:
    - needed for Containers.h

Hmm, there's more than I thought.  The obvious two things are to remove RegAlloc.h from nanojit.h, and to split each NativeXYZ.h into internal and external parts.
Attached patch patchSplinter Review
Here's a draft patch that removes RegAlloc.h, removes a couple of dead things, and makes some public things private.  It doesn't split the NativeXYZ.h files.
Assignee: nnethercote → nobody
Status: ASSIGNED → NEW
Product: Core → Core Graveyard
Nanojit has been dead for several years. Its Bugzilla component has been moved to the graveyard (bug 984276).

I checked all the open bugs. They're all uninteresting, so I'm WONTFIXing them all. Apologies for the bugspam.
Status: NEW → RESOLVED
Closed: 11 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: