Closed Bug 509089 Opened 11 years ago Closed 10 years ago

clean up AttemptToStabilizeTree

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
Tracking Status
status1.9.2 --- beta1-fixed

People

(Reporter: dvander, Unassigned)

References

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file)

Attached patch proposed changesSplinter Review
It is really hard to read/edit this function, and it needed a bunch of changes for recursion. I've split it up into smaller pieces. The functionality should be exactly the same.

I also got rid of those static inlines for reading VMSideExit typemaps.
Comment on attachment 393234 [details] [diff] [review]
proposed changes

passes trace-tests and try server
Attachment #393234 - Flags: review?(gal)
Comment on attachment 393234 [details] [diff] [review]
proposed changes

>diff -r 01f9bf3d015f js/src/jstracer.cpp
>--- a/js/src/jstracer.cpp	Thu Aug 06 16:36:43 2009 -0700
>+++ b/js/src/jstracer.cpp	Thu Aug 06 16:37:18 2009 -0700
>@@ -680,6 +680,16 @@
>     oracle.markGlobalSlotUndemotable(cx, gslots[slot - ti->nStackTypes]);
> }
> 
>+static JS_REQUIRES_STACK inline bool
>+IsSlotUndemotable(JSContext* cx, TreeInfo* ti, unsigned slot)
>+{
>+    if (slot < ti->nStackTypes)
>+        return oracle.isStackSlotUndemotable(cx, slot);
>+
>+    uint16* gslots = ti->globalSlots->data();
>+    return oracle.isGlobalSlotUndemotable(cx, gslots[slot - ti->nStackTypes]);
>+}
>+
> struct PCHashEntry : public JSDHashEntryStub {
>     size_t          count;
> };
>@@ -775,6 +785,10 @@
>         globalShape(_globalShape),
>         argc(_argc)
>     {}

Newline.

>+    inline TreeInfo* getTreeInfo()
>+    {
>+        return (TreeInfo*)vmprivate;
>+    }

Brendan wants the { on the same line as the () if its an inline function in the class declaration.

>+static TypeConsensus
>+FindLinkForExit(JSContext* cx, VMSideExit* exit, VMFragment** peerp)
>+{

FindLoopEdgeTarget?
Attachment #393234 - Flags: review?(gal) → review+
http://hg.mozilla.org/tracemonkey/rev/bee1d85b748a

Pushed with nits, except for the "{}" which actually wasn't part of the patch.
Whiteboard: fixed-in-tracemonkey
http://hg.mozilla.org/mozilla-central/rev/bee1d85b748a
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.