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

Side by Side Diff: pkg/compiler/lib/src/kernel/kernel_visitor.dart

Issue 2638063003: Reverts the following two commits: (Closed)
Patch Set: 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
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.md file. 3 // BSD-style license that can be found in the LICENSE.md file.
4 4
5 import 'package:kernel/ast.dart' as ir; 5 import 'package:kernel/ast.dart' as ir;
6 import 'package:kernel/frontend/accessors.dart' 6 import 'package:kernel/frontend/accessors.dart'
7 show 7 show
8 Accessor, 8 Accessor,
9 IndexAccessor, 9 IndexAccessor,
10 NullAwarePropertyAccessor, 10 NullAwarePropertyAccessor,
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 DoWhile, 97 DoWhile,
98 DottedName, 98 DottedName,
99 EmptyStatement, 99 EmptyStatement,
100 Enum, 100 Enum,
101 Expression, 101 Expression,
102 ExpressionStatement, 102 ExpressionStatement,
103 For, 103 For,
104 ForIn, 104 ForIn,
105 FunctionDeclaration, 105 FunctionDeclaration,
106 FunctionExpression, 106 FunctionExpression,
107 FunctionTypeAnnotation,
108 Identifier, 107 Identifier,
109 If, 108 If,
110 Label, 109 Label,
111 LabeledStatement, 110 LabeledStatement,
112 LiteralBool, 111 LiteralBool,
113 LiteralDouble, 112 LiteralDouble,
114 LiteralInt, 113 LiteralInt,
115 LiteralList, 114 LiteralList,
116 LiteralMap, 115 LiteralMap,
117 LiteralMapEntry, 116 LiteralMapEntry,
118 LiteralNull, 117 LiteralNull,
119 LiteralString, 118 LiteralString,
120 LiteralSymbol, 119 LiteralSymbol,
121 Metadata, 120 Metadata,
122 NamedArgument, 121 NamedArgument,
123 NewExpression, 122 NewExpression,
124 Node, 123 Node,
125 NodeList, 124 NodeList,
126 NominalTypeAnnotation,
127 Operator, 125 Operator,
128 ParenthesizedExpression, 126 ParenthesizedExpression,
129 RedirectingFactoryBody, 127 RedirectingFactoryBody,
130 Rethrow, 128 Rethrow,
131 Return, 129 Return,
132 Send, 130 Send,
133 SendSet, 131 SendSet,
134 Statement, 132 Statement,
135 StringInterpolation, 133 StringInterpolation,
136 StringInterpolationPart, 134 StringInterpolationPart,
(...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after
1082 } 1080 }
1083 if (node.finallyBlock != null) { 1081 if (node.finallyBlock != null) {
1084 result = 1082 result =
1085 new ir.TryFinally(result, buildStatementInBlock(node.finallyBlock)); 1083 new ir.TryFinally(result, buildStatementInBlock(node.finallyBlock));
1086 } 1084 }
1087 return buildBreakTarget(result, node, elements.getTargetDefinition(node)); 1085 return buildBreakTarget(result, node, elements.getTargetDefinition(node));
1088 } 1086 }
1089 1087
1090 @override 1088 @override
1091 visitTypeAnnotation(TypeAnnotation node) { 1089 visitTypeAnnotation(TypeAnnotation node) {
1092 // Shouldn't be called, as the resolver has already resolved types and 1090 // Shouldn't be called, as the resolver have already resolved types and
1093 // created [DartType] objects. 1091 // created [DartType] objects.
1094 return internalError(node, "TypeAnnotation"); 1092 return internalError(node, "TypeAnnotation");
1095 } 1093 }
1096 1094
1097 @override 1095 @override
1098 visitNominalTypeAnnotation(NominalTypeAnnotation node) {
1099 // Shouldn't be called, as the resolver has already resolved types and
1100 // created [DartType] objects.
1101 return internalError(node, "NominalTypeAnnotation");
1102 }
1103
1104 @override
1105 visitFunctionTypeAnnotation(FunctionTypeAnnotation node) {
1106 // Shouldn't be called, as the resolver has already resolved types and
1107 // created [DartType] objects.
1108 return internalError(node, "FunctionTypeAnnotation");
1109 }
1110
1111 @override
1112 visitTypeVariable(TypeVariable node) { 1096 visitTypeVariable(TypeVariable node) {
1113 // Shouldn't be called, as the resolver has already resolved types and 1097 // Shouldn't be called, as the resolver have already resolved types and
1114 // created [DartType] objects. 1098 // created [DartType] objects.
1115 return internalError(node, "TypeVariable"); 1099 return internalError(node, "TypeVariable");
1116 } 1100 }
1117 1101
1118 @override 1102 @override
1119 ir.Statement visitWhile(While node) { 1103 ir.Statement visitWhile(While node) {
1120 ir.Expression condition = visitForValue(node.condition); 1104 ir.Expression condition = visitForValue(node.condition);
1121 JumpTarget jumpTarget = elements.getTargetDefinition(node); 1105 JumpTarget jumpTarget = elements.getTargetDefinition(node);
1122 ir.Statement body = 1106 ir.Statement body =
1123 buildContinueTarget(buildStatementInBlock(node.body), node, jumpTarget); 1107 buildContinueTarget(buildStatementInBlock(node.body), node, jumpTarget);
(...skipping 1748 matching lines...) Expand 10 before | Expand all | Expand 10 after
2872 : this(null, true, node, initializers); 2856 : this(null, true, node, initializers);
2873 2857
2874 accept(ir.Visitor v) => throw "unsupported"; 2858 accept(ir.Visitor v) => throw "unsupported";
2875 2859
2876 visitChildren(ir.Visitor v) => throw "unsupported"; 2860 visitChildren(ir.Visitor v) => throw "unsupported";
2877 2861
2878 String toString() { 2862 String toString() {
2879 return "IrFunction($kind, $isConstructor, $node, $initializers)"; 2863 return "IrFunction($kind, $isConstructor, $node, $initializers)";
2880 } 2864 }
2881 } 2865 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/no_such_method_registry.dart ('k') | pkg/compiler/lib/src/native/behavior.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698