js/src/jit-test/tests/ion/new-7.js

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 // Reduced from v8-raytrace.
     3 var Class = {
     4 	create : function() {
     5 		return function() {
     6 			this.initialize.apply(this, arguments);
     7 		}
     8 	}
     9 }
    11 var Bar = Class.create();
    12 Bar.prototype = {
    13 	// Compiled third.
    14 	initialize : function() { }
    15 }
    17 var Foo = Class.create();
    18 Foo.prototype = {
    19 	// Compiled second. Crashes when setting "bar". Uses LCallConstructor.
    20 	initialize : function() {
    21 		this.bar = new Bar();
    22 	}
    23 }
    25 // Compiled first.
    26 function f() {
    27 	for (var i = 0; i < 100; i++) {
    28 		var foo = new Foo();
    29 	}
    30 }
    32 f();

mercurial