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

Side by Side Diff: pkg/compiler/lib/src/ssa/builder_kernel.dart

Issue 2984263002: Make the ClosedWorld build the closure class on the kernel side. (Closed)
Patch Set: . Created 3 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
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 import 'package:kernel/ast.dart' as ir; 5 import 'package:kernel/ast.dart' as ir;
6 6
7 import '../closure.dart'; 7 import '../closure.dart';
8 import '../common.dart'; 8 import '../common.dart';
9 import '../common/codegen.dart' show CodegenRegistry; 9 import '../common/codegen.dart' show CodegenRegistry;
10 import '../common/names.dart'; 10 import '../common/names.dart';
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 case MemberKind.constructor: 163 case MemberKind.constructor:
164 ir.Constructor constructor = definition.node; 164 ir.Constructor constructor = definition.node;
165 _targetFunction = constructor.function; 165 _targetFunction = constructor.function;
166 buildConstructor(constructor); 166 buildConstructor(constructor);
167 break; 167 break;
168 case MemberKind.constructorBody: 168 case MemberKind.constructorBody:
169 ir.Constructor constructor = definition.node; 169 ir.Constructor constructor = definition.node;
170 _targetFunction = constructor.function; 170 _targetFunction = constructor.function;
171 buildConstructorBody(constructor); 171 buildConstructorBody(constructor);
172 break; 172 break;
173 case MemberKind.closureField:
174 failedAt(targetElement, "Unexpected closure field: $targetElement");
175 break;
173 } 176 }
174 assert(graph.isValid()); 177 assert(graph.isValid());
175 if (_targetFunction != null) { 178 if (_targetFunction != null) {
176 _ensureDefaultArgumentValues(_targetFunction); 179 _ensureDefaultArgumentValues(_targetFunction);
177 } 180 }
178 return graph; 181 return graph;
179 }); 182 });
180 } 183 }
181 184
182 void _ensureDefaultArgumentValues(ir.FunctionNode function) { 185 void _ensureDefaultArgumentValues(ir.FunctionNode function) {
(...skipping 3470 matching lines...) Expand 10 before | Expand all | Expand 10 after
3653 enterBlock.setBlockFlow( 3656 enterBlock.setBlockFlow(
3654 new HTryBlockInformation( 3657 new HTryBlockInformation(
3655 kernelBuilder.wrapStatementGraph(bodyGraph), 3658 kernelBuilder.wrapStatementGraph(bodyGraph),
3656 exception, 3659 exception,
3657 kernelBuilder.wrapStatementGraph(catchGraph), 3660 kernelBuilder.wrapStatementGraph(catchGraph),
3658 kernelBuilder.wrapStatementGraph(finallyGraph)), 3661 kernelBuilder.wrapStatementGraph(finallyGraph)),
3659 exitBlock); 3662 exitBlock);
3660 kernelBuilder.inTryStatement = previouslyInTryStatement; 3663 kernelBuilder.inTryStatement = previouslyInTryStatement;
3661 } 3664 }
3662 } 3665 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/kernel/element_map_impl.dart ('k') | tests/compiler/dart2js_extra/dart2js_extra.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698