{"ScriptPreparationCode":"// classes declared here can\u0027t be accessed in test cases for some reason...","TestCases":[{"Name":"class without declared fields","Code":"class X {\r\n constructor(foo, bar, baz) {\r\n this.foo = foo;\r\n this.bar = bar;\r\n this.baz = baz;\r\n }\r\n sum() {\r\n return this.foo \u002B this.bar \u002B this.baz;\r\n }\r\n}\r\n\r\nlet i = 1000;\r\nlet y = 0;\r\nwhile (i--) {\r\n let x = new X(1, 2, 3);\r\n y \u002B= x.foo \u002B x.bar \u002B x.baz;\r\n y \u002B= x.sum();\r\n}\r\nreturn y;","IsDeferred":false},{"Name":"class with declared fields","Code":"class X {\r\n foo;\r\n bar;\r\n baz;\r\n constructor(foo, bar, baz) {\r\n this.foo = foo;\r\n this.bar = bar;\r\n this.baz = baz;\r\n }\r\n sum() {\r\n return this.foo \u002B this.bar \u002B this.baz;\r\n }\r\n}\r\n\r\nlet i = 1000;\r\nlet y = 0;\r\nwhile (i--) {\r\n let x = new X(1, 2, 3);\r\n y \u002B= x.foo \u002B x.bar \u002B x.baz;\r\n y \u002B= x.sum();\r\n}\r\nreturn y;","IsDeferred":false},{"Name":"function constructor","Code":"function X(foo, bar, baz) {\r\n this.foo = foo;\r\n this.bar = bar;\r\n this.baz = baz;\r\n}\r\nX.prototype.sum = function() {\r\n return this.foo \u002B this.bar \u002B this.baz;\r\n}\r\n\r\nlet i = 1000;\r\nlet y = 0;\r\nwhile (i--) {\r\n let x = new X(1, 2, 3);\r\n y \u002B= x.foo \u002B x.bar \u002B x.baz;\r\n y \u002B= x.sum();\r\n}\r\nreturn y;","IsDeferred":false},{"Name":"object literal","Code":"function X(foo, bar, baz) {\r\n return {foo, bar, baz};\r\n}\r\nfunction sum(x) {\r\n return x.foo \u002B x.bar \u002B x.baz;\r\n}\r\n\r\nlet i = 1000;\r\nlet y = 0;\r\nwhile (i--) {\r\n let x = {foo: 1, bar: 2, baz: 3};\r\n y \u002B= x.foo \u002B x.bar \u002B x.baz;\r\n y \u002B= sum(x);\r\n}\r\nreturn y;","IsDeferred":false},{"Name":"object literal \u0026 sum.call","Code":"function X(foo, bar, baz) {\r\n return {foo, bar, baz};\r\n}\r\nfunction sum() {\r\n return this.foo \u002B this.bar \u002B this.baz;\r\n}\r\n\r\nlet i = 1000;\r\nlet y = 0;\r\nwhile (i--) {\r\n let x = X(1, 2, 3);\r\n y \u002B= x.foo \u002B x.bar \u002B x.baz;\r\n y \u002B= sum.call(x);\r\n}\r\nreturn y;","IsDeferred":false},{"Name":"object literal \u0026 sum.bind","Code":"function X(foo, bar, baz) {\r\n let x = {foo, bar, baz};\r\n x.sum = sum.bind(x);\r\n return x;\r\n}\r\nfunction sum() {\r\n return this.foo \u002B this.bar \u002B this.baz;\r\n}\r\n\r\nlet i = 1000;\r\nlet y = 0;\r\nwhile (i--) {\r\n let x = X(1, 2, 3);\r\n y \u002B= x.foo \u002B x.bar \u002B x.baz;\r\n y \u002B= x.sum();\r\n}\r\nreturn y;","IsDeferred":false},{"Name":"Object.create","Code":"function X(foo, bar, baz) {\r\n let x = Object.create(proto);\r\n x.foo = foo;\r\n x.bar = bar;\r\n x.baz = baz;\r\n return x;\r\n}\r\nconst proto = {\r\n sum() {\r\n return this.foo \u002B this.bar \u002B this.baz;\r\n }\r\n}\r\n\r\nlet i = 1000;\r\nlet y = 0;\r\nwhile (i--) {\r\n let x = X(1, 2, 3);\r\n y \u002B= x.foo \u002B x.bar \u002B x.baz;\r\n y \u002B= x.sum();\r\n}\r\nreturn y;","IsDeferred":false},{"Name":"Object.setPrototypeOf","Code":"function X(foo, bar, baz) {\r\n let x = {foo, bar, baz};\r\n Object.setPrototypeOf(x, proto);\r\n return x;\r\n}\r\nconst proto = {\r\n sum() {\r\n return this.foo \u002B this.bar \u002B this.baz;\r\n }\r\n}\r\n\r\nlet i = 1000;\r\nlet y = 0;\r\nwhile (i--) {\r\n let x = X(1, 2, 3);\r\n y \u002B= x.foo \u002B x.bar \u002B x.baz;\r\n y \u002B= x.sum();\r\n}\r\nreturn y;","IsDeferred":false}]}