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

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

Issue 852983002: Error recovery broke host checked mode, fix it. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 5 years, 11 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 | « dart/pkg/compiler/lib/src/resolution/members.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/pkg/compiler/lib/src/ssa/builder.dart
diff --git a/dart/pkg/compiler/lib/src/ssa/builder.dart b/dart/pkg/compiler/lib/src/ssa/builder.dart
index 3e7d7f8f7dea348fc4c7505706593f56549e1c97..07ee0c0bceeadbd2743adbc7661bb7b97a1ce0a7 100644
--- a/dart/pkg/compiler/lib/src/ssa/builder.dart
+++ b/dart/pkg/compiler/lib/src/ssa/builder.dart
@@ -2027,7 +2027,8 @@ class SsaBuilder extends ResolvedVisitor {
if (value == null) {
// Uninitialized native fields are pre-initialized by the native
// implementation.
- assert(isNativeUpgradeFactory);
+ assert(invariant(
+ member, isNativeUpgradeFactory || compiler.compilationFailed));
} else {
fields.add(member);
DartType type = localsHandler.substInContext(member.type);
@@ -3273,12 +3274,17 @@ class SsaBuilder extends ResolvedVisitor {
}
stack.add(value);
} else if (Elements.isErroneousElement(element)) {
- List<HInstruction> arguments =
- send == null ? const <HInstruction>[] : <HInstruction>[value];
- // An erroneous element indicates an unresolved static setter.
- generateThrowNoSuchMethod(location,
- noSuchMethodTargetSymbolString(element, 'set'),
- argumentValues: arguments);
+ if (element is ErroneousElement) {
+ List<HInstruction> arguments =
+ send == null ? const <HInstruction>[] : <HInstruction>[value];
+ // An erroneous element indicates an unresolved static setter.
+ generateThrowNoSuchMethod(
+ location, noSuchMethodTargetSymbolString(element, 'set'),
+ argumentValues: arguments);
+ } else {
+ // TODO(ahe): Do something like [generateWrongArgumentCountError].
+ stack.add(graph.addConstantNull(compiler));
+ }
} else {
stack.add(value);
LocalElement local = element;
@@ -4489,11 +4495,16 @@ class SsaBuilder extends ResolvedVisitor {
return;
}
if (element.isErroneous) {
- // An erroneous element indicates that the funciton could not be resolved
- // (a warning has been issued).
- generateThrowNoSuchMethod(node,
- noSuchMethodTargetSymbolString(element),
- argumentNodes: node.arguments);
+ if (element is ErroneousElement) {
+ // An erroneous element indicates that the funciton could not be
+ // resolved (a warning has been issued).
+ generateThrowNoSuchMethod(node,
+ noSuchMethodTargetSymbolString(element),
+ argumentNodes: node.arguments);
+ } else {
+ // TODO(ahe): Do something like [generateWrongArgumentCountError].
+ stack.add(graph.addConstantNull(compiler));
+ }
return;
}
invariant(element, !element.isGenerativeConstructor);
« no previous file with comments | « dart/pkg/compiler/lib/src/resolution/members.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698