Closed Bug 839420 Opened 9 years ago Closed 9 years ago

Don't call cx->stack.spIndexOf in ReportIsNotFunction

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(1 file)

ReportIsNotFunction does

    ptrdiff_t spIndex = cx->stack.spIndexOf(vp);

To determine where vp is on the interpreter stack. Pretty gross and this hack is not going to work with the baseline compiler because (1) it doesn't use the interpreter stack and (2) it copies values on the stack (stack grows down so we have to reverse the arguments vector).

Not sure yet what's the easiest way to fix this.

This is causing expression-autopsy.js test failures on the baseline compiler branch.
Attached patch PatchSplinter Review
This fixes the expression-autopsy test failure and passes tests on inbound.
Assignee: general → jdemooij
Status: NEW → ASSIGNED
Attachment #711812 - Flags: review?(bhackett1024)
Comment on attachment 711812 [details] [diff] [review]
Patch

Review of attachment 711812 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/jsinterp.h
@@ +109,4 @@
>  
>  extern JSObject *
> +ValueToCallable(JSContext *cx, const Value &vp, int numToSkip = -1,
> +                MaybeConstruct construct = NO_CONSTRUCT);

The meaning of numToSkip in these two functions needs a comment.
Attachment #711812 - Flags: review?(bhackett1024) → review+
https://hg.mozilla.org/mozilla-central/rev/e644bc44f39f
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.