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

New issue 2539 by [email protected]: Optimized function.apply(this, arguments) broken when declared arguments are mutated.
http://code.google.com/p/v8/issues/detail?id=2539

One repro is worth a thousand words ...

(function () {
  "use strict";
  var dispatcher = {};
  dispatcher.func = C;

  function A(x,y) {
    B(10, 11);
    assertSame(1, x);
    assertSame(2, y);
  }

  function B(x,y) {
    x = 0; y = 0;
    dispatcher.func.apply(this, arguments);
    assertSame(2, arguments.length);
    assertSame(10, arguments[0]);
    assertSame(11, arguments[1]);
  }

  function C(x,y) {
    assertSame(2, arguments.length);
    assertSame(10, arguments[0]);
    assertSame(11, arguments[1]);
  }

  A(1,2);
  A(1,2);
  %OptimizeFunctionOnNextCall(A);
  A(1,2);
})();

--
--
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/groups/opt_out.


Reply via email to