| 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);
|
|
|