Skip to content

Commit

Permalink
Removing debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank Laub committed Jun 20, 2010
1 parent 51dafa4 commit 717f34e
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions src/DotWeb.System/Collections/Generic/Dictionary.cs
Expand Up @@ -367,20 +367,11 @@ public Dictionary(IDictionary<TKey, TValue> dictionary)
if (key == null)
throw new ArgumentNullException("key");

//JsDebug.Log("key: " + key);
//JsDebug.Log("value: " + value);

// get first item of linked list corresponding to given key
int hashCode = hcp.GetHashCode(key) | HASH_FLAG;
int index = (hashCode & int.MaxValue) % table.Length;
int cur = table[index] - 1;

//JsDebug.Log("hashCode: " + hashCode);
//JsDebug.Log("index: " + index);
//JsDebug.Log("table: " + table);
//JsDebug.Log("table[index]: " + table[index]);
//JsDebug.Log("cur: " + cur);

// walk linked list until end is reached (throw an exception if a
// existing slot is found having an equivalent key)
while (cur != NO_SLOT) {
Expand All @@ -403,33 +394,24 @@ public Dictionary(IDictionary<TKey, TValue> dictionary)
else
emptySlot = linkSlots[cur].Next;

//JsDebug.Log("cur: " + cur);

// store the hash code of the added item,
// prepend the added item to its linked list,
// update the hash table
//JsDebug.Log("linkSlots[cur]: " + linkSlots[cur]);
if (linkSlots[cur] == null) {
linkSlots[cur] = new Link();
}
linkSlots[cur].HashCode = hashCode;
linkSlots[cur].Next = table[index] - 1;
//JsDebug.Log("linkSlots[cur]: " + linkSlots[cur]);
table[index] = cur + 1;
//JsDebug.Log("table: " + table);

// store item's data
keySlots[cur] = key;
valueSlots[cur] = value;

//JsDebug.Log("keySlots: " + keySlots);
//JsDebug.Log("valueSlots: " + valueSlots);

generation++;
}

private void Resize() {
//JsDebug.Log("Resize");
// From the SDK docs:
// Hashtable is automatically increased
// to the smallest prime number that is larger
Expand Down Expand Up @@ -483,7 +465,6 @@ public class Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEn
internal KeyValuePair<TKey, TValue> current;

internal Enumerator(Dictionary<TKey, TValue> dictionary) {
//JsDebug.Log("Enumerator");
this.dictionary = dictionary;
stamp = dictionary.generation;
}
Expand All @@ -492,7 +473,6 @@ public class Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEn

public KeyValuePair<TKey, TValue> Current {
get {
//JsDebug.Log("Current");
return this.current;
}
}
Expand All @@ -502,7 +482,6 @@ public class Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEn
#region IDisposable Members

public void Dispose() {
//JsDebug.Log("Dispose");
this.dictionary = null;
}

Expand Down Expand Up @@ -534,7 +513,6 @@ public class Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEn

object IEnumerator.Current {
get {
//JsDebug.Log("IEnumerator.Current");
VerifyCurrent();
return this.current;
}
Expand Down

0 comments on commit 717f34e

Please sign in to comment.