src/share/vm/classfile/resolutionErrors.hpp

changeset 4037
da91efe96a93
parent 3900
d2a62e0f25eb
child 6876
710a3c8b516e
child 9966
baf9f57c9b46
     1.1 --- a/src/share/vm/classfile/resolutionErrors.hpp	Fri Aug 31 16:39:35 2012 -0700
     1.2 +++ b/src/share/vm/classfile/resolutionErrors.hpp	Sat Sep 01 13:25:18 2012 -0400
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -25,7 +25,7 @@
    1.11  #ifndef SHARE_VM_CLASSFILE_RESOLUTIONERRORS_HPP
    1.12  #define SHARE_VM_CLASSFILE_RESOLUTIONERRORS_HPP
    1.13  
    1.14 -#include "oops/constantPoolOop.hpp"
    1.15 +#include "oops/constantPool.hpp"
    1.16  #include "utilities/hashtable.hpp"
    1.17  
    1.18  class ResolutionErrorEntry;
    1.19 @@ -33,25 +33,25 @@
    1.20  // ResolutionError objects are used to record errors encountered during
    1.21  // constant pool resolution (JVMS 5.4.3).
    1.22  
    1.23 -class ResolutionErrorTable : public Hashtable<constantPoolOop, mtClass> {
    1.24 +class ResolutionErrorTable : public Hashtable<ConstantPool*, mtClass> {
    1.25  
    1.26  public:
    1.27    ResolutionErrorTable(int table_size);
    1.28  
    1.29 -  ResolutionErrorEntry* new_entry(int hash, constantPoolOop pool, int cp_index, Symbol* error);
    1.30 +  ResolutionErrorEntry* new_entry(int hash, ConstantPool* pool, int cp_index, Symbol* error);
    1.31    void free_entry(ResolutionErrorEntry *entry);
    1.32  
    1.33    ResolutionErrorEntry* bucket(int i) {
    1.34 -    return (ResolutionErrorEntry*)Hashtable<constantPoolOop, mtClass>::bucket(i);
    1.35 +    return (ResolutionErrorEntry*)Hashtable<ConstantPool*, mtClass>::bucket(i);
    1.36    }
    1.37  
    1.38    ResolutionErrorEntry** bucket_addr(int i) {
    1.39 -    return (ResolutionErrorEntry**)Hashtable<constantPoolOop, mtClass>::bucket_addr(i);
    1.40 +    return (ResolutionErrorEntry**)Hashtable<ConstantPool*, mtClass>::bucket_addr(i);
    1.41    }
    1.42  
    1.43    void add_entry(int index, ResolutionErrorEntry* new_entry) {
    1.44 -    Hashtable<constantPoolOop, mtClass>::add_entry(index,
    1.45 -      (HashtableEntry<constantPoolOop, mtClass>*)new_entry);
    1.46 +    Hashtable<ConstantPool*, mtClass>::add_entry(index,
    1.47 +      (HashtableEntry<ConstantPool*, mtClass>*)new_entry);
    1.48    }
    1.49  
    1.50    void add_entry(int index, unsigned int hash,
    1.51 @@ -68,21 +68,21 @@
    1.52    }
    1.53  
    1.54    // purges unloaded entries from the table
    1.55 -  void purge_resolution_errors(BoolObjectClosure* is_alive);
    1.56 +  void purge_resolution_errors();
    1.57  
    1.58 -  // GC support.
    1.59 -  void oops_do(OopClosure* f);
    1.60 +  // RedefineClasses support - remove obsolete constant pool entry
    1.61 +  void delete_entry(ConstantPool* c);
    1.62  };
    1.63  
    1.64  
    1.65 -class ResolutionErrorEntry : public HashtableEntry<constantPoolOop, mtClass> {
    1.66 +class ResolutionErrorEntry : public HashtableEntry<ConstantPool*, mtClass> {
    1.67   private:
    1.68    int               _cp_index;
    1.69    Symbol*           _error;
    1.70  
    1.71   public:
    1.72 -  constantPoolOop    pool() const               { return (constantPoolOop)literal(); }
    1.73 -  constantPoolOop*   pool_addr()                { return (constantPoolOop*)literal_addr(); }
    1.74 +  ConstantPool*      pool() const               { return (ConstantPool*)literal(); }
    1.75 +  ConstantPool**   pool_addr()                { return (ConstantPool**)literal_addr(); }
    1.76  
    1.77    int                cp_index() const           { return _cp_index; }
    1.78    void               set_cp_index(int cp_index) { _cp_index = cp_index; }
    1.79 @@ -91,15 +91,12 @@
    1.80    void               set_error(Symbol* e);
    1.81  
    1.82    ResolutionErrorEntry* next() const {
    1.83 -    return (ResolutionErrorEntry*)HashtableEntry<constantPoolOop, mtClass>::next();
    1.84 +    return (ResolutionErrorEntry*)HashtableEntry<ConstantPool*, mtClass>::next();
    1.85    }
    1.86  
    1.87    ResolutionErrorEntry** next_addr() {
    1.88 -    return (ResolutionErrorEntry**)HashtableEntry<constantPoolOop, mtClass>::next_addr();
    1.89 +    return (ResolutionErrorEntry**)HashtableEntry<ConstantPool*, mtClass>::next_addr();
    1.90    }
    1.91 -
    1.92 -  // GC support
    1.93 -  void oops_do(OopClosure* blk);
    1.94  };
    1.95  
    1.96  #endif // SHARE_VM_CLASSFILE_RESOLUTIONERRORS_HPP

mercurial