Mercurial > hg > truffle
diff src/share/vm/asm/codeBuffer.hpp @ 7198:6ab62ad83507
8003195: AbstractAssembler should not store code pointers but use the CodeSection directly
Reviewed-by: twisti, kvn
Contributed-by: Bharadwaj Yadavalli <bharadwaj.yadavalli@oracle.com>
author | twisti |
---|---|
date | Fri, 30 Nov 2012 11:44:05 -0800 |
parents | b31471cdc53e |
children | cd3d6a6b95d9 |
line wrap: on
line diff
--- a/src/share/vm/asm/codeBuffer.hpp Tue Nov 27 17:41:38 2012 -0800 +++ b/src/share/vm/asm/codeBuffer.hpp Fri Nov 30 11:44:05 2012 -0800 @@ -30,8 +30,6 @@ #include "code/relocInfo.hpp" class CodeComments; -class AbstractAssembler; -class MacroAssembler; class PhaseCFG; class Compile; class BufferBlob; @@ -194,10 +192,14 @@ } // Code emission - void emit_int8 (int8_t x) { *((int8_t*) end()) = x; set_end(end() + 1); } - void emit_int16(int16_t x) { *((int16_t*) end()) = x; set_end(end() + 2); } - void emit_int32(int32_t x) { *((int32_t*) end()) = x; set_end(end() + 4); } - void emit_int64(int64_t x) { *((int64_t*) end()) = x; set_end(end() + 8); } + void emit_int8 ( int8_t x) { *((int8_t*) end()) = x; set_end(end() + sizeof(int8_t)); } + void emit_int16( int16_t x) { *((int16_t*) end()) = x; set_end(end() + sizeof(int16_t)); } + void emit_int32( int32_t x) { *((int32_t*) end()) = x; set_end(end() + sizeof(int32_t)); } + void emit_int64( int64_t x) { *((int64_t*) end()) = x; set_end(end() + sizeof(int64_t)); } + + void emit_float( jfloat x) { *((jfloat*) end()) = x; set_end(end() + sizeof(jfloat)); } + void emit_double(jdouble x) { *((jdouble*) end()) = x; set_end(end() + sizeof(jdouble)); } + void emit_address(address x) { *((address*) end()) = x; set_end(end() + sizeof(address)); } // Share a scratch buffer for relocinfo. (Hacky; saves a resource allocation.) void initialize_shared_locs(relocInfo* buf, int length);