Exemplo n.º 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;
 }
Exemplo n.º 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;
 }
Exemplo n.º 3
0
 public int decodeDebugId(Constant constant) {
   HotSpotVMConfig config = runtime.getConfig();
   return ((~constant.asInt()) >> config.deoptimizationDebugIdShift)
       & intMaskRight(config.deoptimizationDebugIdBits);
 }