src/share/vm/runtime/stubCodeGenerator.cpp

changeset 544
9f4457a14b58
parent 535
c7c777385a15
child 631
d1605aabd0a1
equal deleted inserted replaced
532:f38a25e2458a 544:9f4457a14b58
67 StubCodeGenerator::StubCodeGenerator(CodeBuffer* code) { 67 StubCodeGenerator::StubCodeGenerator(CodeBuffer* code) {
68 _masm = new MacroAssembler(code); 68 _masm = new MacroAssembler(code);
69 _first_stub = _last_stub = NULL; 69 _first_stub = _last_stub = NULL;
70 } 70 }
71 71
72 #ifndef PRODUCT
73 extern "C" { 72 extern "C" {
74 static int compare_cdesc(const void* void_a, const void* void_b) { 73 static int compare_cdesc(const void* void_a, const void* void_b) {
75 int ai = (*((StubCodeDesc**) void_a))->index(); 74 int ai = (*((StubCodeDesc**) void_a))->index();
76 int bi = (*((StubCodeDesc**) void_b))->index(); 75 int bi = (*((StubCodeDesc**) void_b))->index();
77 return ai - bi; 76 return ai - bi;
78 } 77 }
79 } 78 }
80 #endif
81 79
82 StubCodeGenerator::~StubCodeGenerator() { 80 StubCodeGenerator::~StubCodeGenerator() {
83 #ifndef PRODUCT
84 if (PrintStubCode) { 81 if (PrintStubCode) {
85 CodeBuffer* cbuf = _masm->code(); 82 CodeBuffer* cbuf = _masm->code();
86 CodeBlob* blob = CodeCache::find_blob_unsafe(cbuf->insts()->start()); 83 CodeBlob* blob = CodeCache::find_blob_unsafe(cbuf->insts()->start());
87 if (blob != NULL) { 84 if (blob != NULL) {
88 blob->set_comments(cbuf->comments()); 85 blob->set_comments(cbuf->comments());
103 tty->cr(); 100 tty->cr();
104 Disassembler::decode(cdesc->begin(), cdesc->end()); 101 Disassembler::decode(cdesc->begin(), cdesc->end());
105 tty->cr(); 102 tty->cr();
106 } 103 }
107 } 104 }
108 #endif //PRODUCT
109 } 105 }
110 106
111 107
112 void StubCodeGenerator::stub_prolog(StubCodeDesc* cdesc) { 108 void StubCodeGenerator::stub_prolog(StubCodeDesc* cdesc) {
113 // default implementation - do nothing 109 // default implementation - do nothing

mercurial