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

Unified Diff: runtime/lib/expando_impl.dart

Issue 10872029: Quick fix for SDK after Expando addition in the VM. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 | « runtime/lib/expando.dart ('k') | runtime/lib/lib_sources.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/expando_impl.dart
diff --git a/runtime/lib/expando.dart b/runtime/lib/expando_impl.dart
similarity index 78%
rename from runtime/lib/expando.dart
rename to runtime/lib/expando_impl.dart
index 2f45b04d2e04b87c044d255fe933efe334dffc66..6b19366a6bd3d4592e12638a0b67f6e4a8740ee0 100644
--- a/runtime/lib/expando.dart
+++ b/runtime/lib/expando_impl.dart
@@ -9,9 +9,9 @@ class _Expando<T> implements Expando<T> {
T operator[](Object object) {
checkType(object);
- var weak_property = find(this);
- var list = weak_property.value;
- var do_compact = false;
+ var weakProperty = find(this);
+ var list = weakProperty.value;
+ var doCompact = false;
var result = null;
for (int i = 0; i < list.length; ++i) {
var key = list[i].key;
@@ -20,21 +20,21 @@ class _Expando<T> implements Expando<T> {
break;
}
if (key === null) {
- do_compact = true;
+ doCompact = true;
list[i] = null;
}
}
- if (do_compact) {
- weak_property.value = list.filter((e) => (e !== null));
+ if (doCompact) {
+ weakProperty.value = list.filter((e) => (e !== null));
}
return result;
}
void operator[]=(Object object, T value) {
checkType(object);
- var weak_property = find(this);
- var list = weak_property.value;
- var do_compact = false;
+ var weakProperty = find(this);
+ var list = weakProperty.value;
+ var doCompact = false;
int i = 0;
for (; i < list.length; ++i) {
var key = list[i].key;
@@ -42,20 +42,20 @@ class _Expando<T> implements Expando<T> {
break;
}
if (key === null) {
- do_compact = true;
+ doCompact = true;
list[i] = null;
}
}
if (i !== list.length && value === null) {
- do_compact = true;
+ doCompact = true;
list[i] = null;
} else if (i !== list.length) {
list[i].value = value;
} else {
list.add(new _WeakProperty(object, value));
}
- if (do_compact) {
- weak_property.value = list.filter((e) => (e !== null));
+ if (doCompact) {
+ weakProperty.value = list.filter((e) => (e !== null));
}
}
@@ -72,7 +72,7 @@ class _Expando<T> implements Expando<T> {
static find(expando) {
if (data === null) data = new List();
- var do_compact = false;
+ var doCompact = false;
int i = 0;
for (; i < data.length; ++i) {
var key = data[i].key;
@@ -80,7 +80,7 @@ class _Expando<T> implements Expando<T> {
break;
}
if (key === null) {
- do_compact = true;
+ doCompact = true;
data[i] = null;
}
}
@@ -88,7 +88,7 @@ class _Expando<T> implements Expando<T> {
data.add(new _WeakProperty(expando, new List()));
}
var result = data[i];
- if (do_compact) {
+ if (doCompact) {
data = data.filter((e) => (e !== null));
}
return result;
« no previous file with comments | « runtime/lib/expando.dart ('k') | runtime/lib/lib_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698