blob: 2895c26451d257a97a2db3ec58929b9d55343251 [file] [log] [blame]
var symbol = Symbol();
function Hello() {
}
Object.defineProperty(Hello, symbol, {
get: function () {
return this;
}
});
Hello.prototype.generate = function () {
return new this.constructor[symbol]();
};
function ok() {
var object = new Hello();
if (!(object.generate() instanceof Hello))
throw new Error("bad instance");
}
noInline(ok);
for (var i = 0; i < 10000; ++i)
ok();