Mercurial > hg > graal-jvmci-8
diff src/share/vm/interpreter/interpreter.hpp @ 6796:b31471cdc53e
7200163: add CodeComments functionality to assember stubs
Summary: Pass the codeBuffer to the Stub constructor, and adapts the disassembler to print the comments.
Reviewed-by: jrose, kvn, twisti
Contributed-by: goetz.lindenmaier@sap.com
author | kvn |
---|---|
date | Mon, 24 Sep 2012 10:30:14 -0700 |
parents | 1d1603768966 |
children | b9a9ed0f8eeb |
line wrap: on
line diff
--- a/src/share/vm/interpreter/interpreter.hpp Thu Sep 20 16:49:17 2012 +0200 +++ b/src/share/vm/interpreter/interpreter.hpp Mon Sep 24 10:30:14 2012 -0700 @@ -48,10 +48,12 @@ int _size; // the size in bytes const char* _description; // a description of the codelet, for debugging & printing Bytecodes::Code _bytecode; // associated bytecode if any + DEBUG_ONLY(CodeComments _comments;) // Comments for annotating assembler output. public: // Initialization/finalization - void initialize(int size) { _size = size; } + void initialize(int size, + CodeComments& comments) { _size = size; DEBUG_ONLY(_comments.assign(comments);) } void finalize() { ShouldNotCallThis(); } // General info/converters @@ -129,7 +131,7 @@ // commit Codelet - AbstractInterpreter::code()->commit((*_masm)->code()->pure_insts_size()); + AbstractInterpreter::code()->commit((*_masm)->code()->pure_insts_size(), (*_masm)->code()->comments()); // make sure nobody can use _masm outside a CodeletMark lifespan *_masm = NULL; }