Status: New
Owner: [email protected]
Labels: Type-Bug Priority-Medium

New issue 2206 by [email protected]: Checking SharedFunctionInfo identity instead of closure identity for inlining
http://code.google.com/p/v8/issues/detail?id=2206

Consider code like this:

function ounter() {
  function inner1() {
    inner2();
  }

  function inner2() {
  }

  for (var i = 0; i < 1000; i++) inner1();
}

In this case both inner1 and inner2 should be inlined into outer. However this is not possible with the current inlining infrastructure because it relies on closure identity.

It seems that switching to checks (and type-feedback) based on SharedFunctionInfo should enable better inlining and also better code sharing between instances of the same closure.

In some cases (like the example above) checks can also be omitted entirely based on static information from the parser.

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

Reply via email to