-val_t syntax___SrcModuleLoader___parse_file(val_t self, val_t param0, val_t param1, val_t param2, val_t param3, val_t param4) {
- struct trace_t trace = {NULL, NULL, 32, LOCATE_syntax___SrcModuleLoader___parse_file};
- static val_t once_value_3 = NIT_NULL; /* Once value for string variable[12]*/
- static val_t once_value_4 = NIT_NULL; /* Once value for string variable[12]*/
- static val_t once_value_5 = NIT_NULL; /* Once value for string variable[12]*/
- val_t variable[13];
- struct WBT_ **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_syntax;
- /* Register variable[0]: Local variable */
- variable[0] = self;
- /* Register variable[1]: Local variable */
- variable[1] = param0;
- /* Register variable[2]: Local variable */
- variable[2] = param1;
- /* Register variable[3]: Local variable */
- variable[3] = param2;
- /* Register variable[4]: Local variable */
- variable[4] = param3;
- /* Register variable[5]: Local variable */
- variable[5] = param4;
- /* Register variable[6]: Method return value and escape marker */
- /* Register variable[7]: Local variable */
- /* Register variable[8]: Result */
- variable[8] = NEW_Lexer_lexer___Lexer___init( variable[2] /*file*/, variable[3] /*filename*/) /*new Lexer*/;
- variable[7] = variable[8];
- /* Register variable[8]: Local variable */
- /* Register variable[9]: Result */
- variable[9] = NEW_Parser_parser___Parser___init( variable[7] /*lexer*/) /*new Parser*/;
- variable[8] = variable[9];
- /* Register variable[9]: Local variable */
- /* Register variable[10]: Result */
- variable[10] = CALL_parser___Parser___parse( variable[8] /*parser*/)( variable[8] /*parser*/) /*Parser::parse*/;
- variable[9] = variable[10];
- /* Register variable[10]: Result */
- variable[10] = CALL_parser_nodes___Start___n_base( variable[9] /*node_tree*/)( variable[9] /*node_tree*/) /*Start::n_base*/;
- /* Register variable[10]: Result */
- variable[10] = TAG_Bool((variable[10] == NIT_NULL /*null*/) || ((variable[10] != NIT_NULL) && ((CALL_kernel___Object_____eqeq(variable[10])==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable[10], NIT_NULL /*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq(variable[10])(variable[10], NIT_NULL /*null*/) /*Object::==*/)))));
- if (UNTAG_Bool(variable[10])) { /*if*/
- /* Register variable[10]: Local variable */
- /* Register variable[11]: Result */
- variable[11] = CALL_parser_nodes___Start___n_eof( variable[9] /*node_tree*/)( variable[9] /*node_tree*/) /*Start::n_eof*/;
- variable[10] = variable[11];
- /* Register variable[11]: Result */
- variable[11] = TAG_Bool(( variable[10] /*err*/==NIT_NULL) || VAL_ISA( variable[10] /*err*/, COLOR_PError, ID_PError)) /*cast PError*/;
- if (!UNTAG_Bool(variable[11])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_syntax___SrcModuleLoader___parse_file, LOCATE_syntax, 39); nit_exit(1);}
- variable[11] = NEW_Array_array___Array___with_capacity(TAG_Int(5)) /*new Array[String]*/ /* Ensure var: Array (for super-string)*/;
- /* Register variable[12]: Once String constant */
- if (once_value_3 != NIT_NULL) variable[12] = once_value_3;
- else {
- variable[12] = NEW_String_string___String___with_native(BOX_NativeString(""), TAG_Int(0)) /*new String*/;
- once_value_3 = variable[12];
+val_t syntax___SrcModuleLoader___parse_file(val_t p0, val_t p1, val_t p2, val_t p3, val_t p4, val_t p5){
+ struct {struct stack_frame_t me; val_t MORE_REG[6];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t tmp;
+ static val_t once_value_4; /* Once value */
+ static val_t once_value_5; /* Once value */
+ static val_t once_value_6; /* Once value */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_syntax;
+ fra.me.line = 33;
+ fra.me.meth = LOCATE_syntax___SrcModuleLoader___parse_file;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 7;
+ 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[6] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[2] = p2;
+ fra.me.REG[3] = p3;
+ fra.me.REG[4] = p4;
+ fra.me.REG[5] = p5;
+ /* ./syntax//syntax.nit:35 */
+ fra.me.REG[0] = CALL_string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
+ }
+ REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
+ /* ./syntax//syntax.nit:35 */
+ REGB1 = TAG_Int(0);
+ /* ./../lib/standard//kernel.nit:214 */
+ REGB1 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(REGB1));
+ /* ./syntax//syntax.nit:35 */
+ if (UNTAG_Bool(REGB1)) {
+ fra.me.REG[0] = CALL_string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
+ REGB1 = TAG_Int(0);
+ REGB1 = CALL_abstract_collection___MapRead_____bra(fra.me.REG[0])(fra.me.REG[0], REGB1);
+ REGB1 = CALL_kernel___Char___is_lower(REGB1)(REGB1);
+ } else {
+ REGB0 = TAG_Bool(false);
+ REGB1 = REGB0;
+ }
+ fra.me.REG[0] = REGB1;
+ /* ./syntax//syntax.nit:36 */
+ fra.me.REG[6] = CALL_string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
+ CALL_abstract_collection___Collection___iterate(fra.me.REG[6])(fra.me.REG[6], (&(fra.me)), ((fun_t)OC_syntax___SrcModuleLoader___parse_file_1));
+ switch ((&(fra.me))->has_broke) {
+ case 0: break;
+ case 1: (&(fra.me))->has_broke = 0; goto label3;
+ }
+ label3: while(0);
+ /* ./syntax//syntax.nit:41 */
+ REGB1 = TAG_Bool(!UNTAG_Bool(fra.me.REG[0]));
+ if (UNTAG_Bool(REGB1)) {
+ /* ./syntax//syntax.nit:42 */
+ REGB1 = TAG_Int(5);
+ fra.me.REG[0] = NEW_Array_array___Array___with_capacity(REGB1);
+ if (!once_value_4) {
+ fra.me.REG[6] = BOX_NativeString("");
+ REGB1 = TAG_Int(0);
+ fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB1);
+ once_value_4 = fra.me.REG[6];
+ register_static_object(&once_value_4);
+ } else fra.me.REG[6] = once_value_4;
+ fra.me.REG[6] = fra.me.REG[6];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[6]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]);
+ if (!once_value_5) {
+ fra.me.REG[6] = BOX_NativeString(": Error module name \"");
+ REGB1 = TAG_Int(21);
+ fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB1);
+ once_value_5 = fra.me.REG[6];
+ register_static_object(&once_value_5);
+ } else fra.me.REG[6] = once_value_5;
+ fra.me.REG[6] = fra.me.REG[6];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[6]);
+ fra.me.REG[6] = CALL_string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[6]);
+ if (!once_value_6) {
+ fra.me.REG[6] = BOX_NativeString("\", must start with a lower case letter and contain only letters, digits and '_'.");
+ REGB1 = TAG_Int(80);
+ fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB1);
+ once_value_6 = fra.me.REG[6];
+ register_static_object(&once_value_6);
+ } else fra.me.REG[6] = once_value_6;
+ fra.me.REG[6] = fra.me.REG[6];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[6]);
+ fra.me.REG[0] = CALL_string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
+ CALL_mmloader___ToolContext___error(fra.me.REG[1])(fra.me.REG[1], NIT_NULL, fra.me.REG[0]);
+ }
+ /* ./syntax//syntax.nit:45 */
+ fra.me.REG[2] = NEW_Lexer_lexer___Lexer___init(fra.me.REG[2], fra.me.REG[3]);
+ /* ./syntax//syntax.nit:46 */
+ fra.me.REG[2] = NEW_Parser_parser___Parser___init(fra.me.REG[2]);
+ /* ./syntax//syntax.nit:47 */
+ fra.me.REG[2] = CALL_parser___Parser___parse(fra.me.REG[2])(fra.me.REG[2]);
+ /* ./syntax//syntax.nit:48 */
+ fra.me.REG[0] = CALL_parser_nodes___Start___n_base(fra.me.REG[2])(fra.me.REG[2]);
+ REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ REGB0 = TAG_Bool(false);
+ REGB1 = REGB0;
+ } else {
+ REGB0 = CALL_kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL);
+ REGB1 = REGB0;