Closed Bug 586358 Opened 14 years ago Closed 14 years ago

TM: make imacpc flagged

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: cdleary, Assigned: cdleary)

References

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file)

No more storing null to the imacpc value on each frame push.
JM changes will go in after the merge I suppose.
Assignee: general → cdleary
Attachment #464887 - Flags: review?(lw)
Stores are at least async, assuming reservation/buffering resources are not filled up -- is a test and branch really cheaper?

/be
(In reply to comment #2)
This is removing a store on the very hot call path (which we want the mjit to inline, hence size matters) at little or no (when !imacpc) extra cost on much colder paths.
Attachment #464887 - Flags: review?(lw) → review+
-            if (e->pc == pc && e->imacpc == fp->imacpc &&
+            if (e->pc == pc && (e->imacpc == (fp->hasIMacroPC() ? fp->getIMacro
PC() : NULL)) &&

+    if (innermost->imacpc)
+        fp->setIMacroPC(innermost->imacpc);
+    else
+        fp->clearIMacroPC();

IMO, not allowing getIMacroPC() to return NULL and setIMacroPC() to take NULL is a bad idea.  It requires you to jump through hoops like the cases above, but doesn't gain you any safety AFAICT.  Loosening them might also allow you to remove clearIMacroPC().
http://hg.mozilla.org/tracemonkey/rev/7e03c169adee

Addresses njn's getter concern with maybe method.
Whiteboard: fixed-in-tracemonkey
http://hg.mozilla.org/mozilla-central/rev/7e03c169adee
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: