Ejemplo n.º 1
1
 @SuppressWarnings("unused")
 protected int executeAndSpecialize0(
     Class<?> minimumState,
     VirtualFrame frameValue,
     Object value0Value,
     Object value1Value,
     String reason) {
   neverPartOfCompilation();
   int result = 0;
   Class<?> resultClass = null;
   boolean allowed = (minimumState == InvocationGuardUninitializedNode.class);
   String message = createInfo0(reason, value0Value, value1Value);
   allowed = allowed || (minimumState == InvocationGuardIntNode.class);
   if (SIMPLETYPES.isInteger(value0Value) && SIMPLETYPES.isInteger(value1Value)) {
     int value0ValueCast = SIMPLETYPES.asInteger(value0Value);
     int value1ValueCast = SIMPLETYPES.asInteger(value1Value);
     if (super.guard(value0ValueCast, value1ValueCast)) {
       if (resultClass == null) {
         result = super.doSpecialized(value0ValueCast, value1ValueCast);
         resultClass = InvocationGuardIntNode.class;
       }
       if (allowed) {
         super.replace(new InvocationGuardIntNode(this), message);
         return result;
       }
     }
   }
   if (resultClass == null) {
     result = super.doGeneric(value0Value, value1Value);
     resultClass = InvocationGuardGenericNode.class;
   }
   super.replace(new InvocationGuardGenericNode(this), message);
   return result;
 }
Ejemplo n.º 2
0
 @Override
 public boolean executeBoolean(VirtualFrame frameValue) throws UnexpectedResultException {
   int value;
   try {
     value = this.executeInt(frameValue);
   } catch (UnexpectedResultException ex) {
     return SIMPLETYPES.expectBoolean(ex.getResult());
   }
   return SIMPLETYPES.expectBoolean(value);
 }
Ejemplo n.º 3
0
 @SlowPath
 protected int executeGeneric0(Object value0Value, Object value1Value) {
   if (SIMPLETYPES.isInteger(value0Value) && SIMPLETYPES.isInteger(value1Value)) {
     int value0ValueCast = SIMPLETYPES.asInteger(value0Value);
     int value1ValueCast = SIMPLETYPES.asInteger(value1Value);
     if (super.guard(value0ValueCast, value1ValueCast)) {
       return super.doSpecialized(value0ValueCast, value1ValueCast);
     }
   }
   return super.doGeneric(value0Value, value1Value);
 }