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

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

Issue 2360773003: More kernel_impact. (Closed)
Patch Set: Created 4 years, 3 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 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after
1204 @override 1204 @override
1205 ir.Expression visitClassTypeLiteralSet( 1205 ir.Expression visitClassTypeLiteralSet(
1206 SendSet node, ConstantExpression constant, Node rhs, _) { 1206 SendSet node, ConstantExpression constant, Node rhs, _) {
1207 return buildTypeLiteralSet(constant, rhs); 1207 return buildTypeLiteralSet(constant, rhs);
1208 } 1208 }
1209 1209
1210 @override 1210 @override
1211 ir.FunctionExpression visitClosureDeclaration(FunctionExpression node, 1211 ir.FunctionExpression visitClosureDeclaration(FunctionExpression node,
1212 LocalFunctionElement closure, NodeList parameters, Node body, _) { 1212 LocalFunctionElement closure, NodeList parameters, Node body, _) {
1213 return withCurrentElement(closure, () { 1213 return withCurrentElement(closure, () {
1214 return new ir.FunctionExpression(buildFunctionNode(closure, body)); 1214 ir.FunctionExpression function =
1215 new ir.FunctionExpression(buildFunctionNode(closure, body));
1216 kernel.localFunctions[closure] = function;
1217 return function;
1215 }); 1218 });
1216 } 1219 }
1217 1220
1218 @override 1221 @override
1219 ir.Expression visitCompoundIndexSet(SendSet node, Node receiver, Node index, 1222 ir.Expression visitCompoundIndexSet(SendSet node, Node receiver, Node index,
1220 AssignmentOperator operator, Node rhs, _) { 1223 AssignmentOperator operator, Node rhs, _) {
1221 return buildIndexAccessor(receiver, index).buildCompoundAssignment( 1224 return buildIndexAccessor(receiver, index).buildCompoundAssignment(
1222 kernel.irName(operator.selectorName, currentElement), 1225 kernel.irName(operator.selectorName, currentElement),
1223 visitForValue(rhs), 1226 visitForValue(rhs),
1224 voidContext: isVoidContext); 1227 voidContext: isVoidContext);
(...skipping 1539 matching lines...) Expand 10 before | Expand all | Expand 10 after
2764 : this(null, true, node, initializers); 2767 : this(null, true, node, initializers);
2765 2768
2766 accept(ir.Visitor v) => throw "unsupported"; 2769 accept(ir.Visitor v) => throw "unsupported";
2767 2770
2768 visitChildren(ir.Visitor v) => throw "unsupported"; 2771 visitChildren(ir.Visitor v) => throw "unsupported";
2769 2772
2770 String toString() { 2773 String toString() {
2771 return "IrFunction($kind, $isConstructor, $node, $initializers)"; 2774 return "IrFunction($kind, $isConstructor, $node, $initializers)";
2772 } 2775 }
2773 } 2776 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698