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

Unified Diff: pkg/compiler/lib/src/ssa/kernel_impact.dart

Issue 2896393003: Remove factory body in *.fromEnvironment, and implement this same behavior (Closed)
Patch Set: turn warning into a hint Created 3 years, 7 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/ssa/builder_kernel.dart ('k') | pkg/compiler/lib/src/universe/feature.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/kernel_impact.dart
diff --git a/pkg/compiler/lib/src/ssa/kernel_impact.dart b/pkg/compiler/lib/src/ssa/kernel_impact.dart
index de794a45e69829088c7af774f79a8663cf0a76ac..6fa759ed7c59284a86b9d1dd3efc8d19077e0f7d 100644
--- a/pkg/compiler/lib/src/ssa/kernel_impact.dart
+++ b/pkg/compiler/lib/src/ssa/kernel_impact.dart
@@ -276,6 +276,14 @@ class KernelImpactBuilder extends ir.Visitor {
if (commonElements.isSymbolConstructor(constructor)) {
impactBuilder.registerFeature(Feature.SYMBOL_CONSTRUCTOR);
}
+
+ if (target.isExternal &&
+ constructor.isFromEnvironmentConstructor &&
+ !isConst) {
+ impactBuilder.registerFeature(Feature.THROW_UNSUPPORTED_ERROR);
+ return;
+ }
+
InterfaceType type = elementAdapter.createInterfaceType(
target.enclosingClass, node.arguments.types);
CallStructure callStructure =
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder_kernel.dart ('k') | pkg/compiler/lib/src/universe/feature.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698