class G1PreBarrierStub: public CodeStub { friendclass G1BarrierSetC1; private: bool _do_load;
LIR_Opr _addr;
LIR_Opr _pre_val;
LIR_PatchCode _patch_code;
CodeEmitInfo* _info;
public: // Version that _does_ generate a load of the previous value from addr. // addr (the address of the field to be read) must be a LIR_Address // pre_val (a temporary register) must be a register;
G1PreBarrierStub(LIR_Opr addr, LIR_Opr pre_val, LIR_PatchCode patch_code, CodeEmitInfo* info) :
_do_load(true), _addr(addr), _pre_val(pre_val),
_patch_code(patch_code), _info(info)
{
assert(_pre_val->is_register(), "should be temporary register");
assert(_addr->is_address(), "should be the address of the field");
}
// Version that _does not_ generate load of the previous value; the // previous value is assumed to have already been loaded into pre_val.
G1PreBarrierStub(LIR_Opr pre_val) :
_do_load(false), _addr(LIR_OprFact::illegalOpr), _pre_val(pre_val),
_patch_code(lir_patch_none), _info(NULL)
{
assert(_pre_val->is_register(), "should be a register");
}
virtualvoid emit_code(LIR_Assembler* e); virtualvoid visit(LIR_OpVisitState* visitor) { if (_do_load) { // don't pass in the code emit info since it's processed in the fast // path if (_info != NULL)
visitor->do_slow_case(_info); else
visitor->do_slow_case();
class G1PostBarrierStub: public CodeStub { friendclass G1BarrierSetC1; private:
LIR_Opr _addr;
LIR_Opr _new_val;
public: // addr (the address of the object head) and new_val must be registers.
G1PostBarrierStub(LIR_Opr addr, LIR_Opr new_val): _addr(addr), _new_val(new_val) { }
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.