Ignore:
Timestamp:
Apr 27, 2004, 8:39:34 PM (22 years ago)
Author:
bird
Message:

GCC v3.3.3 sources.

Location:
branches/GNU/src/gcc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/gcc

    • Property svn:ignore
      •  

        old new  
        2626configure.vr
        2727configure.vrs
         28
        2829Makefile
        29 dir.info
        3030lost+found
        3131update.out
  • branches/GNU/src/gcc/libjava/java/util/IdentityHashMap.java

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    163163    if (max < 2)
    164164      max = 2;
    165     table = new Object[2 * max];
     165    table = new Object[];
    166166    Arrays.fill(table, emptyslot);
    167     threshold = max / 4 * 3;
     167    threshold = * 3;
    168168  }
    169169
     
    177177  public IdentityHashMap(Map m)
    178178  {
    179     this(Math.max(m.size() * 2, DEFAULT_CAPACITY));
     179    this(Math.max(m.size() , DEFAULT_CAPACITY));
    180180    putAll(m);
    181181  }
     
    342342
    343343  /**
    344    * Return the value in this Map associated with the supplied key,
    345    * or <pre>null</pre> if the key maps to nothing.  NOTE: Since the value
    346    * could also be null, you must use containsKey to see if this key
    347    * actually maps to something.  Unlike normal maps, this tests for the key
    348    * with <code>entry == key</code> instead of
    349    * <code>entry == null ? key == null : entry.equals(key)</code>.
     344   * Return the value in this Map associated with the supplied key, or
     345   * <code>null</code> if the key maps to nothing.
     346   *
     347   * <p>NOTE: Since the value could also be null, you must use
     348   * containsKey to see if this key actually maps to something.
     349   * Unlike normal maps, this tests for the key with <code>entry ==
     350   * key</code> instead of <code>entry == null ? key == null :
     351   * entry.equals(key)</code>.
    350352   *
    351353   * @param key the key for which to fetch an associated value
     
    488490        // This isn't necessarily prime, but it is an odd number of key/value
    489491        // slots, which has a higher probability of fewer collisions.
    490         table = new Object[old.length * 2 + 2];
     492        table = new Object[old.length + 2];
    491493        Arrays.fill(table, emptyslot);
    492494        size = 0;
    493         threshold = (table.length / 2) / 4 * 3;
     495        threshold = (table.length * 3;
    494496
    495497        for (int i = old.length - 2; i >= 0; i -= 2)
     
    532534
    533535  /**
    534    * Removes from the HashMap and returns the value which is mapped by the
    535    * supplied key. If the key maps to nothing, then the HashMap remains
    536    * unchanged, and <pre>null</pre> is returned. NOTE: Since the value
    537    * could also be null, you must use containsKey to see if you are
    538    * actually removing a mapping.  Unlike normal maps, this tests for the
    539    * key with <code>entry == key</code> instead of
    540    * <code>entry == null ? key == null : entry.equals(key)</code>.
     536   * Removes from the HashMap and returns the value which is mapped by
     537   * the supplied key. If the key maps to nothing, then the HashMap
     538   * remains unchanged, and <code>null</code> is returned.
     539   *
     540   * NOTE: Since the value could also be null, you must use
     541   * containsKey to see if you are actually removing a mapping.
     542   * Unlike normal maps, this tests for the key with <code>entry ==
     543   * key</code> instead of <code>entry == null ? key == null :
     544   * entry.equals(key)</code>.
    541545   *
    542546   * @param key the key used to locate the value to remove
     
    643647    // capacity, we guarantee that there will always be either an emptyslot
    644648    // or a tombstone somewhere in the table.
    645     int h = 2 * Math.abs(System.identityHashCode(key) % (table.length / 2));
     649    int h = ;
    646650    int del = -1;
    647651    int save = h;
     
    736740    /**
    737741     * Removes from the backing Map the last element which was fetched
    738      * with the <pre>next()</pre> method.
     742     * with the <code>next()</code> method.
     743     *
    739744     * @throws ConcurrentModificationException if the Map was modified
    740745     * @throws IllegalStateException if called when there is no last element
     
    895900
    896901    int num = s.readInt();
    897     table = new Object[2 * Math.max(num * 2, DEFAULT_CAPACITY)];
     902    table = new Object[];
    898903    // Read key/value pairs.
    899904    while (--num >= 0)
Note: See TracChangeset for help on using the changeset viewer.