Status: New
Owner: ----

New issue 2391 by [email protected]: Getter evaluated in the wrong order
http://code.google.com/p/v8/issues/detail?id=2391

function idlog(x) {
  console.log('idlog(' + x + ')');
  return x;
}

var o = {
  get m() {
    console.log('get m');
    return function(x) {
      console.log('m(' + x + ')');
    };
  }
};

o.m(idlog(42));

V8 incorrectly calls idlog before the getter, resulting in the following console output:

idlog(42)
get m
m(42)

The correct result (both JSC and SpiderMonkey gets this right) should be:

get m
idlog(42)
m(42)

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

Reply via email to