Skip to content
This repository has been archived by the owner on Dec 9, 2017. It is now read-only.

No callbacks called for assignments to the for-in loop variable #76

Open
esbena opened this issue Nov 17, 2014 · 0 comments
Open

No callbacks called for assignments to the for-in loop variable #76

esbena opened this issue Nov 17, 2014 · 0 comments

Comments

@esbena
Copy link

esbena commented Nov 17, 2014

The instrumented code for:

var o, p;
for(p in o){
    p
}

is:

for (p in J$.H(33, J$.R(9, 'o', o, false, true))) {
    J$.N(41, 'p', p, false, true);
    {
        {
            J$.R(17, 'p', p, false, true);
        }
    }
}

The issue is that the assignment to p at the beginning of every loop iteration does not generate any calls to the analysis callbacks, thus the analysis can not observe the variable value before it is used. It seems (in analysis2.js) that N(...) is being actively ignored due the fourth parameter being true.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant