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

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

Issue 10837219: Port the remaining of dart:coreimpl to the unified corelib. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Review fixes. Created 8 years, 4 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 | « lib/compiler/implementation/lib/math.dartp ('k') | lib/compiler/implementation/lib/patch/coreimpl.dartp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/lib/mock.dart
diff --git a/lib/compiler/implementation/lib/mock.dart b/lib/compiler/implementation/lib/mock.dart
index d5e601c6756d9f6fa88b4a63743e29dcbbf5f3ba..bc48fea5a19fdcb99c3157cfce7c179787c73833 100644
--- a/lib/compiler/implementation/lib/mock.dart
+++ b/lib/compiler/implementation/lib/mock.dart
@@ -64,42 +64,3 @@ void exit(int exitCode) {
throw new UnsupportedOperationException("exit($exitCode)");
}
-class _Expando<T> implements Expando<T> {
-
- final String name;
-
- const _Expando([this.name]);
-
- T operator[](Object object) {
- var values = Primitives.getProperty(object, EXPANDO_PROPERTY_NAME);
- return (values === null) ? null : Primitives.getProperty(values, _getKey());
- }
-
- 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 toString() {
- String key = _getKey();
- return (name === null) ? "Expando:${key}" : "Expando:${name}@${key}";
- }
-
- 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 final String KEY_PROPERTY_NAME = 'expando\$key';
- static final String EXPANDO_PROPERTY_NAME = 'expando\$values';
- static int keyCount = 0;
-
-}
« no previous file with comments | « lib/compiler/implementation/lib/math.dartp ('k') | lib/compiler/implementation/lib/patch/coreimpl.dartp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698