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

Unified Diff: frog/minfrog

Issue 8989015: Updates the corelib to the new default specification for interfaces and new factory syntax (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years 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 | « corelib/src/time_zone.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/minfrog
diff --git a/frog/minfrog b/frog/minfrog
index 77515695a0c880fb3e406eb4c46139402c8ad7bd..36b6ce7b7bb33453115a5f9c3367e87c4ae89cdd 100755
--- a/frog/minfrog
+++ b/frog/minfrog
@@ -818,7 +818,7 @@ function HashMapImplementation() {
this._values = new Array(8/*HashMapImplementation._INITIAL_CAPACITY*/);
}
HashMapImplementation.HashMapImplementation$from$factory = function(other) {
- var result = new HashMapImplementation();
+ var result = new HashMapImplementation_K$V();
other.forEach((function (key, value) {
result.$setindex(key, value);
})
@@ -1104,6 +1104,19 @@ HashMapImplementation_E$E.prototype.containsKey = function(key) {
// ********** Code for HashMapImplementation_K$DoubleLinkedQueueEntry_KeyValuePair_K$V **************
$inherits(HashMapImplementation_K$DoubleLinkedQueueEntry_KeyValuePair_K$V, HashMapImplementation);
function HashMapImplementation_K$DoubleLinkedQueueEntry_KeyValuePair_K$V() {}
+// ********** Code for HashMapImplementation_K$V **************
+$inherits(HashMapImplementation_K$V, HashMapImplementation);
+function HashMapImplementation_K$V() {
+ // Initializers done
+ this._numberOfEntries = 0;
+ this._numberOfDeleted = 0;
+ this._loadLimit = HashMapImplementation._computeLoadLimit(8/*HashMapImplementation._INITIAL_CAPACITY*/);
+ this._keys = new Array(8/*HashMapImplementation._INITIAL_CAPACITY*/);
+ this._values = new Array(8/*HashMapImplementation._INITIAL_CAPACITY*/);
+}
+HashMapImplementation_K$V._computeLoadLimit = function(capacity) {
+ return $truncdiv((capacity * 3), 4);
+}
// ********** Code for HashMapImplementation_String$EvaluatedValue **************
$inherits(HashMapImplementation_String$EvaluatedValue, HashMapImplementation);
function HashMapImplementation_String$EvaluatedValue() {}
@@ -1113,7 +1126,7 @@ function HashSetImplementation() {
this._backingMap = new HashMapImplementation_E$E();
}
HashSetImplementation.HashSetImplementation$from$factory = function(other) {
- var set = new HashSetImplementation();
+ var set = new HashSetImplementation_E();
for (var $$i = other.iterator(); $$i.hasNext$0(); ) {
var e = $$i.next$0();
set.add(e);
@@ -1188,7 +1201,10 @@ HashSetImplementation.prototype.some$1 = function($0) {
};
// ********** Code for HashSetImplementation_E **************
$inherits(HashSetImplementation_E, HashSetImplementation);
-function HashSetImplementation_E() {}
+function HashSetImplementation_E() {
+ // Initializers done
+ this._backingMap = new HashMapImplementation_E$E();
+}
// ********** Code for HashSetImplementation_Library **************
$inherits(HashSetImplementation_Library, HashSetImplementation);
function HashSetImplementation_Library() {}
« no previous file with comments | « corelib/src/time_zone.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698