Chromium Code Reviews| Index: pkg/compiler/lib/src/js_backend/field_naming_mixin.dart |
| diff --git a/pkg/compiler/lib/src/js_backend/field_naming_mixin.dart b/pkg/compiler/lib/src/js_backend/field_naming_mixin.dart |
| index 61383b92f79061dd0ec85957a729acfad1abe8e6..707e7e7636929fe89ff84514e6d5a3e390f5bd20 100644 |
| --- a/pkg/compiler/lib/src/js_backend/field_naming_mixin.dart |
| +++ b/pkg/compiler/lib/src/js_backend/field_naming_mixin.dart |
| @@ -44,7 +44,7 @@ abstract class _MinifiedFieldNamer implements Namer { |
| * hierarchy is encoded using instances of [_FieldNamingScope]. |
| */ |
| class _FieldNamingRegistry { |
| - final MinifyNamer namer; |
| + final Namer namer; |
| final Map<Entity, _FieldNamingScope> scopes = |
| new Map<Entity, _FieldNamingScope>(); |
| @@ -71,14 +71,13 @@ class _FieldNamingRegistry { |
| // existing properties on JS objects (see [_reservedNativeProperties]). |
| // However, some of them are really short and safe to use for fields. |
| // Thus, we shortcut the namer to use those first. |
| - assert(index == nameStore.length + 1); |
| + assert(index == nameStore.length); |
|
herhut
2015/06/30 16:33:26
this is a back-ported fix from a later revision...
|
| if (index < MinifyNamer._reservedNativeProperties.length && |
| MinifyNamer._reservedNativeProperties[index].length <= 2) { |
| nameStore.add( |
| new StringBackedName(MinifyNamer._reservedNativeProperties[index])); |
| } else { |
| - nameStore.add(namer.getFreshName("field$index", namer.usedInstanceNames, |
| - namer.suggestedInstanceNames)); |
| + nameStore.add(namer.getFreshName(NamingScope.instance, "field$index")); |
| } |
| } |