From c13c8bf3160da887d734614b20d372085852bac6 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Mon, 19 Oct 2015 14:10:27 -0700 Subject: [PATCH] addressed PR feedback --- src/compiler/emitter.ts | 90 ++++++------ .../reference/capturedLetConstInLoop5.js | 40 +++--- .../reference/capturedLetConstInLoop8.js | 28 +++- .../reference/capturedLetConstInLoop8.symbols | 74 ++++++---- .../reference/capturedLetConstInLoop8.types | 32 ++++- .../reference/capturedLetConstInLoop8_ES6.js | 29 +++- .../capturedLetConstInLoop8_ES6.symbols | 129 ++++++++++-------- .../capturedLetConstInLoop8_ES6.types | 33 ++++- .../reference/capturedLetConstInLoop9.js | 44 ++++++ .../reference/capturedLetConstInLoop9.symbols | 51 +++++++ .../reference/capturedLetConstInLoop9.types | 62 +++++++++ .../reference/capturedLetConstInLoop9_ES6.js | 34 +++++ .../capturedLetConstInLoop9_ES6.symbols | 51 +++++++ .../capturedLetConstInLoop9_ES6.types | 62 +++++++++ .../cases/compiler/capturedLetConstInLoop8.ts | 16 ++- .../compiler/capturedLetConstInLoop8_ES6.ts | 17 ++- .../cases/compiler/capturedLetConstInLoop9.ts | 17 +++ .../compiler/capturedLetConstInLoop9_ES6.ts | 17 +++ 18 files changed, 671 insertions(+), 155 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index cd0967c5717..fcee2cb835d 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -386,49 +386,61 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } interface ConvertedLoopState { - // set of labels that occured inside the converted loop - // used to determine if labeled jump can be emitted as is or it should be dispatched to calling code + /* + * set of labels that occured inside the converted loop + * used to determine if labeled jump can be emitted as is or it should be dispatched to calling code + */ labels?: Map; - // collection of labeled jumps that transfer control outside the converted loop. - // maps store association 'label -> labelMarker' where - // - label - value of label as it apprear in code - // - label marker - return value that should be interpreted by calling code as 'jump to