1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/ion/new-5.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,15 @@ 1.4 +// Call an Ion constructor from the interpreter. 1.5 + 1.6 +// This gets compiled and called by the interpreter. 1.7 +// Allocation and primitive check need to happen caller-side. 1.8 +function Foo() { 1.9 + this.x = 5; 1.10 + return 4; 1.11 +} 1.12 + 1.13 +eval("//nothing"); // Prevent compilation of global script. 1.14 + 1.15 +for (var i = 0; i < 100; i++) { 1.16 + var x = new Foo(); 1.17 + assertEq(typeof(x), "object"); 1.18 +}