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

Unified Diff: lib/compiler/implementation/lib/core_patch.dart

Issue 10918163: Revert Expando changes. There are checked-mode errors that I need (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 | « no previous file | lib/compiler/implementation/lib/coreimpl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/lib/core_patch.dart
diff --git a/lib/compiler/implementation/lib/core_patch.dart b/lib/compiler/implementation/lib/core_patch.dart
index d6b40ae53bf9456816e879d1505bcf527885e7b8..aea4c6c7c2e0df68062931c651de31cddc668398 100644
--- a/lib/compiler/implementation/lib/core_patch.dart
+++ b/lib/compiler/implementation/lib/core_patch.dart
@@ -14,35 +14,3 @@ patch class Object {
throw new NoSuchMethodException(this, name, args);
}
}
-
-
-// Patch for Expando implementation.
-patch class Expando<T> {
-
- patch T operator[](Object object) {
- var values = Primitives.getProperty(object, _EXPANDO_PROPERTY_NAME);
- return (values === null) ? null : Primitives.getProperty(values, _getKey());
- }
-
- patch void operator[]=(Object object, T value) {
- var values = Primitives.getProperty(object, _EXPANDO_PROPERTY_NAME);
- if (values === null) {
- values = new Object();
- Primitives.setProperty(object, _EXPANDO_PROPERTY_NAME, values);
- }
- Primitives.setProperty(values, _getKey(), value);
- }
-
- String _getKey() {
- String key = Primitives.getProperty(this, _KEY_PROPERTY_NAME);
- if (key === null) {
- key = "expando\$key\$${_keyCount++}";
- Primitives.setProperty(this, _KEY_PROPERTY_NAME, key);
- }
- return key;
- }
-
- static const String _KEY_PROPERTY_NAME = 'expando\$key';
- static const String _EXPANDO_PROPERTY_NAME = 'expando\$values';
- static int _keyCount = 0;
-}
« no previous file with comments | « no previous file | lib/compiler/implementation/lib/coreimpl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698