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

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

Issue 2653633002: Further improve precision of the type of node that hold type inference data. (Closed)
Patch Set: dartfmt 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
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | pkg/compiler/lib/src/types/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:js_runtime/shared/embedded_names.dart'; 5 import 'package:js_runtime/shared/embedded_names.dart';
6 import 'package:kernel/ast.dart' as ir; 6 import 'package:kernel/ast.dart' as ir;
7 7
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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 return _resultOf(_target).typeOfSend(getNode(send)); 261 return _resultOf(_target).typeOfSend(getNode(send));
262 } 262 }
263 263
264 TypeMask typeOfListLiteral( 264 TypeMask typeOfListLiteral(
265 Element owner, ir.ListLiteral listLiteral, ClosedWorld closedWorld) { 265 Element owner, ir.ListLiteral listLiteral, ClosedWorld closedWorld) {
266 ast.Node node = getNodeOrNull(listLiteral); 266 ast.Node node = getNodeOrNull(listLiteral);
267 if (node == null) { 267 if (node == null) {
268 assertNodeIsSynthetic(listLiteral); 268 assertNodeIsSynthetic(listLiteral);
269 return closedWorld.commonMasks.growableListType; 269 return closedWorld.commonMasks.growableListType;
270 } 270 }
271 return _resultOf(owner).typeOfNewList(getNode(listLiteral)) ?? 271 return _resultOf(owner).typeOfListLiteral(getNode(listLiteral)) ??
272 closedWorld.commonMasks.dynamicType; 272 closedWorld.commonMasks.dynamicType;
273 } 273 }
274 274
275 TypeMask typeOfIterator(ir.ForInStatement forInStatement) { 275 TypeMask typeOfIterator(ir.ForInStatement forInStatement) {
276 return _resultOf(_target).typeOfIterator(getNode(forInStatement)); 276 return _resultOf(_target).typeOfIterator(getNode(forInStatement));
277 } 277 }
278 278
279 TypeMask typeOfIteratorCurrent(ir.ForInStatement forInStatement) { 279 TypeMask typeOfIteratorCurrent(ir.ForInStatement forInStatement) {
280 return _resultOf(_target).typeOfIteratorCurrent(getNode(forInStatement)); 280 return _resultOf(_target).typeOfIteratorCurrent(getNode(forInStatement));
281 } 281 }
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after
1098 JumpTarget continueTarget = 1098 JumpTarget continueTarget =
1099 astAdapter.getJumpTarget(switchCase, isContinueTarget: true); 1099 astAdapter.getJumpTarget(switchCase, isContinueTarget: true);
1100 assert(continueTarget is KernelJumpTarget); 1100 assert(continueTarget is KernelJumpTarget);
1101 targetIndexMap[continueTarget] = switchIndex; 1101 targetIndexMap[continueTarget] = switchIndex;
1102 assert(builder.jumpTargets[continueTarget] == null); 1102 assert(builder.jumpTargets[continueTarget] == null);
1103 builder.jumpTargets[continueTarget] = this; 1103 builder.jumpTargets[continueTarget] = this;
1104 switchIndex++; 1104 switchIndex++;
1105 } 1105 }
1106 } 1106 }
1107 } 1107 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | pkg/compiler/lib/src/types/types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698