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

Unified Diff: tests/compiler/dart2js/list_tracer_typed_data_length_test.dart

Issue 2577423002: Further reduce use of Compiler.closedWorld. (Closed)
Patch Set: 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 | « tests/compiler/dart2js/list_tracer_test.dart ('k') | tests/compiler/dart2js/map_tracer_const_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/list_tracer_typed_data_length_test.dart
diff --git a/tests/compiler/dart2js/list_tracer_typed_data_length_test.dart b/tests/compiler/dart2js/list_tracer_typed_data_length_test.dart
index ee15963d791d18b93c47974da6f083f887b1bbbf..59ede2bb3f67e48586a65c3388f8072d00686792 100644
--- a/tests/compiler/dart2js/list_tracer_typed_data_length_test.dart
+++ b/tests/compiler/dart2js/list_tracer_typed_data_length_test.dart
@@ -6,6 +6,7 @@ import 'package:expect/expect.dart';
import 'package:async_helper/async_helper.dart';
import 'package:compiler/src/types/types.dart' show ContainerTypeMask, TypeMask;
import 'package:compiler/src/compiler.dart';
+import 'package:compiler/src/world.dart' show ClosedWorld;
import 'memory_compiler.dart';
import 'compiler_helper.dart' show findElement;
@@ -30,17 +31,18 @@ void main() {
CompilationResult result = await runCompiler(memorySourceFiles: TEST);
Compiler compiler = result.compiler;
var typesInferrer = compiler.globalInference.typesInferrerInternal;
+ ClosedWorld closedWorld = typesInferrer.closedWorld;
checkType(String name, type, length) {
var element = findElement(compiler, name);
TypeMask mask = typesInferrer.getTypeOfElement(element);
Expect.isTrue(mask.isContainer);
ContainerTypeMask container = mask;
- Expect.equals(type, simplify(container.elementType, compiler), name);
+ Expect.equals(type, simplify(container.elementType, closedWorld), name);
Expect.equals(container.length, length);
}
- checkType('myList', compiler.closedWorld.commonMasks.numType, 42);
- checkType('myOtherList', compiler.closedWorld.commonMasks.uint31Type, 32);
+ checkType('myList', closedWorld.commonMasks.numType, 42);
+ checkType('myOtherList', closedWorld.commonMasks.uint31Type, 32);
});
}
« no previous file with comments | « tests/compiler/dart2js/list_tracer_test.dart ('k') | tests/compiler/dart2js/map_tracer_const_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698