| Index: dart/sdk/lib/_internal/compiler/implementation/js_backend/native_emitter.dart
|
| diff --git a/dart/sdk/lib/_internal/compiler/implementation/js_backend/native_emitter.dart b/dart/sdk/lib/_internal/compiler/implementation/js_backend/native_emitter.dart
|
| index 0a73d165a561a3f99a94fc629e14d220b0784d42..dd22b9a343a1476358e5a841505668c962984c78 100644
|
| --- a/dart/sdk/lib/_internal/compiler/implementation/js_backend/native_emitter.dart
|
| +++ b/dart/sdk/lib/_internal/compiler/implementation/js_backend/native_emitter.dart
|
| @@ -399,13 +399,13 @@ function(cls, desc) {
|
| } else {
|
| // [subclass] is one of the preorderDispatchClasses, so CSE this
|
| // reference with the previous reference.
|
| - if (existing is js.VariableUse &&
|
| - varDefns.containsKey(existing.name)) {
|
| + js.VariableUse use = existing.asVariableUse();
|
| + if (use != null && varDefns.containsKey(use.name)) {
|
| // We end up here if the subclasses have a DAG structure. We
|
| // don't have DAGs yet, but if the dispatch is used for mixins
|
| // that will be a possibility.
|
| // Re-use the previously created temporary variable.
|
| - expressions.add(new js.VariableUse(existing.name));
|
| + expressions.add(new js.VariableUse(use.name));
|
| } else {
|
| String varName = 'v${varNames.length}_${tag.name.slowToString()}';
|
| varNames.add(varName);
|
|
|