{"ScriptPreparationCode":"const data = [\u0022hello\u0022, \u0022 \u0022, \u0022world\u0022];\r\nconst dep0 = 0;\r\nconst dep1 = 1;\r\nconst dep2 = 2;\r\nvar syncDeps = [dep0, dep1, dep2];\r\n\r\nfunction* genFn() {\r\n return (yield dep0) \u002B (yield dep1) \u002B (yield dep2);\r\n}\r\n\r\nfunction syncFn(a, b, c) {\r\n return a \u002B b \u002B c;\r\n}\r\n\r\nfunction runGen(fn) {\r\n let gen = fn();\r\n let next = gen.next();\r\n\r\n while (!next.done) {\r\n next = gen.next(read(next.value));\r\n }\r\n\r\n return next.value;\r\n}\r\n\r\nfunction runSync(fn, deps) {\r\n switch (deps.length) {\r\n case 1:\r\n return fn(read(deps[0]));\r\n case 2:\r\n return fn(read(deps[0]), read(deps[1]));\r\n case 3:\r\n return fn(read(deps[0]), read(deps[1]), read(deps[2]));\r\n case 4:\r\n return fn(read(deps[0]), read(deps[1]), read(deps[2]), read(deps[3]));\r\n case 5:\r\n return fn(\r\n read(deps[0]),\r\n read(deps[1]),\r\n read(deps[2]),\r\n read(deps[3]),\r\n read(deps[4])\r\n );\r\n default:\r\n return fn(...deps.map(read));\r\n }\r\n}\r\n\r\nfunction read(id) {\r\n return data[id];\r\n}","TestCases":[{"Name":"Generator","Code":"runGen(genFn);","IsDeferred":false},{"Name":"Sync","Code":"runSync(syncFn, syncDeps);","IsDeferred":false}]}