src/share/vm/code/codeBlob.hpp

changeset 1734
9eba43136cb5
parent 1590
4e6abf09f540
child 1907
c18cbe5936b8
child 1918
1a5913bf5e19
     1.1 --- a/src/share/vm/code/codeBlob.hpp	Thu Mar 11 05:09:20 2010 -0800
     1.2 +++ b/src/share/vm/code/codeBlob.hpp	Tue Mar 16 11:52:17 2010 +0100
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright 1998-2009 Sun Microsystems, Inc.  All Rights Reserved.
     1.6 + * Copyright 1998-2010 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 @@ -90,14 +90,15 @@
    1.11    void flush();
    1.12  
    1.13    // Typing
    1.14 -  virtual bool is_buffer_blob() const            { return false; }
    1.15 -  virtual bool is_nmethod() const                { return false; }
    1.16 -  virtual bool is_runtime_stub() const           { return false; }
    1.17 -  virtual bool is_deoptimization_stub() const    { return false; }
    1.18 -  virtual bool is_uncommon_trap_stub() const     { return false; }
    1.19 -  virtual bool is_exception_stub() const         { return false; }
    1.20 -  virtual bool is_safepoint_stub() const         { return false; }
    1.21 -  virtual bool is_adapter_blob() const           { return false; }
    1.22 +  virtual bool is_buffer_blob() const                 { return false; }
    1.23 +  virtual bool is_nmethod() const                     { return false; }
    1.24 +  virtual bool is_runtime_stub() const                { return false; }
    1.25 +  virtual bool is_deoptimization_stub() const         { return false; }
    1.26 +  virtual bool is_uncommon_trap_stub() const          { return false; }
    1.27 +  virtual bool is_exception_stub() const              { return false; }
    1.28 +  virtual bool is_safepoint_stub() const              { return false; }
    1.29 +  virtual bool is_adapter_blob() const                { return false; }
    1.30 +  virtual bool is_method_handles_adapter_blob() const { return false; }
    1.31  
    1.32    virtual bool is_compiled_by_c2() const         { return false; }
    1.33    virtual bool is_compiled_by_c1() const         { return false; }
    1.34 @@ -221,6 +222,9 @@
    1.35  
    1.36  class BufferBlob: public CodeBlob {
    1.37    friend class VMStructs;
    1.38 +  friend class AdapterBlob;
    1.39 +  friend class MethodHandlesAdapterBlob;
    1.40 +
    1.41   private:
    1.42    // Creation support
    1.43    BufferBlob(const char* name, int size);
    1.44 @@ -236,8 +240,7 @@
    1.45    static void free(BufferBlob* buf);
    1.46  
    1.47    // Typing
    1.48 -  bool is_buffer_blob() const                    { return true; }
    1.49 -  bool is_adapter_blob() const;
    1.50 +  virtual bool is_buffer_blob() const            { return true; }
    1.51  
    1.52    // GC/Verification support
    1.53    void preserve_callee_argument_oops(frame fr, const RegisterMap* reg_map, OopClosure* f)  { /* nothing to do */ }
    1.54 @@ -255,6 +258,40 @@
    1.55  
    1.56  
    1.57  //----------------------------------------------------------------------------------------------------
    1.58 +// AdapterBlob: used to hold C2I/I2C adapters
    1.59 +
    1.60 +class AdapterBlob: public BufferBlob {
    1.61 +private:
    1.62 +  AdapterBlob(int size)                 : BufferBlob("I2C/C2I adapters", size) {}
    1.63 +  AdapterBlob(int size, CodeBuffer* cb) : BufferBlob("I2C/C2I adapters", size, cb) {}
    1.64 +
    1.65 +public:
    1.66 +  // Creation
    1.67 +  static AdapterBlob* create(CodeBuffer* cb);
    1.68 +
    1.69 +  // Typing
    1.70 +  virtual bool is_adapter_blob() const { return true; }
    1.71 +};
    1.72 +
    1.73 +
    1.74 +//----------------------------------------------------------------------------------------------------
    1.75 +// MethodHandlesAdapterBlob: used to hold MethodHandles adapters
    1.76 +
    1.77 +class MethodHandlesAdapterBlob: public BufferBlob {
    1.78 +private:
    1.79 +  MethodHandlesAdapterBlob(int size)                 : BufferBlob("MethodHandles adapters", size) {}
    1.80 +  MethodHandlesAdapterBlob(int size, CodeBuffer* cb) : BufferBlob("MethodHandles adapters", size, cb) {}
    1.81 +
    1.82 +public:
    1.83 +  // Creation
    1.84 +  static MethodHandlesAdapterBlob* create(int buffer_size);
    1.85 +
    1.86 +  // Typing
    1.87 +  virtual bool is_method_handles_adapter_blob() const { return true; }
    1.88 +};
    1.89 +
    1.90 +
    1.91 +//----------------------------------------------------------------------------------------------------
    1.92  // RuntimeStub: describes stubs used by compiled code to call a (static) C++ runtime routine
    1.93  
    1.94  class RuntimeStub: public CodeBlob {

mercurial