void OC_global___reachable_method_analysis___Program___dump_unreachable_methods_5(struct stack_frame_t *closctx, val_t p0){
   struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
   val_t REGB0;
   val_t tmp;
     static val_t once_value_6; /* Once value */
     static val_t once_value_7; /* Once value */
   /* global/reachable_method_analysis.nit:41 */
   fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
   fra.me.file = LOCATE_global___reachable_method_analysis;
   fra.me.line = 41;
   fra.me.meth = LOCATE_global___reachable_method_analysis___Program___dump_unreachable_methods;
   fra.me.has_broke = 0;
   fra.me.REG_size = 3;
   fra.me.nitni_local_ref_head = NULL;
   fra.me.REG[0] = NIT_NULL;
   fra.me.REG[1] = NIT_NULL;
   fra.me.REG[2] = NIT_NULL;
   fra.me.REG[0] = p0;
   /* global/reachable_method_analysis.nit:42 */
   fra.me.REG[1] = CALL_global___reachable_method_analysis___Program___rma(closctx->REG[0])(closctx->REG[0]);
   REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
   if (UNTAG_Bool(REGB0)) {
     nit_abort("Reciever is null", NULL, LOCATE_global___reachable_method_analysis, 42);
   }
   REGB0 = CALL_global___reachable_method_analysis___ReachableMethodAnalysis___is_method_reachable(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
   REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
   if (UNTAG_Bool(REGB0)) {
     /* global/reachable_method_analysis.nit:43 */
     REGB0 = TAG_Int(3);
     fra.me.REG[1] = NEW_Array_standard___collection___array___Array___with_capacity(REGB0);
     if (!once_value_6) {
       fra.me.REG[2] = BOX_NativeString("");
       REGB0 = TAG_Int(0);
       fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB0);
       once_value_6 = fra.me.REG[2];
       register_static_object(&once_value_6);
     } else fra.me.REG[2] = once_value_6;
     fra.me.REG[2] = fra.me.REG[2];
     CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
     fra.me.REG[0] = CALL_metamodel___abstractmetamodel___MMLocalProperty___full_name(fra.me.REG[0])(fra.me.REG[0]);
     CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
     if (!once_value_7) {
       fra.me.REG[0] = BOX_NativeString("\n");
       REGB0 = TAG_Int(1);
       fra.me.REG[0] = NEW_String_standard___string___String___with_native(fra.me.REG[0], REGB0);
       once_value_7 = fra.me.REG[0];
       register_static_object(&once_value_7);
     } else fra.me.REG[0] = once_value_7;
     fra.me.REG[0] = fra.me.REG[0];
     CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
     fra.me.REG[1] = CALL_standard___string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
     CALL_standard___stream___OStream___write(closctx->REG[3])(closctx->REG[3], fra.me.REG[1]);
   }
   stack_frame_head = fra.me.prev;
   return;
 }
 void OC_global___reachable_as_init___Program___dump_reachable_as_init_methods_5(struct stack_frame_t *closctx, val_t p0, struct stack_frame_t *closctx_param, fun_t clos_fun0){
   struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
   val_t REGB0;
   fun_t CREG[1];
   val_t tmp;
     static val_t once_value_7; /* Once value */
     static val_t once_value_8; /* Once value */
   fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
   fra.me.file = LOCATE_global___reachable_as_init;
   fra.me.line = 0;
   fra.me.meth = LOCATE_global___reachable_as_init___Program___dump_reachable_as_init_methods;
   fra.me.has_broke = 0;
   fra.me.REG_size = 3;
   fra.me.nitni_local_ref_head = NULL;
   fra.me.REG[0] = NIT_NULL;
   fra.me.REG[1] = NIT_NULL;
   fra.me.REG[2] = NIT_NULL;
   fra.me.closure_ctx = closctx_param;
   fra.me.closure_funs = CREG;
   fra.me.REG[0] = p0;
   CREG[0] = clos_fun0;
   /* global/reachable_as_init.nit:32 */
   fra.me.REG[0] = CALL_metamodel___abstractmetamodel___MMLocalClass_____bra(closctx->REG[1])(closctx->REG[1], fra.me.REG[0]);
   /* global/reachable_as_init.nit:33 */
   fra.me.REG[1] = CALL_metamodel___abstractmetamodel___MMLocalProperty___global(fra.me.REG[0])(fra.me.REG[0]);
   REGB0 = CALL_metamodel___abstractmetamodel___MMGlobalProperty___is_init_for(fra.me.REG[1])(fra.me.REG[1], closctx->REG[1]);
   REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
   if (UNTAG_Bool(REGB0)) {
     goto label6;
   }
   /* global/reachable_as_init.nit:34 */
   REGB0 = TAG_Bool(VAL_ISA(fra.me.REG[0], COLOR_metamodel___abstractmetamodel___MMMethod, ID_metamodel___abstractmetamodel___MMMethod)) /*cast MMMethod*/;
   if (UNTAG_Bool(REGB0)) {
   } else {
     nit_abort("Assert failed", NULL, LOCATE_global___reachable_as_init, 34);
   }
   /* global/reachable_as_init.nit:35 */
   fra.me.REG[1] = CALL_global___reachable_as_init___Program___rai(closctx->REG[0])(closctx->REG[0]);
   REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
   if (UNTAG_Bool(REGB0)) {
     nit_abort("Reciever is null", NULL, LOCATE_global___reachable_as_init, 35);
   }
   REGB0 = CALL_global___reachable_as_init___ReachableAsInitAnalysis___is_method_reachable_as_init(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0], closctx->REG[1]);
   if (UNTAG_Bool(REGB0)) {
     /* global/reachable_as_init.nit:36 */
     REGB0 = TAG_Int(3);
     fra.me.REG[1] = NEW_Array_standard___collection___array___Array___with_capacity(REGB0);
     if (!once_value_7) {
       fra.me.REG[2] = BOX_NativeString("");
       REGB0 = TAG_Int(0);
       fra.me.REG[2] = NEW_String_standard___string___String___with_native(fra.me.REG[2], REGB0);
       once_value_7 = fra.me.REG[2];
       register_static_object(&once_value_7);
     } else fra.me.REG[2] = once_value_7;
     fra.me.REG[2] = fra.me.REG[2];
     CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
     fra.me.REG[0] = CALL_metamodel___abstractmetamodel___MMLocalProperty___full_name(fra.me.REG[0])(fra.me.REG[0]);
     CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
     if (!once_value_8) {
       fra.me.REG[0] = BOX_NativeString("\n");
       REGB0 = TAG_Int(1);
       fra.me.REG[0] = NEW_String_standard___string___String___with_native(fra.me.REG[0], REGB0);
       once_value_8 = fra.me.REG[0];
       register_static_object(&once_value_8);
     } else fra.me.REG[0] = once_value_8;
     fra.me.REG[0] = fra.me.REG[0];
     CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
     fra.me.REG[1] = CALL_standard___string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
     CALL_standard___stream___OStream___write(closctx->REG[2])(closctx->REG[2], fra.me.REG[1]);
   }
   label6: while(0);
   stack_frame_head = fra.me.prev;
   return;
 }
