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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/types.dart

Issue 12385076: Infer types of catpured variables and use the types in the SSA builder. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/compiler/implementation/ssa/types.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/types.dart (revision 19427)
+++ sdk/lib/_internal/compiler/implementation/ssa/types.dart (working copy)
@@ -108,14 +108,20 @@
return ssaType;
}
- factory HType.inferredForElement(Element element, Compiler compiler) {
+ factory HType.inferredReturnTypeForElement(
+ Element element, Compiler compiler) {
return new HType.fromInferredType(
+ compiler.typesTask.getGuaranteedReturnTypeOfElement(element),
+ compiler);
+ }
+
+ factory HType.inferredTypeForElement(Element element, Compiler compiler) {
+ return new HType.fromInferredType(
compiler.typesTask.getGuaranteedTypeOfElement(element),
compiler);
}
- factory HType.inferredForNode(
- Element owner, Node node, Compiler compiler) {
+ factory HType.inferredForNode(Element owner, Node node, Compiler compiler) {
return new HType.fromInferredType(
compiler.typesTask.getGuaranteedTypeOfNode(owner, node),
compiler);

Powered by Google App Engine
This is Rietveld 408576698