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

Unified Diff: pkg/compiler/lib/src/kernel/element_map_impl.dart

Issue 2931153002: Support field initializers and static/top-level fields in compile_with_dill_test (Closed)
Patch Set: Created 3 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
« no previous file with comments | « pkg/compiler/lib/src/kernel/element_map.dart ('k') | pkg/compiler/lib/src/ssa/builder_kernel.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/kernel/element_map_impl.dart
diff --git a/pkg/compiler/lib/src/kernel/element_map_impl.dart b/pkg/compiler/lib/src/kernel/element_map_impl.dart
index 259fe5ea36b5c8943bc70969a018fce2a8c4de7b..7a29d03b2f46b094cf3dfd842cd14270c79edbb6 100644
--- a/pkg/compiler/lib/src/kernel/element_map_impl.dart
+++ b/pkg/compiler/lib/src/kernel/element_map_impl.dart
@@ -139,6 +139,11 @@ class KernelToElementMapImpl extends KernelToElementMapMixin {
return _constantEnvironment.getConstantValue(constant);
}
+ @override
+ ConstantValue getFieldConstantValue(ir.Field field) {
+ return getConstantValue(field.initializer, requireConstant: field.isConst);
+ }
+
LibraryEntity lookupLibrary(Uri uri) {
_KLibraryEnv libraryEnv = _env.lookupLibrary(uri);
if (libraryEnv == null) return null;
« no previous file with comments | « pkg/compiler/lib/src/kernel/element_map.dart ('k') | pkg/compiler/lib/src/ssa/builder_kernel.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698