Mercurial > hg > graal-compiler
diff src/share/vm/code/stubs.hpp @ 7735:a7a93887b4c4
fix Solaris build and initial SPARC support
author | twisti |
---|---|
date | Wed, 06 Feb 2013 18:01:07 -0800 |
parents | 7d815d842ee0 |
children | b8f261ba79c6 |
line wrap: on
line diff
--- a/src/share/vm/code/stubs.hpp Wed Feb 06 15:14:15 2013 +0100 +++ b/src/share/vm/code/stubs.hpp Wed Feb 06 18:01:07 2013 -0800 @@ -107,20 +107,21 @@ public: // Initialization/finalization virtual void initialize(Stub* self, int size, - CodeComments& comments) = 0; // called after creation (called twice if allocated via (request, commit)) - virtual void finalize(Stub* self) = 0; // called before deallocation + CodeComments& comments) = 0; // called after creation (called twice if allocated via (request, commit)) + virtual void finalize(Stub* self) = 0; // called before deallocation // General info/converters - virtual int size(Stub* self) const = 0; // the total size of the stub in bytes (must be a multiple of CodeEntryAlignment) - virtual int code_size_to_size(int code_size) const = 0; // computes the total stub size in bytes given the code size in bytes + virtual int size(Stub* self) const = 0; // the total size of the stub in bytes (must be a multiple of CodeEntryAlignment) + virtual int code_size_to_size(int code_size) const = 0; // computes the total stub size in bytes given the code size in bytes // Code info - virtual address code_begin(Stub* self) const = 0; // points to the first code byte - virtual address code_end(Stub* self) const = 0; // points to the first byte after the code + virtual address code_begin(Stub* self) const = 0; // points to the first code byte + virtual address code_end(Stub* self) const = 0; // points to the first byte after the code // Debugging - virtual void verify(Stub* self) = 0; // verifies the stub - virtual void print_on(Stub* self, outputStream* st) = 0; // prints information about the stub + virtual void verify(Stub* self) const = 0; // verifies the stub + NOT_PRODUCT(using AllocatedObj::print_on;) + virtual void print_on(Stub* self, outputStream* st) const = 0; // prints information about the stub }; @@ -128,28 +129,29 @@ // class, forwarding stub interface calls to the corresponding // stub calls. -#define DEF_STUB_INTERFACE(stub) \ - class stub##Interface: public StubInterface { \ - private: \ - static stub* cast(Stub* self) { return (stub*)self; } \ - \ - public: \ - /* Initialization/finalization */ \ - virtual void initialize(Stub* self, int size, \ - CodeComments& comments) { cast(self)->initialize(size, comments); } \ - virtual void finalize(Stub* self) { cast(self)->finalize(); } \ - \ - /* General info */ \ - virtual int size(Stub* self) const { return cast(self)->size(); } \ - virtual int code_size_to_size(int code_size) const { return stub::code_size_to_size(code_size); } \ - \ - /* Code info */ \ - virtual address code_begin(Stub* self) const { return cast(self)->code_begin(); } \ - virtual address code_end(Stub* self) const { return cast(self)->code_end(); } \ - \ - /* Debugging */ \ - virtual void verify(Stub* self) { cast(self)->verify(); } \ - virtual void print_on(Stub* self, outputStream* st) { cast(self)->print_on(st); } \ +#define DEF_STUB_INTERFACE(stub) \ + class stub##Interface: public StubInterface { \ + private: \ + static stub* cast(Stub* self) { return (stub*)self; } \ + \ + public: \ + /* Initialization/finalization */ \ + virtual void initialize(Stub* self, int size, \ + CodeComments& comments) { cast(self)->initialize(size, comments); } \ + virtual void finalize(Stub* self) { cast(self)->finalize(); } \ + \ + /* General info */ \ + virtual int size(Stub* self) const { return cast(self)->size(); } \ + virtual int code_size_to_size(int code_size) const { return stub::code_size_to_size(code_size); } \ + \ + /* Code info */ \ + virtual address code_begin(Stub* self) const { return cast(self)->code_begin(); } \ + virtual address code_end(Stub* self) const { return cast(self)->code_end(); } \ + \ + /* Debugging */ \ + virtual void verify(Stub* self) const { cast(self)->verify(); } \ + NOT_PRODUCT(using AllocatedObj::print_on;) \ + virtual void print_on(Stub* self, outputStream* st) const { cast(self)->print_on(st); } \ }; @@ -182,7 +184,7 @@ bool stub_contains(Stub* s, address pc) const { return _stub_interface->code_begin(s) <= pc && pc < _stub_interface->code_end(s); } int stub_code_size_to_size(int code_size) const { return _stub_interface->code_size_to_size(code_size); } void stub_verify(Stub* s) { _stub_interface->verify(s); } - void stub_print(Stub* s, outputStream* st) { _stub_interface->print_on(s, st); } + void stub_print(Stub* s, outputStream* st) const { _stub_interface->print_on(s, st); } static void register_queue(StubQueue*); @@ -226,9 +228,9 @@ address stub_code_end(Stub* s) const { return _stub_interface->code_end(s); } // Debugging/printing - void verify(); // verifies the stub queue - void print() { print_on(tty); } - void print_on(outputStream* st); + void verify(); // verifies the stub queue + virtual void print() const { print_on(tty); } + virtual void print_on(outputStream* st) const; }; #endif // SHARE_VM_CODE_STUBS_HPP