Closed
Bug 473188
Opened 16 years ago
Closed 15 years ago
portable but not module specific assert macros
Categories
(Tamarin Graveyard :: Virtual Machine, defect)
Tamarin Graveyard
Virtual Machine
Tracking
(Not tracked)
RESOLVED
FIXED
Future
People
(Reporter: edwsmith, Unassigned)
Details
(Whiteboard: fixed-in-nanojit, fixed-in-tamarin, fixed-in-tracemonkey)
Attachments
(2 files, 1 obsolete file)
34.47 KB,
patch
|
edwsmith
:
review+
treilly
:
review+
|
Details | Diff | Splinter Review |
1.21 KB,
patch
|
gal
:
review+
|
Details | Diff | Splinter Review |
lets replace AvmAssert, GCAssert, and NanoAssert (and msg enabled variants) with VMPI_assert
(inspired by bug 473159)
Comment 1•16 years ago
|
||
This does not make sense as long as (a) mmgc is independent of the rest of the VM and (b) the VMPI_ macros are notionally part of the vm, not of some lower-layer API layer (or the mmgc). IMO we either need to dispense with the fiction that the two are independent, or we need to think up a strategy for a shared porting layer. (I suspect doing both is right.)
Reporter | ||
Comment 2•16 years ago
|
||
I agree, lets dispense with the fiction that mmgc and the vm are independent, and work on a shared porting layer. by the way, if this bug is blocking the wrong tracker, please help me find the right one. I seem to recall a tracking bug for the porting layer but i couldn't find it with the obvious search terms.
Reporter | ||
Comment 3•16 years ago
|
||
incidentally if we do have a generic porting layer, then it could have an assert of its own, and MMgc and the VM could use it, regardless of MMgc's independence from the vm.
Updated•15 years ago
|
Target Milestone: --- → Future
Updated•15 years ago
|
Assignee: nobody → lhansen
Updated•15 years ago
|
Status: NEW → ASSIGNED
Comment 4•15 years ago
|
||
Moves the code for AvmAssert and friends into two new files, which for lack of a better place I have placed in VMPI. They could live in core/, but given that the Player currently compiles MMgc separately from the rest of the VM, factoring seemed the right thing to do.
Makes the GC assert macros aliases for the now-common AvmAssert macros.
Attachment #438384 -
Flags: feedback?(edwsmith)
Reporter | ||
Updated•15 years ago
|
Attachment #438384 -
Flags: feedback?(edwsmith) → feedback+
Reporter | ||
Comment 5•15 years ago
|
||
Comment on attachment 438384 [details] [diff] [review]
Preliminary patch
Cool. with a tweak in nanojit.h to use avmplus::AvmAssertFail instead of NanoAssertFail, we also can eliminate AvmDebug.cpp/h.
Comment 6•15 years ago
|
||
Same as previous patch, but also changes project files, nanojit.h, and removes core/AvmDebug.{cpp,h}.
As a follow-on we'd want to consider changing GCAssert and so on to AvmAssert and so on, but that does not seem high priority right now.
Attachment #438384 -
Attachment is obsolete: true
Attachment #438631 -
Flags: review?(treilly)
Attachment #438631 -
Flags: review?(edwsmith)
Updated•15 years ago
|
Whiteboard: Has patch
Comment 7•15 years ago
|
||
Dumb question, why not name the moved functions VMPI_assert and such?
Comment 8•15 years ago
|
||
The VMPI_ functions are for a platform interface (where the platform code should implement it). VMPI_alloca is the exception but it's misnamed and we should fix that. Anyway these macros are portable.
Comment 9•15 years ago
|
||
Comment on attachment 438631 [details] [diff] [review]
Patch
The reality is that MMgc is used separately from the VM but in reality they are always compiled and linked in together. Might behoove us to get rid of the notion of MMgc as a separate library and have all our clients linked against one project/library (avm).
Attachment #438631 -
Flags: review?(treilly) → review+
Reporter | ||
Comment 10•15 years ago
|
||
Comment on attachment 438631 [details] [diff] [review]
Patch
looks, good, setting feedback flag for myself as a reminder to push the nanojit changes to nanojit-central along with a patch to nanojit/avmplus.h (for the lirasm utility).
Attachment #438631 -
Flags: review?(edwsmith)
Attachment #438631 -
Flags: review+
Attachment #438631 -
Flags: feedback?(edwsmith)
Comment 11•15 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Reporter | ||
Updated•15 years ago
|
Attachment #438631 -
Flags: feedback?(edwsmith)
Reporter | ||
Comment 12•15 years ago
|
||
This is for nanojit-central. It modifies the definition of NanoAssert to call AvmAssertFail, which must be defined by the VM host. For lirasm/tracemonkey AvmAssertFail goes in avmplus.h/cpp.
Ideally we need a better vm/nanojit api layer. this patch takes a tiny step away from abstraction, but NanoAssert already relies on AvmLog, so for now this is tolerable.
Reporter | ||
Updated•15 years ago
|
Attachment #438808 -
Flags: review?(gal)
Updated•15 years ago
|
Attachment #438808 -
Flags: review?(gal) → review+
Comment 13•15 years ago
|
||
This will break TM in a trivial manner when we pull from n-c, but we can fix it then.
Reporter | ||
Comment 14•15 years ago
|
||
NJ: http://hg.mozilla.org/projects/nanojit-central/rev/7c682d3836f7
TR: http://hg.mozilla.org/tamarin-redux/rev/1bdc5515e0bf
(reopening solely for the sake of tracking the nanojit-central patch status)
Assignee: lhansen → nobody
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Whiteboard: Has patch → fixed-in-nanojit, fixed-in-tamarin
![]() |
||
Comment 15•15 years ago
|
||
Whiteboard: fixed-in-nanojit, fixed-in-tamarin → fixed-in-nanojit, fixed-in-tamarin, fixed-in-tracemonkey
Comment 16•15 years ago
|
||
Status: REOPENED → RESOLVED
Closed: 15 years ago → 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•