AbstractAssembler::AbstractAssembler(CodeBuffer* code) { if (code == NULL) return; CodeSection* cs = code->insts(); cs->clear_mark(); // new assembler kills old mark if (cs->start() == NULL) { vm_exit_out_of_memory(0, OOM_MMAP_ERROR, "CodeCache: no room for %s", code->name()); } _code_section = cs; _oop_recorder= code->oop_recorder(); DEBUG_ONLY( _short_branch_delta = 0; ) }
AbstractAssembler::AbstractAssembler(CodeBuffer* code) { if (code == NULL) return; CodeSection* cs = code->insts(); cs->clear_mark(); // new assembler kills old mark _code_section = cs; _code_begin = cs->start(); _code_limit = cs->limit(); _code_pos = cs->end(); _oop_recorder= code->oop_recorder(); if (_code_begin == NULL) { vm_exit_out_of_memory1(0, "CodeCache: no room for %s", code->name()); } }
inline void AbstractAssembler::sync() { CodeSection* cs = code_section(); guarantee(cs->start() == _code_begin, "must not shift code buffer"); cs->set_end(_code_pos); }