src/share/vm/classfile/classFileParser.hpp

changeset 1145
e5b0439ef4ae
parent 905
ad8c8ca4ab0f
child 1310
6a93908f268f
     1.1 --- a/src/share/vm/classfile/classFileParser.hpp	Wed Apr 08 00:12:59 2009 -0700
     1.2 +++ b/src/share/vm/classfile/classFileParser.hpp	Wed Apr 08 10:56:49 2009 -0700
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
     1.6 + * Copyright 1997-2009 Sun Microsystems, Inc.  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 @@ -33,6 +33,7 @@
    1.11    u2   _major_version;
    1.12    u2   _minor_version;
    1.13    symbolHandle _class_name;
    1.14 +  KlassHandle _host_klass;
    1.15    GrowableArray<Handle>* _cp_patches; // overrides for CP entries
    1.16  
    1.17    bool _has_finalizer;
    1.18 @@ -145,6 +146,11 @@
    1.19    // Adjust the next_nonstatic_oop_offset to place the fake fields
    1.20    // before any Java fields.
    1.21    void java_lang_Class_fix_post(int* next_nonstatic_oop_offset);
    1.22 +  // Adjust the field allocation counts for java.dyn.MethodHandle to add
    1.23 +  // a fake address (void*) field.
    1.24 +  void java_dyn_MethodHandle_fix_pre(constantPoolHandle cp,
    1.25 +                                     typeArrayHandle* fields_ptr,
    1.26 +                                     FieldAllocationCount *fac_ptr, TRAPS);
    1.27  
    1.28    // Format checker methods
    1.29    void classfile_parse_error(const char* msg, TRAPS);
    1.30 @@ -204,6 +210,10 @@
    1.31    char* skip_over_field_name(char* name, bool slash_ok, unsigned int length);
    1.32    char* skip_over_field_signature(char* signature, bool void_ok, unsigned int length, TRAPS);
    1.33  
    1.34 +  bool is_anonymous() {
    1.35 +    assert(AnonymousClasses || _host_klass.is_null(), "");
    1.36 +    return _host_klass.not_null();
    1.37 +  }
    1.38    bool has_cp_patch_at(int index) {
    1.39      assert(AnonymousClasses, "");
    1.40      assert(index >= 0, "oob");
    1.41 @@ -249,11 +259,13 @@
    1.42                                       Handle protection_domain,
    1.43                                       symbolHandle& parsed_name,
    1.44                                       TRAPS) {
    1.45 -    return parseClassFile(name, class_loader, protection_domain, NULL, parsed_name, THREAD);
    1.46 +    KlassHandle no_host_klass;
    1.47 +    return parseClassFile(name, class_loader, protection_domain, no_host_klass, NULL, parsed_name, THREAD);
    1.48    }
    1.49    instanceKlassHandle parseClassFile(symbolHandle name,
    1.50                                       Handle class_loader,
    1.51                                       Handle protection_domain,
    1.52 +                                     KlassHandle host_klass,
    1.53                                       GrowableArray<Handle>* cp_patches,
    1.54                                       symbolHandle& parsed_name,
    1.55                                       TRAPS);

mercurial