예제 #1
0
  static void emitReturn(
      AsmBuilder builder, SkinnyMethodAdapter mv, Class returnType, Class nativeIntType) {
    if (returnType.isPrimitive()) {

      if (long.class == returnType) {
        mv.lreturn();

      } else if (float.class == returnType) {
        mv.freturn();

      } else if (double.class == returnType) {
        mv.dreturn();

      } else if (void.class == returnType) {
        mv.voidreturn();

      } else {
        mv.ireturn();
      }

    } else {
      boxValue(builder, mv, returnType, nativeIntType);
      mv.areturn();
    }
  }
예제 #2
0
 static void emitReturnOp(SkinnyMethodAdapter mv, Class returnType) {
   if (!returnType.isPrimitive()) {
     mv.areturn();
   } else if (long.class == returnType) {
     mv.lreturn();
   } else if (float.class == returnType) {
     mv.freturn();
   } else if (double.class == returnType) {
     mv.dreturn();
   } else if (void.class == returnType) {
     mv.voidreturn();
   } else {
     mv.ireturn();
   }
 }