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

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

Issue 2811993006: dart2js: type analysis: yield escapes its argument (Closed)
Patch Set: comment Created 3 years, 8 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/inferrer/inferrer_engine.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 2271 matching lines...) Expand 10 before | Expand all | Expand 10 after
2282 } 2282 }
2283 } 2283 }
2284 return null; 2284 return null;
2285 } 2285 }
2286 2286
2287 TypeInformation visitAwait(ast.Await node) { 2287 TypeInformation visitAwait(ast.Await node) {
2288 TypeInformation futureType = node.expression.accept(this); 2288 TypeInformation futureType = node.expression.accept(this);
2289 return inferrer.registerAwait(node, futureType); 2289 return inferrer.registerAwait(node, futureType);
2290 } 2290 }
2291 2291
2292 TypeInformation visitYield(ast.Yield node) {
2293 TypeInformation operandType = node.expression.accept(this);
2294 return inferrer.registerYield(node, operandType);
2295 }
2296
2292 TypeInformation handleTypeLiteralInvoke(ast.NodeList arguments) { 2297 TypeInformation handleTypeLiteralInvoke(ast.NodeList arguments) {
2293 // This is reached when users forget to put a `new` in front of a type 2298 // This is reached when users forget to put a `new` in front of a type
2294 // literal. The emitter will generate an actual call (even though it is 2299 // literal. The emitter will generate an actual call (even though it is
2295 // likely invalid), and for that it needs to have the arguments processed 2300 // likely invalid), and for that it needs to have the arguments processed
2296 // as well. 2301 // as well.
2297 analyzeArguments(arguments.nodes); 2302 analyzeArguments(arguments.nodes);
2298 return types.dynamicType; 2303 return types.dynamicType;
2299 } 2304 }
2300 2305
2301 /// Handle constructor invocation of [constructor]. 2306 /// Handle constructor invocation of [constructor].
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
2942 Selector moveNextSelector = Selectors.moveNext; 2947 Selector moveNextSelector = Selectors.moveNext;
2943 TypeMask moveNextMask = inTreeData.typeOfIteratorMoveNext(node); 2948 TypeMask moveNextMask = inTreeData.typeOfIteratorMoveNext(node);
2944 2949
2945 TypeInformation iteratorType = handleDynamicSend(node, iteratorSelector, 2950 TypeInformation iteratorType = handleDynamicSend(node, iteratorSelector,
2946 iteratorMask, expressionType, new ArgumentsTypes.empty()); 2951 iteratorMask, expressionType, new ArgumentsTypes.empty());
2947 2952
2948 return handleForInLoop(node, iteratorType, currentSelector, currentMask, 2953 return handleForInLoop(node, iteratorType, currentSelector, currentMask,
2949 moveNextSelector, moveNextMask); 2954 moveNextSelector, moveNextMask);
2950 } 2955 }
2951 } 2956 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/inferrer/inferrer_engine.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698