Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: src/parsing/parser.h

Issue 1772793002: Implement iterator finalization in array destructuring. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/parsing/parser.cc » ('j') | src/parsing/parser.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser.h
diff --git a/src/parsing/parser.h b/src/parsing/parser.h
index f838e3a518534aa345151d404d7d4d866b5550c1..ebf85213ef7738dd7ddecbabe47dc0e3b428b56f 100644
--- a/src/parsing/parser.h
+++ b/src/parsing/parser.h
@@ -466,6 +466,9 @@ class ParserTraits {
MessageTemplate::Template message,
const AstRawString* arg, int pos);
+ void FinalizeIteratorUse(Variable* completion, Expression* condition,
+ Variable* iter, Block* iterator_use, Block* result);
+
Statement* FinalizeForOfStatement(ForOfStatement* loop, int pos);
// Reporting errors.
@@ -674,9 +677,11 @@ class ParserTraits {
void BuildIteratorClose(ZoneList<Statement*>* statements, Variable* iterator,
Maybe<Variable*> input, Variable* output);
+
void BuildIteratorCloseForCompletion(
ZoneList<Statement*>* statements, Variable* iterator,
- Variable* body_threw);
+ Variable* completion);
+
Statement* CheckCallable(Variable* var, Expression* error);
};
@@ -703,6 +708,16 @@ class Parser : public ParserBase<ParserTraits> {
void Internalize(Isolate* isolate, Handle<Script> script, bool error);
void HandleSourceURLComments(Isolate* isolate, Handle<Script> script);
+ // Runtime encoding of different completion modes.
+ enum CompletionKind {
adamk 2016/03/07 20:28:05 Can you make this an enum class? Otherwise you've
neis 2016/03/08 13:40:10 If I make it an enum class, then instead of eg NOR
adamk 2016/03/08 18:41:13 Oh, I forgot about that bit. The thing that bother
+ NORMAL = 0,
+ THROW = 1,
+ BREAK = 2,
+ CONTINUE = 4,
+ RETURN = 8,
+ ABRUPT = THROW | BREAK | CONTINUE | RETURN
adamk 2016/03/07 20:28:05 Besides this line, do you actually use this enum a
neis 2016/03/08 13:40:10 Alright, changed it back to three values.
+ };
+
private:
friend class ParserTraits;
@@ -917,6 +932,7 @@ class Parser : public ParserBase<ParserTraits> {
Statement* ParseForStatement(ZoneList<const AstRawString*>* labels, bool* ok);
Statement* ParseThrowStatement(bool* ok);
Expression* MakeCatchContext(Handle<String> id, VariableProxy* value);
+
class DontCollectExpressionsInTailPositionScope;
class CollectExpressionsInTailPositionToListScope;
TryStatement* ParseTryStatement(bool* ok);
« no previous file with comments | « no previous file | src/parsing/parser.cc » ('j') | src/parsing/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698