Status: Accepted
Owner: [email protected]
CC: [email protected]
Labels: Type-Bug Priority-Medium Harmony

New issue 3475 by [email protected]: Arrow function declaration cannot be optimized
http://code.google.com/p/v8/issues/detail?id=3475

The bailout IDs for arrow function literals within expressions are off. This makes any arrow function declaration that is being used within an expression in an optimized function to cause a failure in full-codegen when bailout entries are being prepared. The following will reproduce the issue.

function g() {
  return typeof (() => {});
}

g();
g();
%OptimizeFunctionOnNextCall(g);
g();

Here is the comparison of two AST dumps, the first one for a normal function literal and the second one for an arrow function declaration.

--- AST ---
FUNC
. NAME "f"
. INFERRED NAME ""
. RETURN
. . TYPEOF (id=6)
. . . FUNC LITERAL (id=4)
. . . . NAME
. . . . INFERRED NAME

--- AST ---
FUNC
. NAME "g"
. INFERRED NAME ""
. RETURN
. . TYPEOF (id=4)
. . . FUNC LITERAL (id=4)
. . . . NAME
. . . . INFERRED NAME

I ended up disabling the mjsunit/harmony/arrow-functions test case in order to be able to make forward progress. This test starts failing because top-level code is now being optimized in the presence of the --always-opt flag.

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to