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

Unified Diff: pkg/compiler/lib/src/ssa/types.dart

Issue 2308983002: Revert "Refactor how we read global-type-inference data from ssa" (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart ('k') | pkg/compiler/lib/src/types/types.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/types.dart
diff --git a/pkg/compiler/lib/src/ssa/types.dart b/pkg/compiler/lib/src/ssa/types.dart
index f43ca7eef6a36ead7004734be48203c328e9cd55..3722bf5c60a4c9549002c7f0700ebc1346e28239 100644
--- a/pkg/compiler/lib/src/ssa/types.dart
+++ b/pkg/compiler/lib/src/ssa/types.dart
@@ -14,18 +14,25 @@ import '../world.dart' show ClassWorld;
class TypeMaskFactory {
static TypeMask inferredReturnTypeForElement(
Element element, Compiler compiler) {
- return compiler.globalInference.results.returnTypeOf(element) ??
+ return compiler.globalInference.getGuaranteedReturnTypeOfElement(element) ??
compiler.commonMasks.dynamicType;
}
static TypeMask inferredTypeForElement(Element element, Compiler compiler) {
- return compiler.globalInference.results.typeOf(element) ??
+ return compiler.globalInference.getGuaranteedTypeOfElement(element) ??
compiler.commonMasks.dynamicType;
}
static TypeMask inferredTypeForSelector(
Selector selector, TypeMask mask, Compiler compiler) {
- return compiler.globalInference.results.typeOfSelector(selector, mask) ??
+ return compiler.globalInference
+ .getGuaranteedTypeOfSelector(selector, mask) ??
+ compiler.commonMasks.dynamicType;
+ }
+
+ static TypeMask inferredForNode(
+ Element owner, ast.Node node, Compiler compiler) {
+ return compiler.globalInference.getGuaranteedTypeOfNode(owner, node) ??
compiler.commonMasks.dynamicType;
}
« no previous file with comments | « pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart ('k') | pkg/compiler/lib/src/types/types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698