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

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

Issue 2070493003: Revert "Remove Registry from registerMetadataConstant" and "Serialize metadata" (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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: 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 fc08b6b82f9fb6e254c5f212c87736ba0b5e1f05..dffab8af88acd6885003a9e98d2c5f07a70efa44 100644
--- a/tests/compiler/dart2js/mirrors_used_test.dart
+++ b/tests/compiler/dart2js/mirrors_used_test.dart
@@ -127,22 +127,18 @@ void main() {
});
}
- int metadataCount = 0;
+ // There should at least be one metadata constant:
+ // 1. The constructed constant for 'MirrorsUsed'.
+ Expect.isTrue(backend.metadataConstants.length >= 1);
+
Set<ConstantValue> compiledConstants = backend.constants.compiledConstants;
// Make sure that most of the metadata constants aren't included in the
// generated code.
- backend.processMetadata(
- compiler.enqueuer.resolution.processedElements, (metadata) {
- ConstantValue constant =
- backend.constants.getConstantValueForMetadata(metadata);
+ for (var dependency in backend.metadataConstants) {
+ ConstantValue constant = dependency.constant;
Expect.isFalse(compiledConstants.contains(constant),
constant.toStructuredText());
- metadataCount++;
- });
-
- // There should at least be one metadata constant:
- // 1. The constructed constant for 'MirrorsUsed'.
- Expect.isTrue(metadataCount >= 1);
+ }
// The type literal 'Foo' is both used as metadata, and as a plain value in
// the program. Make sure that it isn't duplicated.
« no previous file with comments | « pkg/compiler/lib/src/types/constants.dart ('k') | tests/compiler/dart2js/serialization/equivalence_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698