src/share/vm/asm/codeBuffer.hpp

changeset 4767
a5de0cc2f91c
parent 4318
cd3d6a6b95d9
child 5614
9758d9f36299
     1.1 --- a/src/share/vm/asm/codeBuffer.hpp	Sat Mar 16 21:44:52 2013 -0700
     1.2 +++ b/src/share/vm/asm/codeBuffer.hpp	Mon Mar 18 13:19:06 2013 +0100
     1.3 @@ -28,7 +28,7 @@
     1.4  #include "code/oopRecorder.hpp"
     1.5  #include "code/relocInfo.hpp"
     1.6  
     1.7 -class CodeComments;
     1.8 +class CodeStrings;
     1.9  class PhaseCFG;
    1.10  class Compile;
    1.11  class BufferBlob;
    1.12 @@ -240,27 +240,31 @@
    1.13  #endif //PRODUCT
    1.14  };
    1.15  
    1.16 -class CodeComment;
    1.17 -class CodeComments VALUE_OBJ_CLASS_SPEC {
    1.18 +class CodeString;
    1.19 +class CodeStrings VALUE_OBJ_CLASS_SPEC {
    1.20  private:
    1.21  #ifndef PRODUCT
    1.22 -  CodeComment* _comments;
    1.23 +  CodeString* _strings;
    1.24  #endif
    1.25  
    1.26 +  CodeString* find(intptr_t offset) const;
    1.27 +  CodeString* find_last(intptr_t offset) const;
    1.28 +
    1.29  public:
    1.30 -  CodeComments() {
    1.31 +  CodeStrings() {
    1.32  #ifndef PRODUCT
    1.33 -    _comments = NULL;
    1.34 +    _strings = NULL;
    1.35  #endif
    1.36    }
    1.37  
    1.38 +  const char* add_string(const char * string) PRODUCT_RETURN_(return NULL;);
    1.39 +
    1.40    void add_comment(intptr_t offset, const char * comment) PRODUCT_RETURN;
    1.41    void print_block_comment(outputStream* stream, intptr_t offset) const PRODUCT_RETURN;
    1.42 -  void assign(CodeComments& other)  PRODUCT_RETURN;
    1.43 +  void assign(CodeStrings& other)  PRODUCT_RETURN;
    1.44    void free() PRODUCT_RETURN;
    1.45  };
    1.46  
    1.47 -
    1.48  // A CodeBuffer describes a memory space into which assembly
    1.49  // code is generated.  This memory space usually occupies the
    1.50  // interior of a single BufferBlob, but in some cases it may be
    1.51 @@ -326,7 +330,7 @@
    1.52    csize_t      _total_size;     // size in bytes of combined memory buffer
    1.53  
    1.54    OopRecorder* _oop_recorder;
    1.55 -  CodeComments _comments;
    1.56 +  CodeStrings  _strings;
    1.57    OopRecorder  _default_oop_recorder;  // override with initialize_oop_recorder
    1.58    Arena*       _overflow_arena;
    1.59  
    1.60 @@ -527,7 +531,7 @@
    1.61    void initialize_oop_recorder(OopRecorder* r);
    1.62  
    1.63    OopRecorder* oop_recorder() const   { return _oop_recorder; }
    1.64 -  CodeComments& comments()            { return _comments; }
    1.65 +  CodeStrings& strings()              { return _strings; }
    1.66  
    1.67    // Code generation
    1.68    void relocate(address at, RelocationHolder const& rspec, int format = 0) {
    1.69 @@ -556,6 +560,7 @@
    1.70    address transform_address(const CodeBuffer &cb, address addr) const;
    1.71  
    1.72    void block_comment(intptr_t offset, const char * comment) PRODUCT_RETURN;
    1.73 +  const char* code_string(const char* str) PRODUCT_RETURN_(return NULL;);
    1.74  
    1.75    // Log a little info about section usage in the CodeBuffer
    1.76    void log_section_sizes(const char* name);

mercurial