Reviewers: Kasper Lund,

Description:
Change the function name collector to tolerate expressions that contain
multiple anonymous function literals as subexpressions.

Choose the rightmost one the one to attach a name to.

Please review this at http://codereview.chromium.org/67165

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
   M     src/func-name-inferrer.h


Index: src/func-name-inferrer.h
===================================================================
--- src/func-name-inferrer.h    (revision 1713)
+++ src/func-name-inferrer.h    (working copy)
@@ -70,7 +70,8 @@

    void SetFuncToInfer(FunctionLiteral* func_to_infer) {
      if (IsOpen()) {
-      ASSERT(func_to_infer_ == NULL);
+      // If we encounter another function literal after already having
+      // encountered one, the second one replaces the first.
        func_to_infer_ = func_to_infer;
      }
    }



--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to