コード例 #1
0
 public DeoptimizationAction decodeDeoptAction(Constant constant) {
   HotSpotVMConfig config = runtime.getConfig();
   int actionValue =
       ((~constant.asInt()) >> config.deoptimizationActionShift)
           & intMaskRight(config.deoptimizationActionBits);
   DeoptimizationAction action = convertDeoptAction(actionValue);
   return action;
 }
コード例 #2
0
 @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;
 }
コード例 #3
0
 public int decodeDebugId(Constant constant) {
   HotSpotVMConfig config = runtime.getConfig();
   return ((~constant.asInt()) >> config.deoptimizationDebugIdShift)
       & intMaskRight(config.deoptimizationDebugIdBits);
 }