/* This C file is generated by NIT to compile module opts. */
#include "opts._sep.h"
-val_t opts___Option___to_s(val_t self) {
- struct trace_t trace = {NULL, NULL, 54, LOCATE_opts___Option___to_s};
- val_t variable[3];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- variable[0] = self;
- variable[2] = variable[0];
- variable[2] = CALL_opts___Option___pretty(variable[2])(variable[2], TAG_Int(2)) /*Option::pretty*/;
- variable[1] = variable[2];
- goto return_label0;
- return_label0: while(false);
- tracehead = trace.prev;
- return variable[1];
-}
-val_t opts___Option___names(val_t self) {
- struct trace_t trace = {NULL, NULL, 16, LOCATE_opts___Option___names};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- tracehead = trace.prev;
- return ATTR_opts___Option____names( self) /*Option::_names*/;
-}
-val_t opts___Option___helptext(val_t self) {
- struct trace_t trace = {NULL, NULL, 22, LOCATE_opts___Option___helptext};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- tracehead = trace.prev;
- return ATTR_opts___Option____helptext( self) /*Option::_helptext*/;
-}
-val_t opts___Option___mandatory(val_t self) {
- struct trace_t trace = {NULL, NULL, 25, LOCATE_opts___Option___mandatory};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- tracehead = trace.prev;
- return ATTR_opts___Option____mandatory( self) /*Option::_mandatory*/;
-}
-void opts___Option___mandatory__eq(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 25, LOCATE_opts___Option___mandatory__eq};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- ATTR_opts___Option____mandatory( self) /*Option::_mandatory*/ = param0;
- tracehead = trace.prev;
- return;
+val_t opts___Option___to_s(val_t p0){
+ struct {struct stack_frame_t me;} 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 = 54;
+ fra.me.meth = LOCATE_opts___Option___to_s;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = TAG_Int(2);
+ fra.me.REG[0] = CALL_opts___Option___pretty(fra.me.REG[0])(fra.me.REG[0], REGB0);
+ /* ./../lib/opts.nit:55 */
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+val_t opts___Option___names(val_t p0){
+ struct {struct stack_frame_t me;} 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 = 16;
+ fra.me.meth = LOCATE_opts___Option___names;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = TAG_Bool(ATTR_opts___Option____names(fra.me.REG[0])!=NIT_NULL);
+ /* ./../lib/opts.nit:16 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_names");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_opts, 16);
+ nit_exit(1);
+ }
+ fra.me.REG[0] = ATTR_opts___Option____names(fra.me.REG[0]);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+val_t opts___Option___helptext(val_t p0){
+ struct {struct stack_frame_t me;} 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 = 22;
+ fra.me.meth = LOCATE_opts___Option___helptext;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = TAG_Bool(ATTR_opts___Option____helptext(fra.me.REG[0])!=NIT_NULL);
+ /* ./../lib/opts.nit:22 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_helptext");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_opts, 22);
+ nit_exit(1);
+ }
+ fra.me.REG[0] = ATTR_opts___Option____helptext(fra.me.REG[0]);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
}
-val_t opts___Option___context(val_t self) {
- struct trace_t trace = {NULL, NULL, 28, LOCATE_opts___Option___context};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- tracehead = trace.prev;
- return ATTR_opts___Option____context( self) /*Option::_context*/;
-}
-void opts___Option___context__eq(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 28, LOCATE_opts___Option___context__eq};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- ATTR_opts___Option____context( self) /*Option::_context*/ = param0;
- tracehead = trace.prev;
+val_t opts___Option___mandatory(val_t p0){
+ struct {struct stack_frame_t me;} 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 = 25;
+ fra.me.meth = LOCATE_opts___Option___mandatory;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = TAG_Bool(ATTR_opts___Option____mandatory(fra.me.REG[0])!=NIT_NULL);
+ /* ./../lib/opts.nit:25 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_mandatory");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_opts, 25);
+ nit_exit(1);
+ }
+ REGB0 = ATTR_opts___Option____mandatory(fra.me.REG[0]);
+ stack_frame_head = fra.me.prev;
+ return REGB0;
+}
+void opts___Option___mandatory__eq(val_t p0, val_t p1){
+ struct {struct stack_frame_t me;} 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 = 25;
+ fra.me.meth = LOCATE_opts___Option___mandatory__eq;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = p1;
+ /* ./../lib/opts.nit:25 */
+ ATTR_opts___Option____mandatory(fra.me.REG[0]) = REGB0;
+ stack_frame_head = fra.me.prev;
return;
}
-val_t opts___Option___value(val_t self) {
- struct trace_t trace = {NULL, NULL, 31, LOCATE_opts___Option___value};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- tracehead = trace.prev;
- return ATTR_opts___Option____value( self) /*Option::_value*/;
-}
-void opts___Option___value__eq(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 31, LOCATE_opts___Option___value__eq};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- ATTR_opts___Option____value( self) /*Option::_value*/ = param0;
- tracehead = trace.prev;
+void opts___Option___value__eq(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_opts;
+ fra.me.line = 28;
+ fra.me.meth = LOCATE_opts___Option___value__eq;
+ 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;
+ /* ./../lib/opts.nit:28 */
+ ATTR_opts___Option____value(fra.me.REG[0]) = fra.me.REG[1];
+ stack_frame_head = fra.me.prev;
return;
}
-val_t opts___Option___default_value(val_t self) {
- struct trace_t trace = {NULL, NULL, 34, LOCATE_opts___Option___default_value};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- tracehead = trace.prev;
- return ATTR_opts___Option____default_value( self) /*Option::_default_value*/;
-}
-void opts___Option___default_value__eq(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 34, LOCATE_opts___Option___default_value__eq};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- ATTR_opts___Option____default_value( self) /*Option::_default_value*/ = param0;
- tracehead = trace.prev;
+val_t opts___Option___value(val_t p0){
+ struct {struct stack_frame_t me;} 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 = 31;
+ fra.me.meth = LOCATE_opts___Option___value;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[0] = ATTR_opts___Option____value(fra.me.REG[0]);
+ REGB0 = TAG_Bool((fra.me.REG[0]==NIT_NULL) || VAL_ISA(fra.me.REG[0], COLOR_Object, ID_Object)) /*cast VALUE*/;
+ /* ./../lib/opts.nit:32 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Cast failed");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_opts, 32);
+ nit_exit(1);
+ }
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+val_t opts___Option___default_value(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_opts;
+ fra.me.line = 34;
+ fra.me.meth = LOCATE_opts___Option___default_value;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[0] = ATTR_opts___Option____default_value(fra.me.REG[0]);
+ /* ./../lib/opts.nit:34 */
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+void opts___Option___default_value__eq(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_opts;
+ fra.me.line = 34;
+ fra.me.meth = LOCATE_opts___Option___default_value__eq;
+ 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;
+ /* ./../lib/opts.nit:34 */
+ ATTR_opts___Option____default_value(fra.me.REG[0]) = fra.me.REG[1];
+ stack_frame_head = fra.me.prev;
return;
}
-void opts___Option___init_opt(val_t self, val_t param0, val_t param1, val_t param2, int* init_table) {
- struct trace_t trace = {NULL, NULL, 37, LOCATE_opts___Option___init_opt};
- val_t variable[7];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- variable[0] = self;
- variable[1] = param0;
- variable[2] = param1;
- variable[3] = param2;
- if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_Option].i]) return;
- variable[5] = TAG_Bool(( variable[3] /*names*/ == NIT_NULL /*null*/) || (( variable[3] /*names*/ != NIT_NULL) && UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[3] /*names*/)( variable[3] /*names*/, NIT_NULL /*null*/) /*AbstractArray::==*/)));
- if (UNTAG_Bool(variable[5])) { /*if*/
- variable[5] = variable[0];
- variable[6] = NEW_Array_array___Array___init(); /*new Array[String]*/
- ATTR_opts___Option____names(variable[5]) /*Option::_names*/ = variable[6];
- } else { /*if*/
- variable[5] = variable[0];
- variable[6] = CALL_array___Collection___to_a( variable[3] /*names*/)( variable[3] /*names*/) /*Collection::to_a*/;
- ATTR_opts___Option____names(variable[5]) /*Option::_names*/ = variable[6];
- }
- variable[5] = variable[0];
- ATTR_opts___Option____helptext(variable[5]) /*Option::_helptext*/ = variable[1] /*help*/;
- variable[5] = variable[0];
- ATTR_opts___Option____mandatory(variable[5]) /*Option::_mandatory*/ = TAG_Bool(false);
- variable[5] = variable[0];
- ATTR_opts___Option____default_value(variable[5]) /*Option::_default_value*/ = variable[2] /*default*/;
- variable[5] = variable[0];
- ATTR_opts___Option____value(variable[5]) /*Option::_value*/ = variable[2] /*default*/;
- return_label1: while(false);
- init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_Option].i] = 1;
- tracehead = trace.prev;
+void opts___Option___init_opt(val_t p0, val_t p1, val_t p2, val_t p3, int* init_table){
+ int itpos0 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_Option].i;
+ struct {struct stack_frame_t me; val_t MORE_REG[4];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t tmp;
+ if (init_table[itpos0]) return;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_opts;
+ fra.me.line = 37;
+ fra.me.meth = LOCATE_opts___Option___init_opt;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 5;
+ 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[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[2] = p2;
+ fra.me.REG[3] = p3;
+ REGB0 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
+ /* ./../lib/opts.nit:40 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ REGB1 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[3])(fra.me.REG[3], NIT_NULL);
+ REGB0 = REGB1;
+ }
+ }
+ if (UNTAG_Bool(REGB0)) {
+ fra.me.REG[4] = NEW_Array_array___Array___init();
+ /* ./../lib/opts.nit:41 */
+ ATTR_opts___Option____names(fra.me.REG[0]) = fra.me.REG[4];
+ } else {
+ REGB0 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
+ /* ./../lib/opts.nit:43 */
+ if (UNTAG_Bool(REGB0)) {
+ fprintf(stderr, "Reciever is null");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_opts, 43);
+ nit_exit(1);
+ }
+ fra.me.REG[3] = CALL_array___Collection___to_a(fra.me.REG[3])(fra.me.REG[3]);
+ ATTR_opts___Option____names(fra.me.REG[0]) = fra.me.REG[3];
+ }
+ /* ./../lib/opts.nit:45 */
+ ATTR_opts___Option____helptext(fra.me.REG[0]) = fra.me.REG[1];
+ REGB0 = TAG_Bool(false);
+ /* ./../lib/opts.nit:46 */
+ ATTR_opts___Option____mandatory(fra.me.REG[0]) = REGB0;
+ /* ./../lib/opts.nit:47 */
+ ATTR_opts___Option____default_value(fra.me.REG[0]) = fra.me.REG[2];
+ /* ./../lib/opts.nit:48 */
+ ATTR_opts___Option____value(fra.me.REG[0]) = fra.me.REG[2];
+ stack_frame_head = fra.me.prev;
+ init_table[itpos0] = 1;
return;
}
-void opts___Option___add_aliases(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 51, LOCATE_opts___Option___add_aliases};
- val_t variable[4];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- variable[0] = self;
- /* check if p<Array[String] with p:String */
- if (( param0!=NIT_NULL) && !VAL_ISA( param0, COLOR_Array, ID_Array)) { fprintf(stderr, "Cast failled"); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_opts___Option___add_aliases, LOCATE_opts, 52); nit_exit(1); } /*cast Array[String]*/;
- variable[1] = param0;
- variable[3] = variable[0];
- variable[3] = ATTR_opts___Option____names(variable[3]) /*Option::_names*/;
- CALL_abstract_collection___SimpleCollection___add_all(variable[3])(variable[3], variable[1] /*names*/) /*SimpleCollection::add_all*/;
- return_label2: while(false);
- tracehead = trace.prev;
+void opts___Option___add_aliases(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 = 51;
+ fra.me.meth = LOCATE_opts___Option___add_aliases;
+ 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(VAL_ISA(fra.me.REG[1], COLOR_Array, ID_Array)) /*cast Array[String]*/;
+ /* ./../lib/opts.nit:51 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Cast failed");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_opts, 51);
+ nit_exit(1);
+ }
+ REGB0 = TAG_Bool(ATTR_opts___Option____names(fra.me.REG[0])!=NIT_NULL);
+ /* ./../lib/opts.nit:52 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_names");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_opts, 52);
+ nit_exit(1);
+ }
+ fra.me.REG[0] = ATTR_opts___Option____names(fra.me.REG[0]);
+ CALL_abstract_collection___SimpleCollection___add_all(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
+ stack_frame_head = fra.me.prev;
return;
}
-val_t opts___Option___pretty(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 57, LOCATE_opts___Option___pretty};
- val_t variable[6];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- variable[0] = self;
- variable[1] = param0;
- variable[4] = NEW_String_string___String___with_native(BOX_NativeString(" "), TAG_Int(2)); /*new String*/
- variable[3] = variable[4];
- variable[4] = variable[0];
- variable[4] = ATTR_opts___Option____names(variable[4]) /*Option::_names*/;
- variable[5] = NEW_String_string___String___with_native(BOX_NativeString(", "), TAG_Int(2)); /*new String*/
- variable[4] = CALL_string___Collection___join(variable[4])(variable[4], variable[5]) /*Collection::join*/;
- CALL_abstract_collection___IndexedCollection___append( variable[3] /*text*/)( variable[3] /*text*/, variable[4]) /*String::append*/;
- variable[4] = NEW_String_string___String___with_native(BOX_NativeString(" "), TAG_Int(2)); /*new String*/
- CALL_abstract_collection___IndexedCollection___append( variable[3] /*text*/)( variable[3] /*text*/, variable[4]) /*String::append*/;
- variable[5] = CALL_abstract_collection___Collection___length( variable[3] /*text*/)( variable[3] /*text*/) /*AbstractArray::length*/;
- variable[5] = TAG_Int(UNTAG_Int( variable[1] /*off*/)-UNTAG_Int(variable[5]));
- variable[4] = variable[5];
- variable[5] = TAG_Bool(UNTAG_Int( variable[4] /*rest*/)>UNTAG_Int( TAG_Int(0)));
- if (UNTAG_Bool(variable[5])) { /*if*/
- variable[5] = NEW_String_string___String___with_native(BOX_NativeString(" "), TAG_Int(1)); /*new String*/
- variable[5] = CALL_string___String_____star(variable[5])(variable[5], variable[4] /*rest*/) /*String::**/;
- CALL_abstract_collection___IndexedCollection___append( variable[3] /*text*/)( variable[3] /*text*/, variable[5]) /*String::append*/;
- }
- variable[5] = variable[0];
- variable[5] = CALL_opts___Option___helptext(variable[5])(variable[5]) /*Option::helptext*/;
- CALL_abstract_collection___IndexedCollection___append( variable[3] /*text*/)( variable[3] /*text*/, variable[5]) /*String::append*/;
- variable[2] = variable[3] /*text*/;
- goto return_label3;
- return_label3: while(false);
- tracehead = trace.prev;
- return variable[2];
-}
-val_t opts___Option___pretty_default(val_t self) {
- struct trace_t trace = {NULL, NULL, 70, LOCATE_opts___Option___pretty_default};
- val_t variable[9];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- variable[0] = self;
- variable[2] = variable[0];
- variable[2] = CALL_opts___Option___default_value(variable[2])(variable[2]) /*Option::default_value*/;
- variable[2] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[2] == NIT_NULL /*null*/) || ((variable[2] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[2])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[2], NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[2])(variable[2], NIT_NULL /*null*/) /*Object::==*/)))))));
- if (UNTAG_Bool(variable[2])) { /*if*/
- variable[2] = NEW_Array_array___Array___with_capacity(TAG_Int(3)); /*new Array[String]*/
- variable[3] = NEW_String_string___String___with_native(BOX_NativeString(" ("), TAG_Int(2)); /*new String*/
- variable[4] = variable[3];
- CALL_abstract_collection___SimpleCollection___add(variable[2])(variable[2], variable[4]) /*AbstractArray::add*/;
- variable[5] = variable[0];
- variable[5] = CALL_opts___Option___default_value(variable[5])(variable[5]) /*Option::default_value*/;
- variable[6] = variable[5];
- variable[6] = CALL_string___Object___to_s(variable[6])(variable[6]) /*Object::to_s*/;
- CALL_abstract_collection___SimpleCollection___add(variable[2])(variable[2], variable[6]) /*AbstractArray::add*/;
- variable[7] = NEW_String_string___String___with_native(BOX_NativeString(")"), TAG_Int(1)); /*new String*/
- variable[8] = variable[7];
- CALL_abstract_collection___SimpleCollection___add(variable[2])(variable[2], variable[8]) /*AbstractArray::add*/;
- variable[2] = CALL_string___Object___to_s(variable[2])(variable[2]) /*Object::to_s*/;
- variable[1] = variable[2];
- goto return_label4;
- }
- variable[2] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
- variable[1] = variable[2];
- goto return_label4;
- return_label4: while(false);
- tracehead = trace.prev;
- return variable[1];
-}
-void opts___Option___read_param(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 78, LOCATE_opts___Option___read_param};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
+val_t opts___Option___pretty(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[3];} 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 */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_opts;
+ fra.me.line = 57;
+ fra.me.meth = LOCATE_opts___Option___pretty;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 4;
+ 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[0] = p0;
+ REGB0 = p1;
+ /* ./../lib/opts.nit:60 */
+ if (!once_value_1) {
+ fra.me.REG[1] = BOX_NativeString(" ");
+ REGB1 = TAG_Int(2);
+ fra.me.REG[1] = NEW_String_string___String___with_native(fra.me.REG[1], REGB1);
+ once_value_1 = fra.me.REG[1];
+ register_static_object(&once_value_1);
+ } else fra.me.REG[1] = once_value_1;
+ fra.me.REG[1] = NEW_Buffer_string___Buffer___from(fra.me.REG[1]);
+ REGB1 = TAG_Bool(ATTR_opts___Option____names(fra.me.REG[0])!=NIT_NULL);
+ /* ./../lib/opts.nit:61 */
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_names");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_opts, 61);
+ nit_exit(1);
+ }
+ fra.me.REG[2] = ATTR_opts___Option____names(fra.me.REG[0]);
+ if (!once_value_2) {
+ fra.me.REG[3] = BOX_NativeString(", ");
+ REGB1 = TAG_Int(2);
+ fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB1);
+ once_value_2 = fra.me.REG[3];
+ register_static_object(&once_value_2);
+ } else fra.me.REG[3] = once_value_2;
+ fra.me.REG[3] = CALL_string___Collection___join(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+ CALL_abstract_collection___Sequence___append(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[3]);
+ /* ./../lib/opts.nit:62 */
+ if (!once_value_3) {
+ fra.me.REG[3] = BOX_NativeString(" ");
+ REGB1 = TAG_Int(2);
+ fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB1);
+ once_value_3 = fra.me.REG[3];
+ register_static_object(&once_value_3);
+ } else fra.me.REG[3] = once_value_3;
+ CALL_abstract_collection___Sequence___append(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[3]);
+ 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]);
+ REGB1 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB1));
+ REGB0 = TAG_Int(0);
+ REGB0 = TAG_Bool(UNTAG_Int(REGB1)>UNTAG_Int(REGB0));
+ /* ./../lib/opts.nit:64 */
+ if (UNTAG_Bool(REGB0)) {
+ if (!once_value_4) {
+ fra.me.REG[3] = BOX_NativeString(" ");
+ REGB0 = TAG_Int(1);
+ fra.me.REG[3] = NEW_String_string___String___with_native(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] = CALL_string___String_____star(fra.me.REG[3])(fra.me.REG[3], REGB1);
+ CALL_abstract_collection___Sequence___append(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[3]);
+ }
+ fra.me.REG[0] = CALL_opts___Option___helptext(fra.me.REG[0])(fra.me.REG[0]);
+ /* ./../lib/opts.nit:65 */
+ CALL_abstract_collection___Sequence___append(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
+ fra.me.REG[1] = CALL_string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./../lib/opts.nit:67 */
+ goto label5;
+ label5: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[1];
+}
+val_t opts___Option___pretty_default(val_t p0){
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} 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_4; /* Once value */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_opts;
+ fra.me.line = 70;
+ fra.me.meth = LOCATE_opts___Option___pretty_default;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 3;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = CALL_opts___Option___default_value(fra.me.REG[0])(fra.me.REG[0]);
+ REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
+ /* ./../lib/opts.nit:72 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[1])(fra.me.REG[1], NIT_NULL);
+ REGB0 = REGB1;
+ }
+ }
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ if (UNTAG_Bool(REGB0)) {
+ REGB0 = TAG_Int(3);
+ fra.me.REG[1] = NEW_Array_array___Array___with_capacity(REGB0);
+ /* ./../lib/opts.nit:73 */
+ if (!once_value_1) {
+ fra.me.REG[2] = BOX_NativeString(" (");
+ REGB0 = TAG_Int(2);
+ fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB0);
+ once_value_1 = fra.me.REG[2];
+ register_static_object(&once_value_1);
+ } else fra.me.REG[2] = once_value_1;
+ array___Array___add(fra.me.REG[1], fra.me.REG[2]);
+ fra.me.REG[0] = CALL_opts___Option___default_value(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[0] = CALL_string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
+ array___Array___add(fra.me.REG[1], fra.me.REG[0]);
+ if (!once_value_2) {
+ fra.me.REG[0] = BOX_NativeString(")");
+ REGB0 = TAG_Int(1);
+ fra.me.REG[0] = NEW_String_string___String___with_native(fra.me.REG[0], REGB0);
+ once_value_2 = fra.me.REG[0];
+ register_static_object(&once_value_2);
+ } else fra.me.REG[0] = once_value_2;
+ array___Array___add(fra.me.REG[1], fra.me.REG[0]);
+ fra.me.REG[1] = CALL_string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
+ goto label3;
+ }
+ /* ./../lib/opts.nit:75 */
+ if (!once_value_4) {
+ fra.me.REG[0] = BOX_NativeString("");
+ REGB0 = TAG_Int(0);
+ fra.me.REG[0] = NEW_String_string___String___with_native(fra.me.REG[0], REGB0);
+ once_value_4 = fra.me.REG[0];
+ register_static_object(&once_value_4);
+ } else fra.me.REG[0] = once_value_4;
+ fra.me.REG[1] = fra.me.REG[0];
+ goto label3;
+ label3: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[1];
+}
+void opts___Option___read_param(val_t p0, val_t p1){
+ struct {struct stack_frame_t me;} fra;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_opts;
+ fra.me.line = 78;
+ fra.me.meth = LOCATE_opts___Option___read_param;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 0;
+ /* ./../lib/opts.nit:78 */
fprintf(stderr, "Deferred method called");
fprintf(stderr, " (%s:%d)\n", LOCATE_opts, 78);
nit_exit(1);
- tracehead = trace.prev;
+ stack_frame_head = fra.me.prev;
+ return;
+}
+val_t opts___OptionText___to_s(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_opts;
+ fra.me.line = 88;
+ fra.me.meth = LOCATE_opts___OptionText___to_s;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[0] = CALL_opts___Option___helptext(fra.me.REG[0])(fra.me.REG[0]);
+ /* ./../lib/opts.nit:88 */
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+val_t opts___OptionText___pretty(val_t p0, val_t p1){
+ struct {struct stack_frame_t me;} 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 = 86;
+ fra.me.meth = LOCATE_opts___OptionText___pretty;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = p1;
+ fra.me.REG[0] = CALL_string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
+ /* ./../lib/opts.nit:86 */
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+void opts___OptionText___init(val_t p0, val_t p1, int* init_table){
+ int itpos1 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_OptionText].i;
+ struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+ val_t tmp;
+ if (init_table[itpos1]) return;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_opts;
+ fra.me.line = 84;
+ fra.me.meth = LOCATE_opts___OptionText___init;
+ 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;
+ /* ./../lib/opts.nit:84 */
+ CALL_opts___Option___init_opt(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], NIT_NULL, NIT_NULL, init_table);
+ stack_frame_head = fra.me.prev;
+ init_table[itpos1] = 1;
return;
}
-val_t opts___OptionText___to_s(val_t self) {
- struct trace_t trace = {NULL, NULL, 88, LOCATE_opts___OptionText___to_s};
- val_t variable[3];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- variable[0] = self;
- variable[2] = variable[0];
- variable[2] = CALL_opts___Option___helptext(variable[2])(variable[2]) /*Option::helptext*/;
- variable[1] = variable[2];
- goto return_label5;
- return_label5: while(false);
- tracehead = trace.prev;
- return variable[1];
-}
-val_t opts___OptionText___pretty(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 86, LOCATE_opts___OptionText___pretty};
- val_t variable[4];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- variable[0] = self;
- variable[1] = param0;
- variable[3] = variable[0];
- variable[3] = CALL_string___Object___to_s(variable[3])(variable[3]) /*OptionText::to_s*/;
- variable[2] = variable[3];
- goto return_label6;
- return_label6: while(false);
- tracehead = trace.prev;
- return variable[2];
-}
-void opts___OptionText___init(val_t self, val_t param0, int* init_table) {
- struct trace_t trace = {NULL, NULL, 84, LOCATE_opts___OptionText___init};
- val_t variable[4];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- variable[0] = self;
- variable[1] = param0;
- if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_OptionText].i]) return;
- variable[3] = variable[0];
- CALL_opts___Option___init_opt(variable[3])(variable[3], variable[1] /*text*/, NIT_NULL /*null*/, NIT_NULL /*null*/, init_table /*YYY*/) /*Option::init_opt*/;
- return_label7: while(false);
- init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_OptionText].i] = 1;
- tracehead = trace.prev;
+void opts___OptionBool___read_param(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 = 97;
+ fra.me.meth = LOCATE_opts___OptionBool___read_param;
+ 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(true);
+ /* ./../lib/opts.nit:97 */
+ CALL_opts___Option___value__eq(fra.me.REG[0])(fra.me.REG[0], REGB0);
+ stack_frame_head = fra.me.prev;
return;
}
-void opts___OptionBool___read_param(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 97, LOCATE_opts___OptionBool___read_param};
- val_t variable[4];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- variable[0] = self;
- variable[1] = param0;
- variable[3] = variable[0];
- CALL_opts___Option___value__eq(variable[3])(variable[3], TAG_Bool(true)) /*Option::value=*/;
- return_label8: while(false);
- tracehead = trace.prev;
+void opts___OptionBool___init(val_t p0, val_t p1, val_t p2, int* init_table){
+ int itpos2 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_OptionBool].i;
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
+ val_t REGB0;
+ val_t tmp;
+ if (init_table[itpos2]) return;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_opts;
+ fra.me.line = 95;
+ fra.me.meth = LOCATE_opts___OptionBool___init;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 3;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[2] = p2;
+ REGB0 = TAG_Bool(VAL_ISA(fra.me.REG[2], COLOR_Array, ID_Array)) /*cast Array[String]*/;
+ /* ./../lib/opts.nit:95 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Cast failed");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_opts, 95);
+ nit_exit(1);
+ }
+ REGB0 = TAG_Bool(false);
+ CALL_opts___Option___init_opt(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], REGB0, fra.me.REG[2], init_table);
+ stack_frame_head = fra.me.prev;
+ init_table[itpos2] = 1;
return;
}
-void opts___OptionBool___init(val_t self, val_t param0, val_t param1, int* init_table) {
- struct trace_t trace = {NULL, NULL, 95, LOCATE_opts___OptionBool___init};
- val_t variable[5];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- variable[0] = self;
- variable[1] = param0;
- /* check if p<Array[String] with p:String */
- if (( param1!=NIT_NULL) && !VAL_ISA( param1, COLOR_Array, ID_Array)) { fprintf(stderr, "Cast failled"); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_opts___OptionBool___init, LOCATE_opts, 95); nit_exit(1); } /*cast Array[String]*/;
- variable[2] = param1;
- if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_OptionBool].i]) return;
- variable[4] = variable[0];
- CALL_opts___Option___init_opt(variable[4])(variable[4], variable[1] /*help*/, TAG_Bool(false), variable[2] /*names*/, init_table /*YYY*/) /*Option::init_opt*/;
- return_label9: while(false);
- init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_OptionBool].i] = 1;
- tracehead = trace.prev;
+void opts___OptionCount___read_param(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 = 106;
+ fra.me.meth = LOCATE_opts___OptionCount___read_param;
+ 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;
+ fra.me.REG[1] = CALL_opts___Option___value(fra.me.REG[0])(fra.me.REG[0]);
+ REGB0 = TAG_Int(1);
+ REGB0 = TAG_Int(UNTAG_Int(fra.me.REG[1])+UNTAG_Int(REGB0));
+ /* ./../lib/opts.nit:106 */
+ CALL_opts___Option___value__eq(fra.me.REG[0])(fra.me.REG[0], REGB0);
+ stack_frame_head = fra.me.prev;
return;
}
-void opts___OptionParameter___read_param(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 105, LOCATE_opts___OptionParameter___read_param};
- val_t variable[6];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- variable[0] = self;
- variable[1] = param0;
- variable[3] = variable[0];
- variable[3] = CALL_opts___Option___context(variable[3])(variable[3]) /*Option::context*/;
- variable[3] = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable[3] == NIT_NULL /*null*/) || ((variable[3] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[3])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[3], NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[3])(variable[3], NIT_NULL /*null*/) /*Object::==*/)))))));
- if (!UNTAG_Bool(variable[3])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_opts___OptionParameter___read_param, LOCATE_opts, 107); nit_exit(1);}
- variable[3] = CALL_abstract_collection___Iterator___is_ok( variable[1] /*it*/)( variable[1] /*it*/) /*Iterator::is_ok*/;
- if (UNTAG_Bool(variable[3])) { /*if*/
- variable[3] = variable[0];
- variable[4] = variable[0];
- variable[5] = CALL_abstract_collection___Iterator___item( variable[1] /*it*/)( variable[1] /*it*/) /*Iterator::item*/;
- variable[4] = CALL_opts___OptionParameter___convert(variable[4])(variable[4], variable[5]) /*OptionParameter::convert*/;
- CALL_opts___Option___value__eq(variable[3])(variable[3], variable[4]) /*Option::value=*/;
- CALL_abstract_collection___Iterator___next( variable[1] /*it*/)( variable[1] /*it*/) /*Iterator::next*/;
- } else { /*if*/
- }
- return_label10: while(false);
- tracehead = trace.prev;
+void opts___OptionCount___init(val_t p0, val_t p1, val_t p2, int* init_table){
+ int itpos3 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_OptionCount].i;
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
+ val_t REGB0;
+ val_t tmp;
+ if (init_table[itpos3]) return;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_opts;
+ fra.me.line = 104;
+ fra.me.meth = LOCATE_opts___OptionCount___init;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 3;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[2] = p2;
+ REGB0 = TAG_Bool(VAL_ISA(fra.me.REG[2], COLOR_Array, ID_Array)) /*cast Array[String]*/;
+ /* ./../lib/opts.nit:104 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Cast failed");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_opts, 104);
+ nit_exit(1);
+ }
+ REGB0 = TAG_Int(0);
+ CALL_opts___Option___init_opt(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], REGB0, fra.me.REG[2], init_table);
+ stack_frame_head = fra.me.prev;
+ init_table[itpos3] = 1;
+ return;
+}
+void opts___OptionParameter___read_param(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} 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 = 114;
+ fra.me.meth = LOCATE_opts___OptionParameter___read_param;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 3;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./../lib/opts.nit:116 */
+ if (UNTAG_Bool(REGB0)) {
+ fra.me.REG[2] = CALL_abstract_collection___Iterator___item(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[2] = CALL_opts___OptionParameter___convert(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
+ /* ./../lib/opts.nit:117 */
+ CALL_opts___Option___value__eq(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
+ /* ./../lib/opts.nit:118 */
+ CALL_abstract_collection___Iterator___next(fra.me.REG[1])(fra.me.REG[1]);
+ }
+ stack_frame_head = fra.me.prev;
return;
}
-val_t opts___OptionParameter___convert(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 103, LOCATE_opts___OptionParameter___convert};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
+val_t opts___OptionParameter___convert(val_t p0, val_t p1){
+ struct {struct stack_frame_t me;} fra;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_opts;
+ fra.me.line = 112;
+ fra.me.meth = LOCATE_opts___OptionParameter___convert;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 0;
+ /* ./../lib/opts.nit:112 */
fprintf(stderr, "Deferred method called");
- fprintf(stderr, " (%s:%d)\n", LOCATE_opts, 103);
+ fprintf(stderr, " (%s:%d)\n", LOCATE_opts, 112);
nit_exit(1);
- tracehead = trace.prev;
+ stack_frame_head = fra.me.prev;
return NIT_NULL;
}
-void opts___OptionParameter___init_opt(val_t self, val_t param0, val_t param1, val_t param2, int* init_table) {
- struct trace_t trace = {NULL, NULL, 116, LOCATE_opts___OptionParameter___init_opt};
- val_t variable[5];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- variable[0] = self;
- variable[1] = param0;
- variable[2] = param1;
- variable[3] = param2;
- if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_OptionParameter].i]) return;
- CALL_opts___Option___init_opt(variable[0])(variable[0], variable[1], variable[2], variable[3], init_table /*YYY*/) /*Option::init_opt*/;
- return_label11: while(false);
- init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_OptionParameter].i] = 1;
- tracehead = trace.prev;
+void opts___OptionParameter___init_opt(val_t p0, val_t p1, val_t p2, val_t p3, int* init_table){
+ int itpos4 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_OptionParameter].i;
+ struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
+ val_t tmp;
+ if (init_table[itpos4]) return;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_opts;
+ fra.me.line = 124;
+ fra.me.meth = LOCATE_opts___OptionParameter___init_opt;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 4;
+ 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[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[2] = p2;
+ fra.me.REG[3] = p3;
+ /* ./../lib/opts.nit:124 */
+ CALL_opts___Option___init_opt(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], fra.me.REG[2], fra.me.REG[3], init_table);
+ stack_frame_head = fra.me.prev;
+ init_table[itpos4] = 1;
return;
}
-val_t opts___OptionString___convert(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 125, LOCATE_opts___OptionString___convert};
- val_t variable[3];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- variable[0] = self;
- variable[1] = param0;
- variable[2] = variable[1] /*str*/;
- goto return_label12;
- return_label12: while(false);
- tracehead = trace.prev;
- return variable[2];
-}
-void opts___OptionString___init(val_t self, val_t param0, val_t param1, int* init_table) {
- struct trace_t trace = {NULL, NULL, 123, LOCATE_opts___OptionString___init};
- val_t variable[5];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- variable[0] = self;
- variable[1] = param0;
- /* check if p<Array[String] with p:String */
- if (( param1!=NIT_NULL) && !VAL_ISA( param1, COLOR_Array, ID_Array)) { fprintf(stderr, "Cast failled"); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_opts___OptionString___init, LOCATE_opts, 123); nit_exit(1); } /*cast Array[String]*/;
- variable[2] = param1;
- if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_OptionString].i]) return;
- variable[4] = variable[0];
- CALL_opts___OptionParameter___init_opt(variable[4])(variable[4], variable[1] /*help*/, NIT_NULL /*null*/, variable[2] /*names*/, init_table /*YYY*/) /*OptionParameter::init_opt*/;
- return_label13: while(false);
- init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_OptionString].i] = 1;
- tracehead = trace.prev;
+val_t opts___OptionString___convert(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_opts;
+ fra.me.line = 133;
+ fra.me.meth = LOCATE_opts___OptionString___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;
+ /* ./../lib/opts.nit:133 */
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[1];
+}
+void opts___OptionString___init(val_t p0, val_t p1, val_t p2, int* init_table){
+ int itpos5 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_OptionString].i;
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
+ val_t REGB0;
+ val_t tmp;
+ if (init_table[itpos5]) return;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_opts;
+ fra.me.line = 131;
+ fra.me.meth = LOCATE_opts___OptionString___init;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 3;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[2] = p2;
+ REGB0 = TAG_Bool(VAL_ISA(fra.me.REG[2], COLOR_Array, ID_Array)) /*cast Array[String]*/;
+ /* ./../lib/opts.nit:131 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Cast failed");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_opts, 131);
+ nit_exit(1);
+ }
+ CALL_opts___OptionParameter___init_opt(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], NIT_NULL, fra.me.REG[2], init_table);
+ stack_frame_head = fra.me.prev;
+ init_table[itpos5] = 1;
return;
}
-val_t opts___OptionEnum___pretty_default(val_t self) {
- struct trace_t trace = {NULL, NULL, 146, LOCATE_opts___OptionEnum___pretty_default};
- val_t variable[12];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- variable[0] = self;
- variable[2] = variable[0];
- variable[2] = CALL_opts___Option___default_value(variable[2])(variable[2]) /*Option::default_value*/;
- variable[2] = TAG_Bool((variable[2])!=( NIT_NULL /*null*/));
- if (UNTAG_Bool(variable[2])) { /*if*/
- variable[2] = NEW_Array_array___Array___with_capacity(TAG_Int(3)); /*new Array[String]*/
- variable[3] = NEW_String_string___String___with_native(BOX_NativeString(" ("), TAG_Int(2)); /*new String*/
- variable[4] = variable[3];
- CALL_abstract_collection___SimpleCollection___add(variable[2])(variable[2], variable[4]) /*AbstractArray::add*/;
- variable[5] = variable[0];
- variable[5] = ATTR_opts___OptionEnum____enum(variable[5]) /*OptionEnum::_enum*/;
- variable[6] = variable[0];
- variable[6] = CALL_opts___Option___default_value(variable[6])(variable[6]) /*Option::default_value*/;
- variable[7] = variable[5];
- variable[8] = variable[6];
- variable[10] = TAG_Bool(UNTAG_Int( variable[8] /*index*/)>=UNTAG_Int( TAG_Int(0)));
- variable[11] = variable[10];
- if (UNTAG_Bool(variable[11])) { /* and */
- variable[11] = variable[7];
- variable[11] = ATTR_array___AbstractArray____length(variable[11]) /*AbstractArray::_length*/;
- variable[11] = TAG_Bool(UNTAG_Int( variable[8] /*index*/)<UNTAG_Int(variable[11]));
+val_t opts___OptionEnum___pretty_default(val_t p0){
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} 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_3; /* 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_opts;
+ fra.me.line = 154;
+ fra.me.meth = LOCATE_opts___OptionEnum___pretty_default;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 3;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = CALL_opts___Option___default_value(fra.me.REG[0])(fra.me.REG[0]);
+ REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
+ /* ./../lib/opts.nit:156 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ } else {
+ REGB1 = TAG_Bool((fra.me.REG[1])==(NIT_NULL));
+ REGB0 = REGB1;
+ /* ./../lib/opts.nit:156 */
+ }
+ }
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ if (UNTAG_Bool(REGB0)) {
+ REGB0 = TAG_Int(3);
+ fra.me.REG[1] = NEW_Array_array___Array___with_capacity(REGB0);
+ /* ./../lib/opts.nit:157 */
+ if (!once_value_1) {
+ fra.me.REG[2] = BOX_NativeString(" (");
+ REGB0 = TAG_Int(2);
+ fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB0);
+ once_value_1 = fra.me.REG[2];
+ register_static_object(&once_value_1);
+ } else fra.me.REG[2] = once_value_1;
+ array___Array___add(fra.me.REG[1], fra.me.REG[2]);
+ REGB0 = TAG_Bool(ATTR_opts___OptionEnum____enum(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_enum");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_opts, 157);
+ nit_exit(1);
}
- variable[10] = variable[11];
- if (!UNTAG_Bool(variable[10])) { fprintf(stderr, "Assert%s failed", " 'index' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___Array_____bra, LOCATE_opts, 229); nit_exit(1);}
- variable[10] = variable[7];
- variable[10] = ATTR_array___Array____items(variable[10]) /*Array::_items*/;
- variable[10] = UNBOX_NativeArray(variable[10])[UNTAG_Int( variable[8] /*index*/)];
- variable[9] = variable[10];
- goto return_label15;
- return_label15: while(false);
- variable[5] = variable[9];
- variable[6] = variable[5];
- CALL_abstract_collection___SimpleCollection___add(variable[2])(variable[2], variable[6]) /*AbstractArray::add*/;
- variable[7] = NEW_String_string___String___with_native(BOX_NativeString(")"), TAG_Int(1)); /*new String*/
- variable[8] = variable[7];
- CALL_abstract_collection___SimpleCollection___add(variable[2])(variable[2], variable[8]) /*AbstractArray::add*/;
- variable[2] = CALL_string___Object___to_s(variable[2])(variable[2]) /*Object::to_s*/;
- variable[1] = variable[2];
- goto return_label14;
- } else { /*if*/
- variable[2] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
- variable[1] = variable[2];
- goto return_label14;
- }
- return_label14: while(false);
- tracehead = trace.prev;
- return variable[1];
-}
-val_t opts___OptionEnum___convert(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 140, LOCATE_opts___OptionEnum___convert};
- val_t variable[5];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- variable[0] = self;
- variable[1] = param0;
- variable[4] = variable[0];
- variable[4] = ATTR_opts___OptionEnum____enum(variable[4]) /*OptionEnum::_enum*/;
- variable[4] = CALL_abstract_collection___IndexedCollection___index_of(variable[4])(variable[4], variable[1] /*str*/) /*AbstractArray::index_of*/;
- variable[3] = variable[4];
- variable[2] = variable[3] /*id*/;
- goto return_label16;
- return_label16: while(false);
- tracehead = trace.prev;
- return variable[2];
-}
-void opts___OptionEnum___init(val_t self, val_t param0, val_t param1, val_t param2, val_t param3, int* init_table) {
- struct trace_t trace = {NULL, NULL, 133, LOCATE_opts___OptionEnum___init};
- val_t variable[17];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- variable[0] = self;
- variable[1] = param0;
- variable[2] = param1;
- variable[3] = param2;
- /* check if p<Array[String] with p:String */
- if (( param3!=NIT_NULL) && !VAL_ISA( param3, COLOR_Array, ID_Array)) { fprintf(stderr, "Cast failled"); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_opts___OptionEnum___init, LOCATE_opts, 133); nit_exit(1); } /*cast Array[String]*/;
- variable[4] = param3;
- if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_OptionEnum].i]) return;
- variable[6] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[1] /*enum*/ == NIT_NULL /*null*/) || (( variable[1] /*enum*/ != NIT_NULL) && ((CALL_kernel___Object_____eqeq( variable[1] /*enum*/)==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[1] /*enum*/, NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[1] /*enum*/)( variable[1] /*enum*/, NIT_NULL /*null*/) /*Object::==*/)))))));
- variable[7] = variable[6];
- if (UNTAG_Bool(variable[7])) { /* and */
- variable[7] = CALL_abstract_collection___Collection___length( variable[1] /*enum*/)( variable[1] /*enum*/) /*AbstractArray::length*/;
- variable[7] = TAG_Bool(UNTAG_Int(variable[7])>UNTAG_Int( TAG_Int(0)));
- }
- variable[6] = variable[7];
- if (!UNTAG_Bool(variable[6])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_opts___OptionEnum___init, LOCATE_opts, 135); nit_exit(1);}
- variable[6] = variable[0];
- variable[7] = CALL_array___Collection___to_a( variable[1] /*enum*/)( variable[1] /*enum*/) /*Collection::to_a*/;
- ATTR_opts___OptionEnum____enum(variable[6]) /*OptionEnum::_enum*/ = variable[7];
- variable[6] = variable[0];
- variable[7] = NEW_Array_array___Array___with_capacity(TAG_Int(5)); /*new Array[String]*/
- variable[8] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
- variable[9] = variable[8];
- CALL_abstract_collection___SimpleCollection___add(variable[7])(variable[7], variable[9]) /*AbstractArray::add*/;
- variable[10] = variable[2] /*help*/;
- CALL_abstract_collection___SimpleCollection___add(variable[7])(variable[7], variable[10]) /*AbstractArray::add*/;
- variable[11] = NEW_String_string___String___with_native(BOX_NativeString(" <"), TAG_Int(2)); /*new String*/
- variable[12] = variable[11];
- CALL_abstract_collection___SimpleCollection___add(variable[7])(variable[7], variable[12]) /*AbstractArray::add*/;
- variable[13] = NEW_String_string___String___with_native(BOX_NativeString(", "), TAG_Int(2)); /*new String*/
- variable[13] = CALL_string___Collection___join( variable[1] /*enum*/)( variable[1] /*enum*/, variable[13]) /*Collection::join*/;
- variable[14] = variable[13];
- CALL_abstract_collection___SimpleCollection___add(variable[7])(variable[7], variable[14]) /*AbstractArray::add*/;
- variable[15] = NEW_String_string___String___with_native(BOX_NativeString(">"), TAG_Int(1)); /*new String*/
- variable[16] = variable[15];
- CALL_abstract_collection___SimpleCollection___add(variable[7])(variable[7], variable[16]) /*AbstractArray::add*/;
- variable[7] = CALL_string___Object___to_s(variable[7])(variable[7]) /*Object::to_s*/;
- CALL_opts___OptionParameter___init_opt(variable[6])(variable[6], variable[7], variable[3] /*default*/, variable[4] /*names*/, init_table /*YYY*/) /*OptionParameter::init_opt*/;
- return_label17: while(false);
- init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_OptionEnum].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;
return;
}
-val_t opts___OptionInt___convert(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 162, LOCATE_opts___OptionInt___convert};
- val_t variable[4];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- variable[0] = self;
- variable[1] = param0;
- variable[3] = CALL_string___String___to_i( variable[1] /*str*/)( variable[1] /*str*/) /*String::to_i*/;
- variable[2] = variable[3];
- goto return_label18;
- return_label18: while(false);
- tracehead = trace.prev;
- return variable[2];
-}
-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, 160, LOCATE_opts___OptionInt___init};
- val_t variable[6];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- variable[0] = self;
- variable[1] = param0;
- variable[2] = 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_opts___OptionInt___init, LOCATE_opts, 160); nit_exit(1); } /*cast Array[String]*/;
- variable[3] = param2;
- if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_OptionInt].i]) return;
- variable[5] = variable[0];
- CALL_opts___OptionParameter___init_opt(variable[5])(variable[5], variable[1] /*help*/, variable[2] /*default*/, variable[3] /*names*/, init_table /*YYY*/) /*OptionParameter::init_opt*/;
- return_label19: while(false);
- init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_OptionInt].i] = 1;
- tracehead = trace.prev;
+val_t opts___OptionInt___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 = 170;
+ fra.me.meth = LOCATE_opts___OptionInt___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 = CALL_string___AbstractString___to_i(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./../lib/opts.nit:170 */
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return REGB0;
+}
+void opts___OptionInt___init(val_t p0, val_t p1, val_t p2, val_t p3, int* init_table){
+ int itpos7 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_OptionInt].i;
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t tmp;
+ if (init_table[itpos7]) return;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_opts;
+ fra.me.line = 168;
+ fra.me.meth = LOCATE_opts___OptionInt___init;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 3;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ REGB0 = p2;
+ fra.me.REG[2] = p3;
+ REGB1 = TAG_Bool(VAL_ISA(fra.me.REG[2], COLOR_Array, ID_Array)) /*cast Array[String]*/;
+ /* ./../lib/opts.nit:168 */
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ fprintf(stderr, "Cast failed");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_opts, 168);
+ nit_exit(1);
+ }
+ CALL_opts___OptionParameter___init_opt(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], REGB0, fra.me.REG[2], init_table);
+ stack_frame_head = fra.me.prev;
+ init_table[itpos7] = 1;
return;
}
-val_t opts___OptionArray___convert(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 176, LOCATE_opts___OptionArray___convert};
- val_t variable[4];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- variable[0] = self;
- variable[1] = param0;
- variable[3] = variable[0];
- variable[3] = ATTR_opts___OptionArray____values(variable[3]) /*OptionArray::_values*/;
- CALL_abstract_collection___SimpleCollection___add(variable[3])(variable[3], variable[1] /*str*/) /*AbstractArray::add*/;
- variable[3] = variable[0];
- variable[3] = ATTR_opts___OptionArray____values(variable[3]) /*OptionArray::_values*/;
- variable[2] = variable[3];
- goto return_label20;
- return_label20: while(false);
- tracehead = trace.prev;
- return variable[2];
-}
-void opts___OptionArray___init(val_t self, val_t param0, val_t param1, int* init_table) {
- struct trace_t trace = {NULL, NULL, 169, LOCATE_opts___OptionArray___init};
- val_t variable[6];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- variable[0] = self;
- variable[1] = param0;
- /* check if p<Array[String] with p:String */
- if (( param1!=NIT_NULL) && !VAL_ISA( param1, COLOR_Array, ID_Array)) { fprintf(stderr, "Cast failled"); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_opts___OptionArray___init, LOCATE_opts, 169); nit_exit(1); } /*cast Array[String]*/;
- variable[2] = param1;
- if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_OptionArray].i]) return;
- variable[4] = variable[0];
- variable[5] = NEW_Array_array___Array___init(); /*new Array[String]*/
- ATTR_opts___OptionArray____values(variable[4]) /*OptionArray::_values*/ = variable[5];
- variable[4] = variable[0];
- variable[5] = variable[0];
- variable[5] = ATTR_opts___OptionArray____values(variable[5]) /*OptionArray::_values*/;
- CALL_opts___OptionParameter___init_opt(variable[4])(variable[4], variable[1] /*help*/, variable[5], variable[2] /*names*/, init_table /*YYY*/) /*OptionParameter::init_opt*/;
- return_label21: while(false);
- init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_OptionArray].i] = 1;
- tracehead = trace.prev;
+val_t opts___OptionArray___convert(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} 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 = 184;
+ fra.me.meth = LOCATE_opts___OptionArray___convert;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 3;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ REGB0 = TAG_Bool(ATTR_opts___OptionArray____values(fra.me.REG[0])!=NIT_NULL);
+ /* ./../lib/opts.nit:186 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_values");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_opts, 186);
+ nit_exit(1);
+ }
+ fra.me.REG[2] = ATTR_opts___OptionArray____values(fra.me.REG[0]);
+ array___Array___add(fra.me.REG[2], fra.me.REG[1]);
+ REGB0 = TAG_Bool(ATTR_opts___OptionArray____values(fra.me.REG[0])!=NIT_NULL);
+ /* ./../lib/opts.nit:187 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_values");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_opts, 187);
+ nit_exit(1);
+ }
+ fra.me.REG[0] = ATTR_opts___OptionArray____values(fra.me.REG[0]);
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+void opts___OptionArray___init(val_t p0, val_t p1, val_t p2, int* init_table){
+ int itpos8 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_OptionArray].i;
+ struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
+ val_t REGB0;
+ val_t tmp;
+ if (init_table[itpos8]) return;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_opts;
+ fra.me.line = 177;
+ fra.me.meth = LOCATE_opts___OptionArray___init;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 4;
+ 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[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[2] = p2;
+ REGB0 = TAG_Bool(VAL_ISA(fra.me.REG[2], COLOR_Array, ID_Array)) /*cast Array[String]*/;
+ /* ./../lib/opts.nit:177 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Cast failed");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_opts, 177);
+ nit_exit(1);
+ }
+ fra.me.REG[3] = NEW_Array_array___Array___init();
+ /* ./../lib/opts.nit:179 */
+ ATTR_opts___OptionArray____values(fra.me.REG[0]) = fra.me.REG[3];
+ REGB0 = TAG_Bool(ATTR_opts___OptionArray____values(fra.me.REG[0])!=NIT_NULL);
+ /* ./../lib/opts.nit:180 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_values");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_opts, 180);
+ nit_exit(1);
+ }
+ fra.me.REG[3] = ATTR_opts___OptionArray____values(fra.me.REG[0]);
+ CALL_opts___OptionParameter___init_opt(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], fra.me.REG[3], fra.me.REG[2], init_table);
+ stack_frame_head = fra.me.prev;
+ init_table[itpos8] = 1;
return;
}
-val_t opts___OptionContext___options(val_t self) {
- struct trace_t trace = {NULL, NULL, 184, LOCATE_opts___OptionContext___options};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- tracehead = trace.prev;
- return ATTR_opts___OptionContext____options( self) /*OptionContext::_options*/;
-}
-val_t opts___OptionContext___rest(val_t self) {
- struct trace_t trace = {NULL, NULL, 185, LOCATE_opts___OptionContext___rest};
- val_t *variable = NULL;
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- tracehead = trace.prev;
- return ATTR_opts___OptionContext____rest( self) /*OptionContext::_rest*/;
-}
-void opts___OptionContext___usage(val_t self) {
- struct trace_t trace = {NULL, NULL, 189, LOCATE_opts___OptionContext___usage};
- val_t variable[11];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- variable[0] = self;
- variable[2] = TAG_Int(1);
- variable[3] = variable[0];
- variable[3] = ATTR_opts___OptionContext____options(variable[3]) /*OptionContext::_options*/;
- variable[3] = CALL_abstract_collection___Collection___iterator(variable[3])(variable[3]) /*AbstractArray::iterator*/;
- while (true) { /*for*/
- variable[4] = CALL_abstract_collection___Iterator___is_ok(variable[3])(variable[3]) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable[4])) break; /*for*/
- variable[4] = CALL_abstract_collection___Iterator___item(variable[3])(variable[3]) /*ArrayIterator::item*/;
- variable[5] = variable[4];
- variable[6] = TAG_Int(3);
- variable[7] = CALL_opts___Option___names( variable[5] /*i*/)( variable[5] /*i*/) /*Option::names*/;
- variable[7] = CALL_abstract_collection___Collection___iterator(variable[7])(variable[7]) /*AbstractArray::iterator*/;
- while (true) { /*for*/
- variable[8] = CALL_abstract_collection___Iterator___is_ok(variable[7])(variable[7]) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable[8])) break; /*for*/
- variable[8] = CALL_abstract_collection___Iterator___item(variable[7])(variable[7]) /*ArrayIterator::item*/;
- variable[9] = variable[8];
- variable[10] = CALL_abstract_collection___Collection___length( variable[9] /*n*/)( variable[9] /*n*/) /*AbstractArray::length*/;
- variable[10] = TAG_Int(UNTAG_Int(variable[10])+UNTAG_Int( TAG_Int(2)));
- variable[6] = TAG_Int(UNTAG_Int(variable[6])+UNTAG_Int(variable[10])) /*l*/;
- continue_24: while(0);
- CALL_abstract_collection___Iterator___next(variable[7])(variable[7]) /*ArrayIterator::next*/;
+val_t opts___OptionContext___options(val_t p0){
+ struct {struct stack_frame_t me;} 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 = 192;
+ fra.me.meth = LOCATE_opts___OptionContext___options;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = TAG_Bool(ATTR_opts___OptionContext____options(fra.me.REG[0])!=NIT_NULL);
+ /* ./../lib/opts.nit:192 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_options");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_opts, 192);
+ nit_exit(1);
+ }
+ fra.me.REG[0] = ATTR_opts___OptionContext____options(fra.me.REG[0]);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+val_t opts___OptionContext___rest(val_t p0){
+ struct {struct stack_frame_t me;} 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 = 193;
+ fra.me.meth = LOCATE_opts___OptionContext___rest;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = TAG_Bool(ATTR_opts___OptionContext____rest(fra.me.REG[0])!=NIT_NULL);
+ /* ./../lib/opts.nit:193 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_rest");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_opts, 193);
+ nit_exit(1);
+ }
+ fra.me.REG[0] = ATTR_opts___OptionContext____rest(fra.me.REG[0]);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
+}
+void opts___OptionContext___usage(val_t p0){
+ struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t REGB2;
+ val_t REGB3;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_opts;
+ fra.me.line = 197;
+ fra.me.meth = LOCATE_opts___OptionContext___usage;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 4;
+ 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[0] = p0;
+ REGB0 = TAG_Int(1);
+ REGB1 = TAG_Bool(ATTR_opts___OptionContext____options(fra.me.REG[0])!=NIT_NULL);
+ /* ./../lib/opts.nit:200 */
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_options");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_opts, 200);
+ nit_exit(1);
+ }
+ fra.me.REG[1] = ATTR_opts___OptionContext____options(fra.me.REG[0]);
+ fra.me.REG[1] = CALL_abstract_collection___Collection___iterator(fra.me.REG[1])(fra.me.REG[1]);
+ while(1) {
+ REGB1 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[1])(fra.me.REG[1]);
+ if (UNTAG_Bool(REGB1)) {
+ fra.me.REG[2] = CALL_abstract_collection___Iterator___item(fra.me.REG[1])(fra.me.REG[1]);
+ REGB1 = TAG_Int(3);
+ fra.me.REG[2] = CALL_opts___Option___names(fra.me.REG[2])(fra.me.REG[2]);
+ fra.me.REG[2] = CALL_abstract_collection___Collection___iterator(fra.me.REG[2])(fra.me.REG[2]);
+ /* ./../lib/opts.nit:202 */
+ while(1) {
+ REGB2 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[2])(fra.me.REG[2]);
+ if (UNTAG_Bool(REGB2)) {
+ fra.me.REG[3] = CALL_abstract_collection___Iterator___item(fra.me.REG[2])(fra.me.REG[2]);
+ REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
+ /* ./../lib/standard//collection//array.nit:23 */
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_length");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23);
+ nit_exit(1);
+ }
+ REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[3]);
+ REGB3 = TAG_Int(2);
+ REGB3 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB3));
+ REGB3 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB3));
+ REGB1 = REGB3;
+ /* ./../lib/opts.nit:203 */
+ } else {
+ /* ./../lib/opts.nit:202 */
+ goto label1;
+ }
+ CALL_abstract_collection___Iterator___next(fra.me.REG[2])(fra.me.REG[2]);
+ }
+ label1: while(0);
+ REGB3 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
+ /* ./../lib/opts.nit:205 */
+ if (UNTAG_Bool(REGB3)) {
+ REGB0 = REGB1;
+ }
+ } else {
+ /* ./../lib/opts.nit:200 */
+ goto label2;
}
- break_24: while(0);
- variable[7] = TAG_Bool(UNTAG_Int( variable[2] /*lmax*/)<UNTAG_Int( variable[6] /*l*/));
- if (UNTAG_Bool(variable[7])) { /*if*/
- variable[2] = variable[6] /*l*/ /*lmax=*/;
+ CALL_abstract_collection___Iterator___next(fra.me.REG[1])(fra.me.REG[1]);
+ }
+ label2: while(0);
+ REGB1 = TAG_Bool(ATTR_opts___OptionContext____options(fra.me.REG[0])!=NIT_NULL);
+ /* ./../lib/opts.nit:208 */
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_options");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_opts, 208);
+ nit_exit(1);
+ }
+ fra.me.REG[1] = ATTR_opts___OptionContext____options(fra.me.REG[0]);
+ fra.me.REG[1] = CALL_abstract_collection___Collection___iterator(fra.me.REG[1])(fra.me.REG[1]);
+ while(1) {
+ REGB1 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[1])(fra.me.REG[1]);
+ if (UNTAG_Bool(REGB1)) {
+ fra.me.REG[2] = CALL_abstract_collection___Iterator___item(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[2] = CALL_opts___Option___pretty(fra.me.REG[2])(fra.me.REG[2], REGB0);
+ /* ./../lib/opts.nit:209 */
+ CALL_file___Object___print(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
+ } else {
+ /* ./../lib/opts.nit:208 */
+ goto label3;
}
- continue_23: while(0);
- CALL_abstract_collection___Iterator___next(variable[3])(variable[3]) /*ArrayIterator::next*/;
- }
- break_23: while(0);
- variable[3] = variable[0];
- variable[3] = ATTR_opts___OptionContext____options(variable[3]) /*OptionContext::_options*/;
- variable[3] = CALL_abstract_collection___Collection___iterator(variable[3])(variable[3]) /*AbstractArray::iterator*/;
- while (true) { /*for*/
- variable[4] = CALL_abstract_collection___Iterator___is_ok(variable[3])(variable[3]) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable[4])) break; /*for*/
- variable[4] = CALL_abstract_collection___Iterator___item(variable[3])(variable[3]) /*ArrayIterator::item*/;
- variable[5] = variable[4];
- variable[6] = variable[0];
- variable[7] = CALL_opts___Option___pretty( variable[5] /*i*/)( variable[5] /*i*/, variable[2] /*lmax*/) /*Option::pretty*/;
- CALL_file___Object___print(variable[6])(variable[6], variable[7]) /*Object::print*/;
- continue_25: while(0);
- CALL_abstract_collection___Iterator___next(variable[3])(variable[3]) /*ArrayIterator::next*/;
- }
- break_25: while(0);
- return_label22: while(false);
- tracehead = trace.prev;
+ CALL_abstract_collection___Iterator___next(fra.me.REG[1])(fra.me.REG[1]);
+ }
+ label3: while(0);
+ stack_frame_head = fra.me.prev;
return;
}
-void opts___OptionContext___parse(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 205, LOCATE_opts___OptionContext___parse};
- val_t variable[5];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- variable[0] = self;
- variable[1] = param0;
- variable[4] = CALL_abstract_collection___Collection___iterator( variable[1] /*argv*/)( variable[1] /*argv*/) /*Collection::iterator*/;
- variable[3] = variable[4];
- variable[4] = variable[0];
- CALL_opts___OptionContext___parse_intern(variable[4])(variable[4], variable[3] /*it*/) /*OptionContext::parse_intern*/;
- return_label26: while(false);
- tracehead = trace.prev;
+void opts___OptionContext___parse(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_opts;
+ fra.me.line = 213;
+ fra.me.meth = LOCATE_opts___OptionContext___parse;
+ 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;
+ fra.me.REG[1] = CALL_abstract_collection___Collection___iterator(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./../lib/opts.nit:217 */
+ CALL_opts___OptionContext___parse_intern(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
+ stack_frame_head = fra.me.prev;
return;
}
-void opts___OptionContext___parse_intern(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 212, LOCATE_opts___OptionContext___parse_intern};
- val_t variable[8];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- variable[0] = self;
- variable[1] = param0;
- variable[3] = TAG_Bool(true);
- variable[4] = variable[0];
- CALL_opts___OptionContext___build(variable[4])(variable[4]) /*OptionContext::build*/;
- variable[5] = variable[0];
- variable[5] = ATTR_opts___OptionContext____rest(variable[5]) /*OptionContext::_rest*/;
- variable[4] = variable[5];
- while (true) { /*while*/
- variable[5] = variable[3] /*parseargs*/;
- if (UNTAG_Bool(variable[5])) { /* and */
- variable[5] = CALL_abstract_collection___Iterator___is_ok( variable[1] /*it*/)( variable[1] /*it*/) /*Iterator::is_ok*/;
+void opts___OptionContext___parse_intern(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[4];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t REGB2;
+ val_t tmp;
+ static val_t once_value_1; /* Once value */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_opts;
+ fra.me.line = 220;
+ fra.me.meth = LOCATE_opts___OptionContext___parse_intern;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 5;
+ 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[0] = p0;
+ fra.me.REG[1] = p1;
+ REGB0 = TAG_Bool(true);
+ /* ./../lib/opts.nit:223 */
+ CALL_opts___OptionContext___build(fra.me.REG[0])(fra.me.REG[0]);
+ REGB1 = TAG_Bool(ATTR_opts___OptionContext____rest(fra.me.REG[0])!=NIT_NULL);
+ /* ./../lib/opts.nit:224 */
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_rest");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_opts, 224);
+ nit_exit(1);
+ }
+ fra.me.REG[2] = ATTR_opts___OptionContext____rest(fra.me.REG[0]);
+ /* ./../lib/opts.nit:226 */
+ while(1) {
+ if (UNTAG_Bool(REGB0)) {
+ REGB1 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[1])(fra.me.REG[1]);
+ } else {
+ REGB2 = TAG_Bool(false);
+ REGB1 = REGB2;
}
- if (!UNTAG_Bool(variable[5])) break; /* while*/
- variable[6] = CALL_abstract_collection___Iterator___item( variable[1] /*it*/)( variable[1] /*it*/) /*Iterator::item*/;
- variable[5] = variable[6];
- variable[6] = NEW_String_string___String___with_native(BOX_NativeString("--"), TAG_Int(2)); /*new String*/
- variable[6] = TAG_Bool(( variable[5] /*str*/ == variable[6]) || (( variable[5] /*str*/ != NIT_NULL) && UNTAG_Bool(CALL_kernel___Object_____eqeq( variable[5] /*str*/)( variable[5] /*str*/, variable[6]) /*String::==*/)));
- if (UNTAG_Bool(variable[6])) { /*if*/
- CALL_abstract_collection___Iterator___next( variable[1] /*it*/)( variable[1] /*it*/) /*Iterator::next*/;
- variable[6] = CALL_array___Iterator___to_a( variable[1] /*it*/)( variable[1] /*it*/) /*Iterator::to_a*/;
- CALL_abstract_collection___SimpleCollection___add_all( variable[4] /*rest*/)( variable[4] /*rest*/, variable[6]) /*SimpleCollection::add_all*/;
- variable[3] = TAG_Bool(false) /*parseargs=*/;
- } else { /*if*/
- variable[6] = variable[0];
- variable[6] = ATTR_opts___OptionContext____optmap(variable[6]) /*OptionContext::_optmap*/;
- variable[6] = CALL_abstract_collection___Map___has_key(variable[6])(variable[6], variable[5] /*str*/) /*Map::has_key*/;
- if (UNTAG_Bool(variable[6])) { /*if*/
- variable[7] = variable[0];
- variable[7] = ATTR_opts___OptionContext____optmap(variable[7]) /*OptionContext::_optmap*/;
- variable[7] = CALL_abstract_collection___Map_____bra(variable[7])(variable[7], variable[5] /*str*/) /*Map::[]*/;
- variable[6] = variable[7];
- CALL_abstract_collection___Iterator___next( variable[1] /*it*/)( variable[1] /*it*/) /*Iterator::next*/;
- CALL_opts___Option___read_param( variable[6] /*opt*/)( variable[6] /*opt*/, variable[1] /*it*/) /*Option::read_param*/;
- } else { /*if*/
- variable[6] = CALL_abstract_collection___Iterator___item( variable[1] /*it*/)( variable[1] /*it*/) /*Iterator::item*/;
- CALL_abstract_collection___SimpleCollection___add( variable[4] /*rest*/)( variable[4] /*rest*/, variable[6]) /*AbstractArray::add*/;
- CALL_abstract_collection___Iterator___next( variable[1] /*it*/)( variable[1] /*it*/) /*Iterator::next*/;
+ if (UNTAG_Bool(REGB1)) {
+ fra.me.REG[3] = CALL_abstract_collection___Iterator___item(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./../lib/opts.nit:228 */
+ if (!once_value_1) {
+ fra.me.REG[4] = BOX_NativeString("--");
+ REGB1 = TAG_Int(2);
+ fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB1);
+ once_value_1 = fra.me.REG[4];
+ register_static_object(&once_value_1);
+ } else fra.me.REG[4] = once_value_1;
+ REGB1 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[3],fra.me.REG[4]));
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ REGB2 = CALL_kernel___Object_____eqeq(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+ REGB1 = REGB2;
+ }
+ if (UNTAG_Bool(REGB1)) {
+ /* ./../lib/opts.nit:229 */
+ CALL_abstract_collection___Iterator___next(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[4] = CALL_array___Iterator___to_a(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./../lib/opts.nit:230 */
+ CALL_abstract_collection___SimpleCollection___add_all(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[4]);
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ /* ./../lib/opts.nit:231 */
+ } else {
+ REGB1 = TAG_Bool(ATTR_opts___OptionContext____optmap(fra.me.REG[0])!=NIT_NULL);
+ /* ./../lib/opts.nit:233 */
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_optmap");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_opts, 233);
+ nit_exit(1);
+ }
+ fra.me.REG[4] = ATTR_opts___OptionContext____optmap(fra.me.REG[0]);
+ REGB1 = CALL_abstract_collection___MapRead___has_key(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[3]);
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(ATTR_opts___OptionContext____optmap(fra.me.REG[0])!=NIT_NULL);
+ /* ./../lib/opts.nit:234 */
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_optmap");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_opts, 234);
+ nit_exit(1);
+ }
+ fra.me.REG[4] = ATTR_opts___OptionContext____optmap(fra.me.REG[0]);
+ fra.me.REG[3] = CALL_abstract_collection___MapRead_____bra(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[3]);
+ /* ./../lib/opts.nit:235 */
+ CALL_abstract_collection___Iterator___next(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./../lib/opts.nit:236 */
+ CALL_opts___Option___read_param(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1]);
+ } else {
+ fra.me.REG[3] = CALL_abstract_collection___Iterator___item(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./../lib/opts.nit:238 */
+ array___Array___add(fra.me.REG[2], fra.me.REG[3]);
+ /* ./../lib/opts.nit:239 */
+ CALL_abstract_collection___Iterator___next(fra.me.REG[1])(fra.me.REG[1]);
+ }
}
+ } else {
+ /* ./../lib/opts.nit:226 */
+ goto label2;
}
- continue_28: while(0);
}
- break_28: while(0);
- return_label27: while(false);
- tracehead = trace.prev;
+ label2: while(0);
+ stack_frame_head = fra.me.prev;
return;
}
-void opts___OptionContext___add_option(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 237, LOCATE_opts___OptionContext___add_option};
- val_t variable[7];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- variable[0] = self;
- /* check if p<Array[Option] with p:Option */
- if (( param0!=NIT_NULL) && !VAL_ISA( param0, COLOR_Array, ID_Array)) { fprintf(stderr, "Cast failled"); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_opts___OptionContext___add_option, LOCATE_opts, 237); nit_exit(1); } /*cast Array[Option]*/;
- variable[1] = param0;
- variable[3] = CALL_abstract_collection___Collection___iterator( variable[1] /*opts*/)( variable[1] /*opts*/) /*AbstractArray::iterator*/;
- while (true) { /*for*/
- variable[4] = CALL_abstract_collection___Iterator___is_ok(variable[3])(variable[3]) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable[4])) break; /*for*/
- variable[4] = CALL_abstract_collection___Iterator___item(variable[3])(variable[3]) /*ArrayIterator::item*/;
- variable[5] = variable[4];
- variable[6] = variable[0];
- CALL_opts___Option___context__eq( variable[5] /*opt*/)( variable[5] /*opt*/, variable[6]) /*Option::context=*/;
- variable[6] = variable[0];
- variable[6] = ATTR_opts___OptionContext____options(variable[6]) /*OptionContext::_options*/;
- CALL_abstract_collection___SimpleCollection___add(variable[6])(variable[6], variable[5] /*opt*/) /*AbstractArray::add*/;
- continue_30: while(0);
- CALL_abstract_collection___Iterator___next(variable[3])(variable[3]) /*ArrayIterator::next*/;
- }
- break_30: while(0);
- return_label29: while(false);
- tracehead = trace.prev;
+void opts___OptionContext___add_option(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[3];} 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 = 245;
+ fra.me.meth = LOCATE_opts___OptionContext___add_option;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 4;
+ 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[0] = p0;
+ fra.me.REG[1] = p1;
+ REGB0 = TAG_Bool(VAL_ISA(fra.me.REG[1], COLOR_Array, ID_Array)) /*cast Array[Option]*/;
+ /* ./../lib/opts.nit:245 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Cast failed");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_opts, 245);
+ nit_exit(1);
+ }
+ fra.me.REG[1] = CALL_abstract_collection___Collection___iterator(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./../lib/opts.nit:247 */
+ while(1) {
+ REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[1])(fra.me.REG[1]);
+ if (UNTAG_Bool(REGB0)) {
+ fra.me.REG[2] = CALL_abstract_collection___Iterator___item(fra.me.REG[1])(fra.me.REG[1]);
+ REGB0 = TAG_Bool(ATTR_opts___OptionContext____options(fra.me.REG[0])!=NIT_NULL);
+ /* ./../lib/opts.nit:248 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_options");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_opts, 248);
+ nit_exit(1);
+ }
+ fra.me.REG[3] = ATTR_opts___OptionContext____options(fra.me.REG[0]);
+ array___Array___add(fra.me.REG[3], fra.me.REG[2]);
+ } else {
+ /* ./../lib/opts.nit:247 */
+ goto label1;
+ }
+ CALL_abstract_collection___Iterator___next(fra.me.REG[1])(fra.me.REG[1]);
+ }
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
return;
}
-void opts___OptionContext___init(val_t self, int* init_table) {
- struct trace_t trace = {NULL, NULL, 245, LOCATE_opts___OptionContext___init};
- val_t variable[4];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- variable[0] = self;
- if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_OptionContext].i]) return;
- variable[2] = variable[0];
- variable[3] = NEW_Array_array___Array___init(); /*new Array[Option]*/
- ATTR_opts___OptionContext____options(variable[2]) /*OptionContext::_options*/ = variable[3];
- variable[2] = variable[0];
- variable[3] = NEW_HashMap_hash___HashMap___init(); /*new HashMap[String, Option]*/
- ATTR_opts___OptionContext____optmap(variable[2]) /*OptionContext::_optmap*/ = variable[3];
- variable[2] = variable[0];
- variable[3] = NEW_Array_array___Array___init(); /*new Array[String]*/
- ATTR_opts___OptionContext____rest(variable[2]) /*OptionContext::_rest*/ = variable[3];
- return_label31: while(false);
- init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_OptionContext].i] = 1;
- tracehead = trace.prev;
+void opts___OptionContext___init(val_t p0, int* init_table){
+ int itpos9 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_OptionContext].i;
+ struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+ val_t tmp;
+ if (init_table[itpos9]) return;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_opts;
+ fra.me.line = 252;
+ fra.me.meth = LOCATE_opts___OptionContext___init;
+ 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] = NEW_Array_array___Array___init();
+ /* ./../lib/opts.nit:254 */
+ ATTR_opts___OptionContext____options(fra.me.REG[0]) = fra.me.REG[1];
+ fra.me.REG[1] = NEW_HashMap_hash_collection___HashMap___init();
+ /* ./../lib/opts.nit:255 */
+ ATTR_opts___OptionContext____optmap(fra.me.REG[0]) = fra.me.REG[1];
+ fra.me.REG[1] = NEW_Array_array___Array___init();
+ /* ./../lib/opts.nit:256 */
+ ATTR_opts___OptionContext____rest(fra.me.REG[0]) = fra.me.REG[1];
+ stack_frame_head = fra.me.prev;
+ init_table[itpos9] = 1;
return;
}
-void opts___OptionContext___build(val_t self) {
- struct trace_t trace = {NULL, NULL, 252, LOCATE_opts___OptionContext___build};
- val_t variable[9];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_opts;
- variable[0] = self;
- variable[2] = variable[0];
- variable[2] = ATTR_opts___OptionContext____options(variable[2]) /*OptionContext::_options*/;
- variable[2] = CALL_abstract_collection___Collection___iterator(variable[2])(variable[2]) /*AbstractArray::iterator*/;
- while (true) { /*for*/
- variable[3] = CALL_abstract_collection___Iterator___is_ok(variable[2])(variable[2]) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable[3])) break; /*for*/
- variable[3] = CALL_abstract_collection___Iterator___item(variable[2])(variable[2]) /*ArrayIterator::item*/;
- variable[4] = variable[3];
- variable[5] = CALL_opts___Option___names( variable[4] /*o*/)( variable[4] /*o*/) /*Option::names*/;
- variable[5] = CALL_abstract_collection___Collection___iterator(variable[5])(variable[5]) /*AbstractArray::iterator*/;
- while (true) { /*for*/
- variable[6] = CALL_abstract_collection___Iterator___is_ok(variable[5])(variable[5]) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable[6])) break; /*for*/
- variable[6] = CALL_abstract_collection___Iterator___item(variable[5])(variable[5]) /*ArrayIterator::item*/;
- variable[7] = variable[6];
- variable[8] = variable[0];
- variable[8] = ATTR_opts___OptionContext____optmap(variable[8]) /*OptionContext::_optmap*/;
- CALL_abstract_collection___Map_____braeq(variable[8])(variable[8], variable[7] /*n*/, variable[4] /*o*/) /*Map::[]=*/;
- continue_34: while(0);
- CALL_abstract_collection___Iterator___next(variable[5])(variable[5]) /*ArrayIterator::next*/;
+void opts___OptionContext___build(val_t p0){
+ struct {struct stack_frame_t me; val_t MORE_REG[5];} 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 = 259;
+ fra.me.meth = LOCATE_opts___OptionContext___build;
+ 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;
+ REGB0 = TAG_Bool(ATTR_opts___OptionContext____options(fra.me.REG[0])!=NIT_NULL);
+ /* ./../lib/opts.nit:261 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_options");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_opts, 261);
+ nit_exit(1);
+ }
+ fra.me.REG[1] = ATTR_opts___OptionContext____options(fra.me.REG[0]);
+ fra.me.REG[1] = CALL_abstract_collection___Collection___iterator(fra.me.REG[1])(fra.me.REG[1]);
+ while(1) {
+ REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[1])(fra.me.REG[1]);
+ if (UNTAG_Bool(REGB0)) {
+ fra.me.REG[2] = CALL_abstract_collection___Iterator___item(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[3] = CALL_opts___Option___names(fra.me.REG[2])(fra.me.REG[2]);
+ fra.me.REG[3] = CALL_abstract_collection___Collection___iterator(fra.me.REG[3])(fra.me.REG[3]);
+ /* ./../lib/opts.nit:262 */
+ while(1) {
+ REGB0 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[3])(fra.me.REG[3]);
+ if (UNTAG_Bool(REGB0)) {
+ fra.me.REG[4] = CALL_abstract_collection___Iterator___item(fra.me.REG[3])(fra.me.REG[3]);
+ REGB0 = TAG_Bool(ATTR_opts___OptionContext____optmap(fra.me.REG[0])!=NIT_NULL);
+ /* ./../lib/opts.nit:263 */
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ fprintf(stderr, "Uninitialized attribute %s", "_optmap");
+ fprintf(stderr, " (%s:%d)\n", LOCATE_opts, 263);
+ nit_exit(1);
+ }
+ fra.me.REG[5] = ATTR_opts___OptionContext____optmap(fra.me.REG[0]);
+ CALL_abstract_collection___Map_____braeq(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[4], fra.me.REG[2]);
+ } else {
+ /* ./../lib/opts.nit:262 */
+ goto label1;
+ }
+ CALL_abstract_collection___Iterator___next(fra.me.REG[3])(fra.me.REG[3]);
+ }
+ label1: while(0);
+ } else {
+ /* ./../lib/opts.nit:261 */
+ goto label2;
}
- break_34: while(0);
- continue_33: while(0);
- CALL_abstract_collection___Iterator___next(variable[2])(variable[2]) /*ArrayIterator::next*/;
+ CALL_abstract_collection___Iterator___next(fra.me.REG[1])(fra.me.REG[1]);
}
- break_33: while(0);
- return_label32: while(false);
- tracehead = trace.prev;
+ label2: while(0);
+ stack_frame_head = fra.me.prev;
return;
}