• Home
  • Raw
  • Download

Lines Matching refs:node

58     prepare(node: ts.Node): void {
62 pg.createAsyncGeneratorObj(node, getVregisterCache(pg, CacheList.FUNC));
63 pg.storeAccumulator(node, this.funcObj);
65 pg.label(node, this.beginLabel);
66 pg.loadAccumulator(node, getVregisterCache(pg, CacheList.UNDEFINED));
67 pg.suspendGenerator(node, this.funcObj);
68 pg.resumeGenerator(node, this.funcObj);
69 pg.storeAccumulator(node, this.resumeVal);
72 await(node: ts.Node): void {
74 this.functionAwait(node);
75 this.handleMode(node);
78 directReturn(node: ts.Node | NodeKind): void {
80 pg.storeAccumulator(node, this.resumeVal);
81 pg.generatorComplete(node, this.funcObj);
82 …pg.asyncgeneratorresolve(node, this.funcObj, this.resumeVal, getVregisterCache(pg, CacheList.TRUE)…
83 pg.return(node);
86 explicitReturn(node: ts.Node | NodeKind, empty ? : boolean): void {
89 pg.asyncFunctionAwaitUncaught(node, this.funcObj);
90 pg.suspendGenerator(node, this.funcObj);
91 this.resumeGenerator(node);
93 pg.generatorComplete(node, this.funcObj);
94 …pg.asyncgeneratorresolve(node, this.funcObj, this.resumeVal, getVregisterCache(pg, CacheList.TRUE)…
95 pg.return(node);
98 implicitReturn(node: ts.Node | NodeKind): void {
99 this.pg.loadAccumulator(node, getVregisterCache(this.pg, CacheList.UNDEFINED));
100 this.directReturn(node);
103 yield(node: ts.Node): void {
108 this.await(node);
109 pg.storeAccumulator(node, this.resumeVal);
112 pg.generatorYield(node, this.funcObj);
117 …pg.asyncgeneratorresolve(node, this.funcObj, this.resumeVal, getVregisterCache(pg, CacheList.FALSE…
118 this.resumeGenerator(node);
120 this.handleAsyncYieldResume(node);
123 yieldStar(node: ts.Node): void {
135 node, IteratorType.Async, this);
142 pg.storeConst(node, this.resumeVal, CacheList.UNDEFINED);
143 pg.loadAccumulatorInt(node, ResumeMode.NEXT);
144 pg.storeAccumulator(node, this.resumeType);
145 pg.moveVreg(node, nextMethod, iter.method());
154 pg.label(node, loopStart);
155 pg.storeConst(node, exitReturn, CacheList.FALSE);
158 pg.loadAccumulatorInt(node, ResumeMode.NEXT);
159 pg.condition(node, ts.SyntaxKind.EqualsEqualsEqualsToken, this.resumeType, throwCompletion);
160 pg.moveVreg(node, iter.method(), nextMethod);
161 pg.branch(node, callMethod);
164 pg.label(node, throwCompletion);
165 pg.loadAccumulatorInt(node, ResumeMode.THROW);
166 … pg.condition(node, ts.SyntaxKind.EqualsEqualsEqualsToken, this.resumeType, returnCompletion);
172 pg.branchIfNotUndefined(node, callMethod);
184 pg.throwThrowNotExist(node);
188 pg.label(node, returnCompletion);
189 pg.storeConst(node, exitReturn, CacheList.TRUE);
194 pg.branchIfNotUndefined(node, callMethod);
202 pg.loadAccumulator(node, this.resumeVal);
203 this.await(node);
205 this.directReturn(node);
207 pg.label(node, callMethod);
213 this.await(node);
214 pg.throwIfNotObject(node, this.resumeVal);
217 pg.jumpIfTrue(node, iterCompletion);
219 pg.loadAccumulator(node, this.resumeVal);
222 this.await(node);
224 pg.generatorYield(node, this.funcObj);
225 pg.storeConst(node, done, CacheList.FALSE);
226 pg.asyncgeneratorresolve(node, this.funcObj, this.resumeVal, done);
228 this.resumeGenerator(node);
230 pg.loadAccumulatorInt(node, ResumeMode.RETURN);
231 pg.condition(node, ts.SyntaxKind.EqualsEqualsToken, this.resumeType, loopStart);
233 pg.loadAccumulator(node, this.resumeVal);
234 pg.asyncFunctionAwaitUncaught(node, this.funcObj);
236 pg.suspendGenerator(node, this.funcObj);
237 this.resumeGenerator(node);
239 pg.loadAccumulatorInt(node, ResumeMode.THROW);
240 pg.condition(node, ts.SyntaxKind.EqualsEqualsToken, this.resumeType, returnCompletion);
242 pg.branch(node, loopStart);
244 pg.label(node, iterCompletion);
246 pg.loadAccumulator(node, exitReturn);
247 pg.jumpIfFalse(node, normalOrThrowCompletion);
257 this.directReturn(node);
259 pg.label(node, normalOrThrowCompletion);
267 private handleAsyncYieldResume(node: ts.Node): void {
274 pg.loadAccumulatorInt(node, ResumeMode.RETURN);
275 pg.condition(node, ts.SyntaxKind.EqualsEqualsEqualsToken, this.resumeType, notRet);
278 pg.loadAccumulator(node, this.resumeVal);
279 pg.asyncFunctionAwaitUncaught(node, this.funcObj);
280 pg.suspendGenerator(node, this.funcObj);
281 this.resumeGenerator(node);
284 pg.loadAccumulatorInt(node, ResumeMode.THROW);
285 … pg.condition(node, ts.SyntaxKind.EqualsEqualsEqualsToken, this.resumeType, normalCompletion);
286 pg.loadAccumulator(node, this.resumeVal);
287 pg.throw(node);
289 pg.label(node, normalCompletion);
299 pg.loadAccumulator(node, this.resumeVal);
300 this.directReturn(node);
302 pg.label(node, notRet);
304 pg.loadAccumulatorInt(node, ResumeMode.THROW);
305 pg.condition(node, ts.SyntaxKind.EqualsEqualsEqualsToken, this.resumeType, notThrow);
306 pg.loadAccumulator(node, this.resumeVal);
307 pg.throw(node);
309 pg.label(node, notThrow);
310 pg.loadAccumulator(node, this.resumeVal);
313 private handleMode(node: ts.Node): void {
316 pandaGen.getResumeMode(node, this.funcObj);
317 pandaGen.storeAccumulator(node, this.resumeType);
320 pandaGen.loadAccumulatorInt(node, ResumeMode.THROW);
324 pandaGen.condition(node, ts.SyntaxKind.EqualsEqualsToken, this.resumeType, notThrowLabel);
325 pandaGen.loadAccumulator(node, this.resumeVal);
326 pandaGen.throw(node);
329 pandaGen.label(node, notThrowLabel);
330 pandaGen.loadAccumulator(node, this.resumeVal);
333 resolve(node: ts.Node | NodeKind, value: VReg): void {
335 …pandaGen.asyncgeneratorresolve(node, this.funcObj, value, getVregisterCache(pandaGen, CacheList.TR…
338 cleanUp(node: ts.Node): void {
340 pandaGen.label(node, this.endLabel);
342 pandaGen.storeAccumulator(node, this.resumeVal);
343 pandaGen.generatorComplete(node, this.funcObj);
344 pandaGen.loadAccumulator(node, this.resumeVal);
345 pandaGen.asyncgeneratorreject(node, this.funcObj); // exception is in acc