Print this page


Split Close
Expand all
Collapse all
          --- old/src/share/vm/classfile/classFileParser.hpp
          +++ new/src/share/vm/classfile/classFileParser.hpp
↓ open down ↓ 223 lines elided ↑ open up ↑
 224  224    void verify_legal_field_signature(Symbol* fieldname, Symbol* signature, TRAPS);
 225  225    int  verify_legal_method_signature(Symbol* methodname, Symbol* signature, TRAPS);
 226  226    void verify_legal_class_modifiers(jint flags, TRAPS);
 227  227    void verify_legal_field_modifiers(jint flags, bool is_interface, TRAPS);
 228  228    void verify_legal_method_modifiers(jint flags, bool is_interface, Symbol* name, TRAPS);
 229  229    bool verify_unqualified_name(char* name, unsigned int length, int type);
 230  230    char* skip_over_field_name(char* name, bool slash_ok, unsigned int length);
 231  231    char* skip_over_field_signature(char* signature, bool void_ok, unsigned int length, TRAPS);
 232  232  
 233  233    bool is_anonymous() {
 234      -    assert(AnonymousClasses || _host_klass.is_null(), "");
      234 +    assert(EnableInvokeDynamic || _host_klass.is_null(), "");
 235  235      return _host_klass.not_null();
 236  236    }
 237  237    bool has_cp_patch_at(int index) {
 238      -    assert(AnonymousClasses, "");
      238 +    assert(EnableInvokeDynamic, "");
 239  239      assert(index >= 0, "oob");
 240  240      return (_cp_patches != NULL
 241  241              && index < _cp_patches->length()
 242  242              && _cp_patches->adr_at(index)->not_null());
 243  243    }
 244  244    Handle cp_patch_at(int index) {
 245  245      assert(has_cp_patch_at(index), "oob");
 246  246      return _cp_patches->at(index);
 247  247    }
 248  248    Handle clear_cp_patch_at(int index) {
↓ open down ↓ 2 lines elided ↑ open up ↑
 251  251      assert(!has_cp_patch_at(index), "");
 252  252      return patch;
 253  253    }
 254  254    void patch_constant_pool(constantPoolHandle cp, int index, Handle patch, TRAPS);
 255  255  
 256  256    // Wrapper for constantTag.is_klass_[or_]reference.
 257  257    // In older versions of the VM, klassOops cannot sneak into early phases of
 258  258    // constant pool construction, but in later versions they can.
 259  259    // %%% Let's phase out the old is_klass_reference.
 260  260    bool is_klass_reference(constantPoolHandle cp, int index) {
 261      -    return ((LinkWellKnownClasses || AnonymousClasses)
      261 +    return ((LinkWellKnownClasses || EnableInvokeDynamic)
 262  262              ? cp->tag_at(index).is_klass_or_reference()
 263  263              : cp->tag_at(index).is_klass_reference());
 264  264    }
 265  265  
 266  266   public:
 267  267    // Constructor
 268  268    ClassFileParser(ClassFileStream* st) { set_stream(st); }
 269  269  
 270  270    // Parse .class file and return new klassOop. The klassOop is not hooked up
 271  271    // to the system dictionary or any other structures, so a .class file can
↓ open down ↓ 31 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX