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

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

Issue 24282005: Move compile-time constant registrations to the backend. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status Created 7 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 | « tests/co19/co19-runtime.status ('k') | tests/compiler/dart2js/mock_compiler.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/mirrors_used_test.dart
diff --git a/tests/compiler/dart2js/mirrors_used_test.dart b/tests/compiler/dart2js/mirrors_used_test.dart
index 065da5191a7dedd2d97b18d849fe716bc9fcda68..1f259369a5d544be299916c26a1cbf440ed7b7e2 100644
--- a/tests/compiler/dart2js/mirrors_used_test.dart
+++ b/tests/compiler/dart2js/mirrors_used_test.dart
@@ -92,20 +92,14 @@ void main() {
});
}
- // There should at least be three metadata constants:
- // 1. The type literal 'Foo'.
- // 2. The list 'const [Foo]'.
- // 3. The constructed constant for 'MirrorsUsed'.
- Expect.isTrue(compiler.metadataHandler.compiledConstants.length >= 3);
+ // There should at least be one metadata constant:
+ // 1. The constructed constant for 'MirrorsUsed'.
+ Expect.isTrue(compiler.backend.metadataConstants.length >= 1);
// Make sure that most of the metadata constants aren't included in the
// generated code.
- for (Constant constant in compiler.metadataHandler.compiledConstants) {
- if (constant is TypeConstant && '${constant.representedType}' == 'Foo') {
- // The type literal 'Foo' is retained as a constant because it is being
- // passed to reflectClass.
- continue;
- }
+ for (var dependency in compiler.backend.metadataConstants) {
+ Constant constant = dependency.constant;
Expect.isFalse(
compiler.constantHandler.compiledConstants.contains(constant),
'$constant');
@@ -114,7 +108,7 @@ void main() {
// The type literal 'Foo' is both used as metadata, and as a plain value in
// the program. Make sure that it isn't duplicated.
int fooConstantCount = 0;
- for (Constant constant in compiler.metadataHandler.compiledConstants) {
+ for (Constant constant in compiler.constantHandler.compiledConstants) {
if (constant is TypeConstant && '${constant.representedType}' == 'Foo') {
fooConstantCount++;
}
« no previous file with comments | « tests/co19/co19-runtime.status ('k') | tests/compiler/dart2js/mock_compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698