summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/new-3.js
blob: b7b2fa89fa5092f4ac6dd62b8f64df4aea5d8fc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Uncompiled, polymorphic callsite for |new|.

function Foo(prop) {
	this.name = "Foo";
	this.prop = prop;
}

function f() {
	// Enter OSR here.
	for (var i = 0; i < 100; i++) 
	{ }

	// No type information below this point.
	var x = new Foo("cats");
	return x;
}

assertEq(f().prop, "cats");