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

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

Issue 1589643002: Source positions for constructors and lots of async machinery (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « runtime/vm/ast_test.cc ('k') | runtime/vm/ast_transformer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #define DECLARE_VISIT(BaseName) \ 44 #define DECLARE_VISIT(BaseName) \
45 virtual void Visit##BaseName##Node(BaseName##Node* node); 45 virtual void Visit##BaseName##Node(BaseName##Node* node);
46 46
47 FOR_EACH_NODE(DECLARE_VISIT) 47 FOR_EACH_NODE(DECLARE_VISIT)
48 #undef DECLARE_VISIT 48 #undef DECLARE_VISIT
49 49
50 AstNode* Transform(AstNode* expr); 50 AstNode* Transform(AstNode* expr);
51 51
52 private: 52 private:
53 LocalVariable* EnsureCurrentTempVar(); 53 LocalVariable* EnsureCurrentTempVar();
54 LocalVariable* AddToPreambleNewTempVar(AstNode* node); 54 LocalVariable* AddToPreambleNewTempVar(AstNode* node, intptr_t token_pos);
55 ArgumentListNode* TransformArguments(ArgumentListNode* node); 55 ArgumentListNode* TransformArguments(ArgumentListNode* node);
56 AstNode* LazyTransform(const Token::Kind kind, 56 AstNode* LazyTransform(const Token::Kind kind,
57 AstNode* new_left, 57 AstNode* new_left,
58 AstNode* right); 58 AstNode* right);
59 LocalScope* ChainNewScope(LocalScope* parent); 59 LocalScope* ChainNewScope(LocalScope* parent);
60 LocalVariable* GetVariableInScope(LocalScope* scope, const String& symbol); 60 LocalVariable* GetVariableInScope(LocalScope* scope, const String& symbol);
61 61
62 void NextTempVar() { temp_cnt_++; } 62 void NextTempVar() { temp_cnt_++; }
63 63
64 Thread* thread() const { return thread_; } 64 Thread* thread() const { return thread_; }
65 65
66 SequenceNode* preamble_; 66 SequenceNode* preamble_;
67 int32_t temp_cnt_; 67 int32_t temp_cnt_;
68 AstNode* result_; 68 AstNode* result_;
69 LocalScope* async_temp_scope_; 69 LocalScope* async_temp_scope_;
70 70
71 Thread* thread_; 71 Thread* thread_;
72 72
73 DISALLOW_COPY_AND_ASSIGN(AwaitTransformer); 73 DISALLOW_COPY_AND_ASSIGN(AwaitTransformer);
74 }; 74 };
75 75
76 } // namespace dart 76 } // namespace dart
77 77
78 #endif // VM_AST_TRANSFORMER_H_ 78 #endif // VM_AST_TRANSFORMER_H_
OLDNEW
« no previous file with comments | « runtime/vm/ast_test.cc ('k') | runtime/vm/ast_transformer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698