diff -r 000000000000 -r 6474c204b198 js/src/jit-test/tests/ion/new-7.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/js/src/jit-test/tests/ion/new-7.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,32 @@ +// Reduced from v8-raytrace. + +var Class = { + create : function() { + return function() { + this.initialize.apply(this, arguments); + } + } +} + +var Bar = Class.create(); +Bar.prototype = { + // Compiled third. + initialize : function() { } +} + +var Foo = Class.create(); +Foo.prototype = { + // Compiled second. Crashes when setting "bar". Uses LCallConstructor. + initialize : function() { + this.bar = new Bar(); + } +} + +// Compiled first. +function f() { + for (var i = 0; i < 100; i++) { + var foo = new Foo(); + } +} + +f();