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

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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 128
129 HGraph build() { 129 HGraph build() {
130 return reporter.withCurrentElement(localsMap.currentMember, () { 130 return reporter.withCurrentElement(localsMap.currentMember, () {
131 // TODO(het): no reason to do this here... 131 // TODO(het): no reason to do this here...
132 HInstruction.idCounter = 0; 132 HInstruction.idCounter = 0;
133 MemberDefinition definition = 133 MemberDefinition definition =
134 _elementMap.getMemberDefinition(targetElement); 134 _elementMap.getMemberDefinition(targetElement);
135 135
136 switch (definition.kind) { 136 switch (definition.kind) {
137 case MemberKind.regular: 137 case MemberKind.regular:
138 case MemberKind.closureField:
138 case MemberKind.closureCall: 139 case MemberKind.closureCall:
139 ir.Node target = definition.node; 140 ir.Node target = definition.node;
140 if (target is ir.Procedure) { 141 if (target is ir.Procedure) {
141 _targetFunction = target.function; 142 _targetFunction = target.function;
142 buildFunctionNode(_targetFunction); 143 buildFunctionNode(_targetFunction);
143 } else if (target is ir.Field) { 144 } else if (target is ir.Field) {
144 if (handleConstantField(targetElement, registry, closedWorld)) { 145 if (handleConstantField(targetElement, registry, closedWorld)) {
145 // No code is generated for `targetElement`: All references inline 146 // No code is generated for `targetElement`: All references inline
146 // the constant value. 147 // the constant value.
147 return null; 148 return null;
(...skipping 3505 matching lines...) Expand 10 before | Expand all | Expand 10 after
3653 enterBlock.setBlockFlow( 3654 enterBlock.setBlockFlow(
3654 new HTryBlockInformation( 3655 new HTryBlockInformation(
3655 kernelBuilder.wrapStatementGraph(bodyGraph), 3656 kernelBuilder.wrapStatementGraph(bodyGraph),
3656 exception, 3657 exception,
3657 kernelBuilder.wrapStatementGraph(catchGraph), 3658 kernelBuilder.wrapStatementGraph(catchGraph),
3658 kernelBuilder.wrapStatementGraph(finallyGraph)), 3659 kernelBuilder.wrapStatementGraph(finallyGraph)),
3659 exitBlock); 3660 exitBlock);
3660 kernelBuilder.inTryStatement = previouslyInTryStatement; 3661 kernelBuilder.inTryStatement = previouslyInTryStatement;
3661 } 3662 }
3662 } 3663 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698