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

Side by Side Diff: pkg/compiler/lib/src/inferrer/builder.dart

Issue 2656583003: Add inference test functionality based on code point id. (Closed)
Patch Set: Updated cf. comments Created 3 years, 10 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 | « no previous file | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 library simple_types_inferrer; 5 library simple_types_inferrer;
6 6
7 import '../closure.dart' show ClosureClassMap; 7 import '../closure.dart' show ClosureClassMap;
8 import '../common.dart'; 8 import '../common.dart';
9 import '../common/names.dart' show Identifiers, Selectors; 9 import '../common/names.dart' show Identifiers, Selectors;
10 import '../compiler.dart' show Compiler; 10 import '../compiler.dart' show Compiler;
(...skipping 2868 matching lines...) Expand 10 before | Expand all | Expand 10 after
2879 2879
2880 if (node.expression.isThis()) { 2880 if (node.expression.isThis()) {
2881 // Any reasonable implementation of an iterator would expose 2881 // Any reasonable implementation of an iterator would expose
2882 // this, so we play it safe and assume it will. 2882 // this, so we play it safe and assume it will.
2883 isThisExposed = true; 2883 isThisExposed = true;
2884 } 2884 }
2885 2885
2886 ast.Node identifier = node.declaredIdentifier; 2886 ast.Node identifier = node.declaredIdentifier;
2887 Element element = elements.getForInVariable(node); 2887 Element element = elements.getForInVariable(node);
2888 Selector selector = elements.getSelector(identifier); 2888 Selector selector = elements.getSelector(identifier);
2889 TypeMask mask = inTreeData.typeOfSend(identifier); 2889 TypeMask mask = inTreeData.typeOfSend(identifier.asSend());
2890 2890
2891 TypeInformation receiverType; 2891 TypeInformation receiverType;
2892 if (element != null && element.isInstanceMember) { 2892 if (element != null && element.isInstanceMember) {
2893 receiverType = thisType; 2893 receiverType = thisType;
2894 } else { 2894 } else {
2895 receiverType = types.dynamicType; 2895 receiverType = types.dynamicType;
2896 } 2896 }
2897 2897
2898 handlePlainAssignment(identifier, element, selector, mask, receiverType, 2898 handlePlainAssignment(identifier, element, selector, mask, receiverType,
2899 currentType, node.expression); 2899 currentType, node.expression);
(...skipping 30 matching lines...) Expand all
2930 Selector moveNextSelector = Selectors.moveNext; 2930 Selector moveNextSelector = Selectors.moveNext;
2931 TypeMask moveNextMask = inTreeData.typeOfIteratorMoveNext(node); 2931 TypeMask moveNextMask = inTreeData.typeOfIteratorMoveNext(node);
2932 2932
2933 TypeInformation iteratorType = handleDynamicSend(node, iteratorSelector, 2933 TypeInformation iteratorType = handleDynamicSend(node, iteratorSelector,
2934 iteratorMask, expressionType, new ArgumentsTypes.empty()); 2934 iteratorMask, expressionType, new ArgumentsTypes.empty());
2935 2935
2936 return handleForInLoop(node, iteratorType, currentSelector, currentMask, 2936 return handleForInLoop(node, iteratorType, currentSelector, currentMask,
2937 moveNextSelector, moveNextMask); 2937 moveNextSelector, moveNextMask);
2938 } 2938 }
2939 } 2939 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/types/types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698