54
55 void InterpreterCodelet::initialize(const char* description, Bytecodes::Code bytecode) {
56 _description = description;
57 _bytecode = bytecode;
58 }
59
60
61 void InterpreterCodelet::verify() {
62 }
63
64
65 void InterpreterCodelet::print_on(outputStream* st) const {
66 ttyLocker ttyl;
67
68 if (PrintInterpreter) {
69 st->cr();
70 st->print_cr("----------------------------------------------------------------------");
71 }
72
73 if (description() != NULL) st->print("%s ", description());
74 if (bytecode() >= 0 ) st->print("%d %s ", bytecode(), Bytecodes::name(bytecode()));
75 st->print_cr("[" INTPTR_FORMAT ", " INTPTR_FORMAT "] %d bytes",
76 p2i(code_begin()), p2i(code_end()), code_size());
77
78 if (PrintInterpreter) {
79 st->cr();
80 Disassembler::decode(code_begin(), code_end(), st, DEBUG_ONLY(_strings) NOT_DEBUG(CodeStrings()));
81 }
82 }
83
84 CodeletMark::CodeletMark(InterpreterMacroAssembler*& masm,
85 const char* description,
86 Bytecodes::Code bytecode) :
87 _clet((InterpreterCodelet*)AbstractInterpreter::code()->request(codelet_size())),
88 _cb(_clet->code_begin(), _clet->code_size()) {
89 // Request all space (add some slack for Codelet data).
90 assert(_clet != NULL, "we checked not enough space already");
91
92 // Initialize Codelet attributes.
93 _clet->initialize(description, bytecode);
94 // Create assembler for code generation.
|
54
55 void InterpreterCodelet::initialize(const char* description, Bytecodes::Code bytecode) {
56 _description = description;
57 _bytecode = bytecode;
58 }
59
60
61 void InterpreterCodelet::verify() {
62 }
63
64
65 void InterpreterCodelet::print_on(outputStream* st) const {
66 ttyLocker ttyl;
67
68 if (PrintInterpreter) {
69 st->cr();
70 st->print_cr("----------------------------------------------------------------------");
71 }
72
73 if (description() != NULL) st->print("%s ", description());
74 if (bytecode() >= 0 ) {
75 st->print("[%s %d] %s ", Bytecodes::bcset2name(Bytecodes::bcset(bytecode())),
76 Bytecodes::bytecode(bytecode()), Bytecodes::name(bytecode()));
77 }
78 st->print_cr("[" INTPTR_FORMAT ", " INTPTR_FORMAT "] %d bytes",
79 p2i(code_begin()), p2i(code_end()), code_size());
80
81 if (PrintInterpreter) {
82 st->cr();
83 Disassembler::decode(code_begin(), code_end(), st, DEBUG_ONLY(_strings) NOT_DEBUG(CodeStrings()));
84 }
85 }
86
87 CodeletMark::CodeletMark(InterpreterMacroAssembler*& masm,
88 const char* description,
89 Bytecodes::Code bytecode) :
90 _clet((InterpreterCodelet*)AbstractInterpreter::code()->request(codelet_size())),
91 _cb(_clet->code_begin(), _clet->code_size()) {
92 // Request all space (add some slack for Codelet data).
93 assert(_clet != NULL, "we checked not enough space already");
94
95 // Initialize Codelet attributes.
96 _clet->initialize(description, bytecode);
97 // Create assembler for code generation.
|