| Index: lib/compiler/implementation/lib/constant_map.dart
|
| diff --git a/lib/compiler/implementation/lib/constant_map.dart b/lib/compiler/implementation/lib/constant_map.dart
|
| index 0b12f2152c58a29e5ece48809b30dc6dd6d20b2a..14072133fff9975af94eb7e834659ae8682a9d17 100644
|
| --- a/lib/compiler/implementation/lib/constant_map.dart
|
| +++ b/lib/compiler/implementation/lib/constant_map.dart
|
| @@ -48,3 +48,19 @@ class ConstantMap<V> implements Map<String, V> {
|
| V remove(String key) => _throwImmutable();
|
| void clear() => _throwImmutable();
|
| }
|
| +
|
| +// This class has no constructor. This is on purpose since the instantiation
|
| +// is shortcut by the compiler.
|
| +class ConstantProtoMap<V> extends ConstantMap<V> {
|
| + final V _protoValue;
|
| +
|
| + bool containsKey(String key) {
|
| + if (key == '__proto__') return true;
|
| + return super.containsKey(key);
|
| + }
|
| +
|
| + V operator [](String key) {
|
| + if (key == '__proto__') return _protoValue;
|
| + return super[key];
|
| + }
|
| +}
|
|
|