Closed Bug 544166 Opened 14 years ago Closed 14 years ago

ES5 non-strict mode: arguments[i] should alias parameters even after return

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 478174

People

(Reporter: dmandelin, Unassigned)

Details

At least I think so. That part of the spec is kind of hard to read, but it seems to be saying this. JSC and V8 do alias them even after return. Here is a test case that shows it:

    var args;
    var g;
    var p;

    function f(a) {
      args = arguments;
      g = function() { ++a; };
      p = function() { print(a); };
    }

    f(0);
    p();
    g();
    print(args[0]);
    ++args[0];
    p();
Yes, Richard Cornford raised this on es-discuss a while ago:

https://mail.mozilla.org/pipermail/es-discuss/2008-July/006618.html

I copped to it here:

https://mail.mozilla.org/pipermail/es-discuss/2008-July/006625.html

Guess it is time to fix.

/be
Bug 478174 has a shorter test case.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.