Remove dead code in functionDef




7 years ago
5 years ago


(Reporter: ejpbruel, Unassigned)


Firefox Tracking Flags

(Not tracked)


(Whiteboard: [js:t])


(1 attachment)



7 years ago
Why are we calling fn->pn_cookie.makeFree() on the following line?

fn is a placeholder definition stored in the list of lexical dependencies for the current tree context, i.e. we have not yet seen a definition for it. Afaict, upvar cookies are only set during binding, i.e. when we encounter a definition. This would imply that fn->pn_cookie.isFree() is guaranteed to be true.

Adding an assertion JS_ASSERT(fn->pn_cookie.isFree()) and running jit-tests doesn't cause any breakage. Ok to remove this line?

Comment 1

7 years ago
Created attachment 643008 [details] [diff] [review]
Patch to be reviewed
Attachment #643008 - Flags: review?(n.nethercote)
Comment on attachment 643008 [details] [diff] [review]
Patch to be reviewed

I don't understand upvar cookies and their use enough to be comfortable reviewing this, sorry.

One thing, however:  you should run as well as jit-tests;  that will give you a *lot* more test coverage.  Use a command something like this:

  python tests/ -j 8 $BUILD/js
Attachment #643008 - Flags: review?(n.nethercote)
Whiteboard: [js:t]


6 years ago
Assignee: ejpbruel → general
Assignee: general → nobody
You need to log in before you can comment on or make changes to this bug.