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

Side by Side Diff: runtime/vm/ast_transformer.h

Issue 484933003: Await it! (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_AST_TRANSFORMER_H_ 5 #ifndef VM_AST_TRANSFORMER_H_
6 #define VM_AST_TRANSFORMER_H_ 6 #define VM_AST_TRANSFORMER_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/ast.h" 9 #include "vm/ast.h"
10 10
(...skipping 28 matching lines...) Expand all
39 // 39 //
40 class AwaitTransformer : public AstNodeVisitor { 40 class AwaitTransformer : public AstNodeVisitor {
41 public: 41 public:
42 AwaitTransformer(SequenceNode* preamble, 42 AwaitTransformer(SequenceNode* preamble,
43 const Library& library, 43 const Library& library,
44 ParsedFunction* const parsed_function) 44 ParsedFunction* const parsed_function)
45 : preamble_(preamble), 45 : preamble_(preamble),
46 temp_cnt_(0), 46 temp_cnt_(0),
47 library_(library), 47 library_(library),
48 parsed_function_(parsed_function), 48 parsed_function_(parsed_function),
49 isolate_(Isolate::Current()) {} 49 isolate_(Isolate::Current()) {
50 // We need the jump context var in this scope to later on save the current
51 // scope.
srdjan 2014/08/20 17:50:06 Please fix comment.
Michael Lippautz (Google) 2014/08/20 20:56:06 Done.
52 preamble->scope()->LookupVariable(Symbols::AwaitContextVar(), false);
53 // We also need the jump counter in the FGB.
srdjan 2014/08/20 17:50:06 Please use FlowGraphBuilder instead of FGB
Michael Lippautz (Google) 2014/08/20 20:56:06 Done.
54 preamble->scope()->LookupVariable(Symbols::AwaitJumpVar(), false);
55 }
50 56
51 #define DECLARE_VISIT(BaseName) \ 57 #define DECLARE_VISIT(BaseName) \
52 virtual void Visit##BaseName##Node(BaseName##Node* node); 58 virtual void Visit##BaseName##Node(BaseName##Node* node);
53 59
54 FOR_EACH_NODE(DECLARE_VISIT) 60 FOR_EACH_NODE(DECLARE_VISIT)
55 #undef DECLARE_VISIT 61 #undef DECLARE_VISIT
56 62
57 AstNode* Transform(AstNode* expr); 63 AstNode* Transform(AstNode* expr);
58 64
59 private: 65 private:
(...skipping 15 matching lines...) Expand all
75 ParsedFunction* const parsed_function_; 81 ParsedFunction* const parsed_function_;
76 82
77 Isolate* isolate_; 83 Isolate* isolate_;
78 84
79 DISALLOW_COPY_AND_ASSIGN(AwaitTransformer); 85 DISALLOW_COPY_AND_ASSIGN(AwaitTransformer);
80 }; 86 };
81 87
82 } // namespace dart 88 } // namespace dart
83 89
84 #endif // VM_AST_TRANSFORMER_H_ 90 #endif // VM_AST_TRANSFORMER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698