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

New issue 2170 by erik.corry: Strange effects with floating point arrays that have other properties.
http://code.google.com/p/v8/issues/detail?id=2170

// The following code throws an exception with recent V8s.  It doesn't
// throw if the array elements are not doubles.
for (var i = 0; i < 2; i++) {
  var a = [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8];
  var x = new Array();
  x.fixed$length = true;
  for (var j = 0; j < a.length; j++) {
    x.push(a[j]);
  }

  for(var j = 0; j < x.length; j++) {
    if (typeof x[j] != 'number') throw "foo";
    x[j] = x[j];
  }
}


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

Reply via email to