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

Unified Diff: pkg/compiler/lib/src/common_elements.dart

Issue 2810633003: Add kernel/closed_world2_test (Closed)
Patch Set: Add TODOs. Created 3 years, 8 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: pkg/compiler/lib/src/common_elements.dart
diff --git a/pkg/compiler/lib/src/common_elements.dart b/pkg/compiler/lib/src/common_elements.dart
index 3a5d5d3d4f54db4d1ee39a9a61482ff90aecd5ac..b5af19e42c4fb506617193350b41d71ff6cef49a 100644
--- a/pkg/compiler/lib/src/common_elements.dart
+++ b/pkg/compiler/lib/src/common_elements.dart
@@ -221,6 +221,9 @@ abstract class ElementEnvironment {
/// Returns the main method for the compilation.
FunctionEntity get mainFunction;
+ /// Returns all known libraries.
+ Iterable<LibraryEntity> get libraries;
+
/// Lookup the library with the canonical [uri], fail if the library is
/// missing and [required];
LibraryEntity lookupLibrary(Uri uri, {bool required: false});
@@ -426,7 +429,10 @@ class CommonElementsImpl implements CommonElements {
ConstructorEntity _symbolConstructor;
ConstructorEntity get symbolConstructor =>
- _symbolConstructor ??= findConstructor(symbolClass, '');
+ // TODO(johnniwinther): Kernel does not include redirecting factories
+ // so this cannot be found in kernel. Find a consistent way to handle
+ // this and similar cases.
+ _symbolConstructor ??= findConstructor(symbolClass, '', required: false);
bool isSymbolConstructor(Entity e) => e == symbolConstructor;

Powered by Google App Engine
This is Rietveld 408576698