public DeoptimizationAction decodeDeoptAction(Constant constant) { HotSpotVMConfig config = runtime.getConfig(); int actionValue = ((~constant.asInt()) >> config.deoptimizationActionShift) & intMaskRight(config.deoptimizationActionBits); DeoptimizationAction action = convertDeoptAction(actionValue); return action; }
@Override public Constant encodeDeoptActionAndReason( DeoptimizationAction action, DeoptimizationReason reason, int debugId) { HotSpotVMConfig config = runtime.getConfig(); int actionValue = convertDeoptAction(action); int reasonValue = convertDeoptReason(reason); int debugValue = debugId & intMaskRight(config.deoptimizationDebugIdBits); Constant c = Constant.forInt( ~((debugValue << config.deoptimizationDebugIdShift) | (reasonValue << config.deoptimizationReasonShift) | (actionValue << config.deoptimizationActionShift))); assert c.asInt() < 0; return c; }
public int decodeDebugId(Constant constant) { HotSpotVMConfig config = runtime.getConfig(); return ((~constant.asInt()) >> config.deoptimizationDebugIdShift) & intMaskRight(config.deoptimizationDebugIdBits); }