Esempio n. 3
0
void ffi___ffi_base___MMMethod___accept_ffi_visitor(val_t p0, val_t p1){
  struct {struct stack_frame_t me; val_t MORE_REG[5];} fra;
  val_t REGB0;
  val_t REGB1;
  val_t tmp;
      static val_t once_value_1; /* Once value */
      static val_t once_value_2; /* Once value */
      static val_t once_value_3; /* Once value */
      static val_t once_value_4; /* Once value */
      static val_t once_value_5; /* Once value */
  fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
  fra.me.file = LOCATE_ffi___ffi_base;
  fra.me.line = 55;
  fra.me.meth = LOCATE_ffi___ffi_base___MMMethod___accept_ffi_visitor;
  fra.me.has_broke = 0;
  fra.me.REG_size = 6;
  fra.me.nitni_local_ref_head = NULL;
  fra.me.REG[0] = NIT_NULL;
  fra.me.REG[1] = NIT_NULL;
  fra.me.REG[2] = NIT_NULL;
  fra.me.REG[3] = NIT_NULL;
  fra.me.REG[4] = NIT_NULL;
  fra.me.REG[5] = NIT_NULL;
  fra.me.REG[0] = p0;
  fra.me.REG[1] = p1;
  /* ffi/ffi_base.nit:59 */
  fra.me.REG[2] = CALL_syntax___extern_inline___MMMethod___extern_implementation(fra.me.REG[0])(fra.me.REG[0]);
  REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
  if (UNTAG_Bool(REGB0)) {
  } else {
    REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
    if (UNTAG_Bool(REGB1)) {
      REGB1 = TAG_Bool(0);
      REGB0 = REGB1;
    } else {
      REGB1 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
      REGB0 = REGB1;
    }
  }
  REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
  if (UNTAG_Bool(REGB0)) {
    /* ffi/ffi_base.nit:60 */
    fra.me.REG[2] = CALL_syntax___extern_inline___MMMethod___extern_implementation(fra.me.REG[0])(fra.me.REG[0]);
    REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
    if (UNTAG_Bool(REGB0)) {
      nit_abort("Reciever is null", NULL, LOCATE_ffi___ffi_base, 60);
    }
    fra.me.REG[2] = CALL_syntax___extern_inline___ExternCode___language(fra.me.REG[2])(fra.me.REG[2]);
    /* ffi/ffi_base.nit:61 */
    REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
    if (UNTAG_Bool(REGB0)) {
    } else {
      REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
      if (UNTAG_Bool(REGB1)) {
        REGB1 = TAG_Bool(0);
        REGB0 = REGB1;
      } else {
        REGB1 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
        REGB0 = REGB1;
      }
    }
    REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
    if (UNTAG_Bool(REGB0)) {
      /* ffi/ffi_base.nit:62 */
      fra.me.REG[3] = CALL_ffi___ffi_base___FFIVisitor___tc(fra.me.REG[1])(fra.me.REG[1]);
      REGB0 = TAG_Int(5);
      fra.me.REG[4] = NEW_Array_standard___collection___array___Array___with_capacity(REGB0);
      if (!once_value_1) {
        fra.me.REG[5] = BOX_NativeString("language \"");
        REGB0 = TAG_Int(10);
        fra.me.REG[5] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[5])(fra.me.REG[5], REGB0);
        once_value_1 = fra.me.REG[5];
        register_static_object(&once_value_1);
      } else fra.me.REG[5] = once_value_1;
      fra.me.REG[5] = fra.me.REG[5];
      CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[5]);
      CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[2]);
      if (!once_value_2) {
        fra.me.REG[2] = BOX_NativeString("\" used to implement ");
        REGB0 = TAG_Int(20);
        fra.me.REG[2] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[2])(fra.me.REG[2], REGB0);
        once_value_2 = fra.me.REG[2];
        register_static_object(&once_value_2);
      } else fra.me.REG[2] = once_value_2;
      fra.me.REG[2] = fra.me.REG[2];
      CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[2]);
      fra.me.REG[2] = CALL_metamodel___abstractmetamodel___MMLocalProperty___full_name(fra.me.REG[0])(fra.me.REG[0]);
      CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[2]);
      if (!once_value_3) {
        fra.me.REG[2] = BOX_NativeString(" is unknown.");
        REGB0 = TAG_Int(12);
        fra.me.REG[2] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[2])(fra.me.REG[2], REGB0);
        once_value_3 = fra.me.REG[2];
        register_static_object(&once_value_3);
      } else fra.me.REG[2] = once_value_3;
      fra.me.REG[2] = fra.me.REG[2];
      CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[2]);
      fra.me.REG[4] = CALL_standard___string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
      CALL_toolcontext___ToolContext___warning(fra.me.REG[3])(fra.me.REG[3], NIT_NULL, fra.me.REG[4]);
    } else {
      /* ffi/ffi_base.nit:64 */
      fra.me.REG[1] = CALL_ffi___ffi_base___FFIVisitor___tc(fra.me.REG[1])(fra.me.REG[1]);
      REGB0 = TAG_Int(3);
      fra.me.REG[4] = NEW_Array_standard___collection___array___Array___with_capacity(REGB0);
      if (!once_value_4) {
        fra.me.REG[3] = BOX_NativeString("please specify a language to implement ");
        REGB0 = TAG_Int(39);
        fra.me.REG[3] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[3])(fra.me.REG[3], REGB0);
        once_value_4 = fra.me.REG[3];
        register_static_object(&once_value_4);
      } else fra.me.REG[3] = once_value_4;
      fra.me.REG[3] = fra.me.REG[3];
      CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[3]);
      fra.me.REG[0] = CALL_metamodel___abstractmetamodel___MMLocalProperty___full_name(fra.me.REG[0])(fra.me.REG[0]);
      CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[0]);
      if (!once_value_5) {
        fra.me.REG[0] = BOX_NativeString(".");
        REGB0 = TAG_Int(1);
        fra.me.REG[0] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[0])(fra.me.REG[0], REGB0);
        once_value_5 = fra.me.REG[0];
        register_static_object(&once_value_5);
      } else fra.me.REG[0] = once_value_5;
      fra.me.REG[0] = fra.me.REG[0];
      CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[0]);
      fra.me.REG[4] = CALL_standard___string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
      CALL_toolcontext___ToolContext___warning(fra.me.REG[1])(fra.me.REG[1], NIT_NULL, fra.me.REG[4]);
    }
  }
  stack_frame_head = fra.me.prev;
  return;
}