mikhail.naganov@gmail.com
02b7894f95
Fix issue 380.
...
Don't infer name for a function if a result of its call is assigned to a variable / property. E.g., in this case:
a = function() { ... } ();
the function must remain anonymous because 'a' doesn't receive a function reference, but instead a result of its call.
BUG=http://code.google.com/p/v8/issues/detail?id=380
TEST=cctest/test-func-name-inference/Issue380
Review URL: http://codereview.chromium.org/126195
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2185 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-16 11:47:00 +00:00
mikhail.naganov@gmail.com
6d71da11fd
Merge in changes from readability review.
...
All changes from http://codereview.chromium.org/115024 , except splitting namespace declarations in two lines (will be done separately for all source files).
Review URL: http://codereview.chromium.org/113763
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2037 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-25 08:39:22 +00:00
mikhail.naganov@gmail.com
7aacf00933
Allow multiple function literals to be assigned to the same var / property.
...
In such a case all functions get the same name. I think it's a good performance / usability tradeoff. In case a developer wants more clarity, it's up to him to give names to functions.
Review URL: http://codereview.chromium.org/67168
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1727 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-16 16:34:24 +00:00
mikhail.naganov@gmail.com
3c2a7bdf21
Add name inference for anonymous functions to facilitate debugging and profiling of JS code.
...
Currently function name inference is wired with AST optimization pass to avoid introducing another pass over AST. A better solution would be to rewrite AST visitors so they can be naturally combined together in a single pass, as their current implementation doesn't allow it.
For examples of cases where function names can be inferred, see the tests file.
Review URL: http://codereview.chromium.org/62146
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1696 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-14 00:51:59 +00:00