- variable6 = variable7;
- if (!UNTAG_Bool(variable6)) { fprintf(stderr, "Assert%s failed", " 'index' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___Array_____bra, LOCATE_opts, 229); nit_exit(1);}
- variable6 = variable3;
- variable6 = ATTR_array___Array____items(variable6) /*Array::_items*/;
- variable6 = UNBOX_NativeArray(variable6)[UNTAG_Int( variable5 /*index*/)];
- goto return_label17;
- return_label17: while(false);
- variable3 = variable6;
- variable4 = variable3;
- ((string___String___append_t)CALL(variable0,COLOR_abstract_collection___IndexedCollection___append))(variable0, variable4) /*String::append*/;
- variable5 = NEW_string___String___with_native(BOX_NativeString(")"), TAG_Int(1)); /*new String*/
- variable6 = variable5;
- ((string___String___append_t)CALL(variable0,COLOR_abstract_collection___IndexedCollection___append))(variable0, variable6) /*String::append*/;
- goto return_label16;
- } else { /*if*/
- variable0 = NEW_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
- goto return_label16;
- }
- return_label16: while(false);
- tracehead = trace.prev;
- return variable0;
-}
-void opts___OptionInt___init(val_t self, val_t param0, val_t param1, val_t param2, int* init_table) {
- struct trace_t trace = {NULL, NULL, 159, LOCATE_opts___OptionInt___init};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- variable0 = param0;
- variable1 = param1;
- /* check if p<Array[String] with p:String */
- if (( param2!=NIT_NULL) && !VAL_ISA( param2, COLOR_Array, ID_Array)) { fprintf(stderr, "Cast failled"); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___Array_____bra, LOCATE_opts, 159); nit_exit(1); } /*cast Array[String]*/;
- variable2 = param2;
- if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_OptionInt].i]) return;
- ((opts___OptionParameter___init_opt_t)CALL( self,COLOR_opts___OptionParameter___init_opt))( self, variable0 /*help*/, variable1 /*default*/, variable2 /*names*/, init_table /*YYY*/) /*OptionParameter::init_opt*/;
- init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_OptionInt].i] = 1;
- tracehead = trace.prev;
+ fra.me.REG[2] = ATTR_opts___OptionEnum____enum(fra.me.REG[0]);
+ fra.me.REG[0] = CALL_opts___Option___default_value(fra.me.REG[0])(fra.me.REG[0]);
+ REGB0 = TAG_Bool((fra.me.REG[0]!=NIT_NULL) && VAL_ISA(fra.me.REG[0], COLOR_Int, ID_Int)) /*cast VALUE*/;
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Cast failed");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_opts, 157);
+ nit_exit(1);
+ }
+ REGB0 = fra.me.REG[0];
+ REGB1 = TAG_Int(0);
+ REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1));
+ /* ./../lib/standard//collection//array.nit:233 */
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_length");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_array, 233);
+ nit_exit(1);
+ }
+ REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]);
+ REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
+ /* ./../lib/standard//collection//array.nit:233 */
+ } else {
+ REGB2 = TAG_Bool(false);
+ REGB1 = REGB2;
+ }
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ fprintf(stderr, "Assert %s failed", "'index'");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_array, 233);
+ nit_exit(1);
+ }
+ fra.me.REG[2] = ATTR_array___Array____items(fra.me.REG[2]);
+ REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ /* ./../lib/standard//collection//array.nit:234 */
+ if (UNTAG_Bool(REGB1)) {
+ fprintf(stderr, "Reciever is null");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_array, 234);
+ nit_exit(1);
+ }
+ fra.me.REG[2] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB0)];
+ /* ./../lib/standard//collection//array.nit:234 */
+ goto label2;
+ label2: while(0);
+ /* ./../lib/opts.nit:157 */
+ array___Array___add(fra.me.REG[1], fra.me.REG[2]);
+ if (!once_value_3) {
+ fra.me.REG[2] = BOX_NativeString(")");
+ REGB0 = TAG_Int(1);
+ fra.me.REG[2] = NEW_String_string___String___with_native(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;
+ array___Array___add(fra.me.REG[1], fra.me.REG[2]);
+ fra.me.REG[1] = CALL_string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
+ goto label4;
+ } else {
+ /* ./../lib/opts.nit:159 */
+ if (!once_value_5) {
+ fra.me.REG[2] = BOX_NativeString("");
+ REGB0 = TAG_Int(0);
+ fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB0);
+ once_value_5 = fra.me.REG[2];
+ register_static_object(&once_value_5);
+ } else fra.me.REG[2] = once_value_5;
+ fra.me.REG[1] = fra.me.REG[2];
+ goto label4;
+ }
+ label4: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[1];
+}
+val_t opts___OptionEnum___convert(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_opts;
+ fra.me.line = 148;
+ fra.me.meth = LOCATE_opts___OptionEnum___convert;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 2;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ REGB0 = TAG_Bool(ATTR_opts___OptionEnum____enum(fra.me.REG[0])!=NIT_NULL);
+ /* ./../lib/opts.nit:150 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_enum");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_opts, 150);
+ nit_exit(1);
+ }
+ fra.me.REG[0] = ATTR_opts___OptionEnum____enum(fra.me.REG[0]);
+ REGB0 = CALL_abstract_collection___SequenceRead___index_of(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
+ /* ./../lib/opts.nit:151 */
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return REGB0;
+}
+void opts___OptionEnum___init(val_t p0, val_t p1, val_t p2, val_t p3, val_t p4, int* init_table){
+ int itpos6 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_OptionEnum].i;
+ struct {struct stack_frame_t me; val_t MORE_REG[5];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t REGB2;
+ 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 */
+ if (init_table[itpos6]) return;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_opts;
+ fra.me.line = 141;
+ fra.me.meth = LOCATE_opts___OptionEnum___init;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 6;
+ 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;
+ fra.me.REG[2] = p2;
+ REGB0 = p3;
+ fra.me.REG[3] = p4;
+ REGB1 = TAG_Bool(VAL_ISA(fra.me.REG[3], COLOR_Array, ID_Array)) /*cast Array[String]*/;
+ /* ./../lib/opts.nit:141 */
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ fprintf(stderr, "Cast failed");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_opts, 141);
+ nit_exit(1);
+ }
+ REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
+ /* ./../lib/standard//collection//array.nit:23 */
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_length");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23);
+ nit_exit(1);
+ }
+ REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]);
+ REGB2 = TAG_Int(0);
+ REGB2 = TAG_Bool(UNTAG_Int(REGB1)>UNTAG_Int(REGB2));
+ /* ./../lib/opts.nit:143 */
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ fprintf(stderr, "Assert failed");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_opts, 143);
+ nit_exit(1);
+ }
+ fra.me.REG[4] = CALL_array___Collection___to_a(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./../lib/opts.nit:144 */
+ ATTR_opts___OptionEnum____enum(fra.me.REG[0]) = fra.me.REG[4];
+ REGB2 = TAG_Int(5);
+ fra.me.REG[4] = NEW_Array_array___Array___with_capacity(REGB2);
+ /* ./../lib/opts.nit:145 */
+ if (!once_value_1) {
+ fra.me.REG[5] = BOX_NativeString("");
+ REGB2 = TAG_Int(0);
+ fra.me.REG[5] = NEW_String_string___String___with_native(fra.me.REG[5], REGB2);
+ once_value_1 = fra.me.REG[5];
+ register_static_object(&once_value_1);
+ } else fra.me.REG[5] = once_value_1;
+ array___Array___add(fra.me.REG[4], fra.me.REG[5]);
+ array___Array___add(fra.me.REG[4], fra.me.REG[2]);
+ if (!once_value_2) {
+ fra.me.REG[2] = BOX_NativeString(" <");
+ REGB2 = TAG_Int(2);
+ fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB2);
+ once_value_2 = fra.me.REG[2];
+ register_static_object(&once_value_2);
+ } else fra.me.REG[2] = once_value_2;
+ array___Array___add(fra.me.REG[4], fra.me.REG[2]);
+ if (!once_value_3) {
+ fra.me.REG[2] = BOX_NativeString(", ");
+ REGB2 = TAG_Int(2);
+ fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB2);
+ 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] = CALL_string___Collection___join(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
+ array___Array___add(fra.me.REG[4], fra.me.REG[2]);
+ if (!once_value_4) {
+ fra.me.REG[2] = BOX_NativeString(">");
+ REGB2 = TAG_Int(1);
+ fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB2);
+ once_value_4 = fra.me.REG[2];
+ register_static_object(&once_value_4);
+ } else fra.me.REG[2] = once_value_4;
+ array___Array___add(fra.me.REG[4], fra.me.REG[2]);
+ fra.me.REG[4] = CALL_string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
+ CALL_opts___OptionParameter___init_opt(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[4], REGB0, fra.me.REG[3], init_table);
+ stack_frame_head = fra.me.prev;
+ init_table[itpos6] = 1;