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

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

Issue 2488353004: Remove Compiler access from ResolutionEnqueuer (Closed)
Patch Set: Updated cf. comments. Created 4 years, 1 month 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 | « pkg/compiler/lib/src/ssa/builder.dart ('k') | pkg/compiler/lib/src/ssa/types.dart » ('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 import 'package:kernel/ast.dart' as ir; 5 import 'package:kernel/ast.dart' as ir;
6 6
7 import '../constants/expressions.dart'; 7 import '../constants/expressions.dart';
8 import '../common.dart'; 8 import '../common.dart';
9 import '../common/names.dart'; 9 import '../common/names.dart';
10 import '../compiler.dart'; 10 import '../compiler.dart';
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 return _inferenceResults.typeOfSend(getNode(getter), elements); 170 return _inferenceResults.typeOfSend(getNode(getter), elements);
171 } 171 }
172 172
173 TypeMask typeOfSend(ir.Expression send) { 173 TypeMask typeOfSend(ir.Expression send) {
174 assert(send is ir.InvocationExpression || send is ir.PropertyGet); 174 assert(send is ir.InvocationExpression || send is ir.PropertyGet);
175 return _inferenceResults.typeOfSend(getNode(send), elements); 175 return _inferenceResults.typeOfSend(getNode(send), elements);
176 } 176 }
177 177
178 TypeMask typeOfNewList(Element owner, ir.ListLiteral listLiteral) { 178 TypeMask typeOfNewList(Element owner, ir.ListLiteral listLiteral) {
179 return _inferenceResults.typeOfNewList(owner, getNode(listLiteral)) ?? 179 return _inferenceResults.typeOfNewList(owner, getNode(listLiteral)) ??
180 _compiler.commonMasks.dynamicType; 180 _compiler.closedWorld.commonMasks.dynamicType;
181 } 181 }
182 182
183 TypeMask typeOfIterator(ir.ForInStatement forInStatement) { 183 TypeMask typeOfIterator(ir.ForInStatement forInStatement) {
184 return _inferenceResults.typeOfIterator(getNode(forInStatement), elements); 184 return _inferenceResults.typeOfIterator(getNode(forInStatement), elements);
185 } 185 }
186 186
187 TypeMask typeOfIteratorCurrent(ir.ForInStatement forInStatement) { 187 TypeMask typeOfIteratorCurrent(ir.ForInStatement forInStatement) {
188 return _inferenceResults.typeOfIteratorCurrent( 188 return _inferenceResults.typeOfIteratorCurrent(
189 getNode(forInStatement), elements); 189 getNode(forInStatement), elements);
190 } 190 }
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 astAdapter.reporter.internalError( 666 astAdapter.reporter.internalError(
667 CURRENT_ELEMENT_SPANNABLE, "Unexpected constant target: $element."); 667 CURRENT_ELEMENT_SPANNABLE, "Unexpected constant target: $element.");
668 return null; 668 return null;
669 } 669 }
670 670
671 @override 671 @override
672 ConstantExpression visitStringLiteral(ir.StringLiteral node) { 672 ConstantExpression visitStringLiteral(ir.StringLiteral node) {
673 return new StringConstantExpression(node.value); 673 return new StringConstantExpression(node.value);
674 } 674 }
675 } 675 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | pkg/compiler/lib/src/ssa/types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698