summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/TypedObject/bug920463.js
blob: 7a510011e94d0b44bd88362326523d3418c67cb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
if (!this.hasOwnProperty("TypedObject"))
  quit();

var StructType = TypedObject.StructType;
var float64 = TypedObject.float64;

var PointType3 = new StructType({ x: float64, y: float64});
function xPlusY(p) {
  return p.x + p.y;
}
var N = 30000;
for (var i = 0; i < N; ++i && xPlusY(function () { p; }) ) {
  obj = new PointType3();
  xPlusY(obj)
}