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

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

Issue 2569733002: Even less reliance on Compiler.closedWorld (Closed)
Patch Set: Updated cf. comments. Created 4 years 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/type_builder.dart ('k') | pkg/compiler/lib/src/ssa/types_propagation.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 f145affc93bb32f23f61662fa02e3e6f3181aba8..fdab0378aac66a38e9f1a0ca838a3a2a348f7d97 100644
--- a/pkg/compiler/lib/src/ssa/types.dart
+++ b/pkg/compiler/lib/src/ssa/types.dart
@@ -13,25 +13,25 @@ import '../world.dart' show ClosedWorld;
class TypeMaskFactory {
static TypeMask inferredReturnTypeForElement(
- Element element, Compiler compiler) {
- return compiler.globalInference.results.resultOf(element).returnType ??
- compiler.closedWorld.commonMasks.dynamicType;
+ Element element, GlobalTypeInferenceResults results) {
+ return results.resultOf(element).returnType ??
+ results.closedWorld.commonMasks.dynamicType;
}
- static TypeMask inferredTypeForElement(Element element, Compiler compiler) {
- return compiler.globalInference.results.resultOf(element).type ??
- compiler.closedWorld.commonMasks.dynamicType;
+ static TypeMask inferredTypeForElement(
+ Element element, GlobalTypeInferenceResults results) {
+ return results.resultOf(element).type ??
+ results.closedWorld.commonMasks.dynamicType;
}
static TypeMask inferredTypeForSelector(
- Selector selector, TypeMask mask, Compiler compiler) {
- return compiler.globalInference.results.typeOfSelector(selector, mask) ??
- compiler.closedWorld.commonMasks.dynamicType;
+ Selector selector, TypeMask mask, GlobalTypeInferenceResults results) {
+ return results.typeOfSelector(selector, mask) ??
+ results.closedWorld.commonMasks.dynamicType;
}
static TypeMask fromNativeBehavior(
- native.NativeBehavior nativeBehavior, Compiler compiler) {
- ClosedWorld closedWorld = compiler.closedWorld;
+ native.NativeBehavior nativeBehavior, ClosedWorld closedWorld) {
CommonMasks commonMasks = closedWorld.commonMasks;
var typesReturned = nativeBehavior.typesReturned;
if (typesReturned.isEmpty) return commonMasks.dynamicType;
« no previous file with comments | « pkg/compiler/lib/src/ssa/type_builder.dart ('k') | pkg/compiler/lib/src/ssa/types_propagation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698