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

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

Issue 2624513005: Small cleanups in the Kernel FlowGraphBuilder (Closed)
Patch Set: Incorporate review comments Created 3 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 | « no previous file | runtime/vm/kernel.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 RUNTIME_VM_KERNEL_H_ 5 #ifndef RUNTIME_VM_KERNEL_H_
6 #define RUNTIME_VM_KERNEL_H_ 6 #define RUNTIME_VM_KERNEL_H_
7 7
8 #if !defined(DART_PRECOMPILED_RUNTIME) 8 #if !defined(DART_PRECOMPILED_RUNTIME)
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "vm/allocation.h" 10 #include "vm/allocation.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 M(TypeLiteral) \ 72 M(TypeLiteral) \
73 M(ThisExpression) \ 73 M(ThisExpression) \
74 M(Rethrow) \ 74 M(Rethrow) \
75 M(Throw) \ 75 M(Throw) \
76 M(ListLiteral) \ 76 M(ListLiteral) \
77 M(MapLiteral) \ 77 M(MapLiteral) \
78 M(MapEntry) \ 78 M(MapEntry) \
79 M(AwaitExpression) \ 79 M(AwaitExpression) \
80 M(FunctionExpression) \ 80 M(FunctionExpression) \
81 M(Let) \ 81 M(Let) \
82 M(BlockExpression) \
83 M(Statement) \ 82 M(Statement) \
84 M(InvalidStatement) \ 83 M(InvalidStatement) \
85 M(ExpressionStatement) \ 84 M(ExpressionStatement) \
86 M(Block) \ 85 M(Block) \
87 M(EmptyStatement) \ 86 M(EmptyStatement) \
88 M(AssertStatement) \ 87 M(AssertStatement) \
89 M(LabeledStatement) \ 88 M(LabeledStatement) \
90 M(BreakStatement) \ 89 M(BreakStatement) \
91 M(WhileStatement) \ 90 M(WhileStatement) \
92 M(DoStatement) \ 91 M(DoStatement) \
(...skipping 1805 matching lines...) Expand 10 before | Expand all | Expand 10 after
1898 private: 1897 private:
1899 Let() {} 1898 Let() {}
1900 1899
1901 Child<VariableDeclaration> variable_; 1900 Child<VariableDeclaration> variable_;
1902 Child<Expression> body_; 1901 Child<Expression> body_;
1903 1902
1904 DISALLOW_COPY_AND_ASSIGN(Let); 1903 DISALLOW_COPY_AND_ASSIGN(Let);
1905 }; 1904 };
1906 1905
1907 1906
1908 class BlockExpression : public Expression {
1909 public:
1910 static BlockExpression* ReadFrom(Reader* reader);
1911 virtual void WriteTo(Writer* writer);
1912
1913 virtual ~BlockExpression();
1914
1915 DEFINE_CASTING_OPERATIONS(BlockExpression);
1916
1917 virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor);
1918 virtual void VisitChildren(Visitor* visitor);
1919
1920 Block* body() { return body_; }
1921 Expression* value() { return value_; }
1922
1923 private:
1924 BlockExpression() {}
1925
1926 Child<Block> body_;
1927 Child<Expression> value_;
1928
1929 DISALLOW_COPY_AND_ASSIGN(BlockExpression);
1930 };
1931
1932
1933 class Statement : public TreeNode { 1907 class Statement : public TreeNode {
1934 public: 1908 public:
1935 static Statement* ReadFrom(Reader* reader); 1909 static Statement* ReadFrom(Reader* reader);
1936 virtual void WriteTo(Writer* writer) = 0; 1910 virtual void WriteTo(Writer* writer) = 0;
1937 1911
1938 virtual ~Statement(); 1912 virtual ~Statement();
1939 1913
1940 DEFINE_CASTING_OPERATIONS(Statement); 1914 DEFINE_CASTING_OPERATIONS(Statement);
1941 1915
1942 virtual void AcceptTreeVisitor(TreeVisitor* visitor); 1916 virtual void AcceptTreeVisitor(TreeVisitor* visitor);
(...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after
2934 virtual void VisitDoubleLiteral(DoubleLiteral* node) { 2908 virtual void VisitDoubleLiteral(DoubleLiteral* node) {
2935 VisitDefaultBasicLiteral(node); 2909 VisitDefaultBasicLiteral(node);
2936 } 2910 }
2937 virtual void VisitBoolLiteral(BoolLiteral* node) { 2911 virtual void VisitBoolLiteral(BoolLiteral* node) {
2938 VisitDefaultBasicLiteral(node); 2912 VisitDefaultBasicLiteral(node);
2939 } 2913 }
2940 virtual void VisitNullLiteral(NullLiteral* node) { 2914 virtual void VisitNullLiteral(NullLiteral* node) {
2941 VisitDefaultBasicLiteral(node); 2915 VisitDefaultBasicLiteral(node);
2942 } 2916 }
2943 virtual void VisitLet(Let* node) { VisitDefaultExpression(node); } 2917 virtual void VisitLet(Let* node) { VisitDefaultExpression(node); }
2944 virtual void VisitBlockExpression(BlockExpression* node) {
2945 VisitDefaultExpression(node);
2946 }
2947 }; 2918 };
2948 2919
2949 2920
2950 class StatementVisitor { 2921 class StatementVisitor {
2951 public: 2922 public:
2952 virtual ~StatementVisitor() {} 2923 virtual ~StatementVisitor() {}
2953 2924
2954 virtual void VisitDefaultStatement(Statement* node) = 0; 2925 virtual void VisitDefaultStatement(Statement* node) = 0;
2955 virtual void VisitInvalidStatement(InvalidStatement* node) { 2926 virtual void VisitInvalidStatement(InvalidStatement* node) {
2956 VisitDefaultStatement(node); 2927 VisitDefaultStatement(node);
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
3267 }; 3238 };
3268 3239
3269 3240
3270 void WritePrecompiledKernel(ByteWriter* out, kernel::Program* program); 3241 void WritePrecompiledKernel(ByteWriter* out, kernel::Program* program);
3271 3242
3272 3243
3273 } // namespace dart 3244 } // namespace dart
3274 3245
3275 #endif // !defined(DART_PRECOMPILED_RUNTIME) 3246 #endif // !defined(DART_PRECOMPILED_RUNTIME)
3276 #endif // RUNTIME_VM_KERNEL_H_ 3247 #endif // RUNTIME_VM_KERNEL_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/kernel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698