/* This C file is generated by NIT to compile module syntax. */
#include "syntax._sep.h"
-val_t syntax___SrcModuleLoader___file_type(val_t self) {
- struct trace_t trace = {NULL, LOCATE_syntax___SrcModuleLoader___file_type, 31};
- val_t variable0;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = NEW_string___String___with_native(BOX_NativeString("nit"), TAG_Int(3)); /*new String*/
- goto return_label0;
- return_label0: while(false);
- tracehead = trace.prev;
- return variable0;
+static const char LOCATE_syntax___SrcModuleLoader___file_type[] = "syntax::SrcModuleLoader::(mmloader::ModuleLoader::file_type)";
+val_t syntax___SrcModuleLoader___file_type(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t REGB0;
+ 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_syntax;
+ fra.me.line = 33;
+ fra.me.meth = LOCATE_syntax___SrcModuleLoader___file_type;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.nitni_local_ref_head = NULL;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ /* syntax/syntax.nit:33 */
+ if (!once_value_1) {
+ fra.me.REG[0] = BOX_NativeString("nit");
+ REGB0 = TAG_Int(3);
+ fra.me.REG[0] = NEW_String_standard___string___String___with_native(fra.me.REG[0], REGB0);
+ once_value_1 = fra.me.REG[0];
+ register_static_object(&once_value_1);
+ } else fra.me.REG[0] = once_value_1;
+ fra.me.REG[0] = fra.me.REG[0];
+ goto label2;
+ label2: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
}
-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, LOCATE_syntax___SrcModuleLoader___parse_file, 33};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
- val_t variable5;
- val_t variable6;
- val_t variable7;
- val_t variable8;
- val_t variable9;
- val_t variable10;
- val_t variable11;
- val_t variable12;
- val_t variable13;
- val_t variable14;
- val_t variable15;
- val_t variable16;
- val_t variable17;
- val_t variable18;
- val_t variable19;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = param1;
- variable2 = param2;
- variable3 = param3;
- variable4 = param4;
- variable6 = NEW_lexer___Lexer___init( variable1 /*file*/, variable2 /*filename*/); /*new Lexer*/
- variable5 = variable6;
- variable7 = NEW_parser___Parser___init( variable5 /*lexer*/); /*new Parser*/
- variable6 = variable7;
- variable8 = ((parser___Parser___parse_t)CALL( variable6 /*parser*/,COLOR_parser___Parser___parse))( variable6 /*parser*/) /*Parser::parse*/;
- variable7 = variable8;
- variable8 = ((parser_nodes___Start___n_base_t)CALL( variable7 /*node_tree*/,COLOR_parser_nodes___Start___n_base))( variable7 /*node_tree*/) /*Start::n_base*/;
- variable8 = TAG_Bool((variable8 == NIT_NULL /*null*/) || ((variable8 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable8,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable8, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable8,COLOR_kernel___Object_____eqeq))(variable8, NIT_NULL /*null*/) /*PModule::==*/)))));
- if (UNTAG_Bool(variable8)) { /*if*/
- variable9 = ((parser_nodes___Start___n_eof_t)CALL( variable7 /*node_tree*/,COLOR_parser_nodes___Start___n_eof))( variable7 /*node_tree*/) /*Start::n_eof*/;
- variable8 = variable9;
- variable9 = TAG_Bool(( variable8 /*err*/==NIT_NULL) || VAL_ISA( variable8 /*err*/, COLOR_PError, ID_PError)) /*cast PError*/;
- if (!UNTAG_Bool(variable9)) { fprintf(stderr, "Assert%s failed (%s: %d)\n", "", LOCATE_syntax___SrcModuleLoader___parse_file, 40); nit_exit(1);}
- variable9 = NEW_string___String___init(); /*new String*/
- variable10 = NEW_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
- variable11 = variable10;
- ((string___String___append_t)CALL(variable9,COLOR_abstract_collection___IndexedCollection___append))(variable9, variable11) /*String::append*/;
- variable12 = ((parser_prod___Token___locate_t)CALL( variable8 /*err*/,COLOR_parser_prod___PNode___locate))( variable8 /*err*/) /*PError::locate*/;
- variable13 = variable12;
- ((string___String___append_t)CALL(variable9,COLOR_abstract_collection___IndexedCollection___append))(variable9, variable13) /*String::append*/;
- variable14 = NEW_string___String___with_native(BOX_NativeString(": "), TAG_Int(2)); /*new String*/
- variable15 = variable14;
- ((string___String___append_t)CALL(variable9,COLOR_abstract_collection___IndexedCollection___append))(variable9, variable15) /*String::append*/;
- variable16 = ((lexer___PError___message_t)CALL( variable8 /*err*/,COLOR_lexer___PError___message))( variable8 /*err*/) /*PError::message*/;
- variable17 = variable16;
- ((string___String___append_t)CALL(variable9,COLOR_abstract_collection___IndexedCollection___append))(variable9, variable17) /*String::append*/;
- variable18 = NEW_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
- variable19 = variable18;
- ((string___String___append_t)CALL(variable9,COLOR_abstract_collection___IndexedCollection___append))(variable9, variable19) /*String::append*/;
- ((mmloader___ToolContext___error_t)CALL( variable0 /*context*/,COLOR_mmloader___ToolContext___error))( variable0 /*context*/, variable9) /*ToolContext::error*/;
- exit(UNTAG_Int( TAG_Int(1)));
+static const char LOCATE_syntax___SrcModuleLoader___parse_file[] = "syntax::SrcModuleLoader::(mmloader::ModuleLoader::parse_file)";
+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[7];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t REGB2;
+ 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 = 35;
+ fra.me.meth = LOCATE_syntax___SrcModuleLoader___parse_file;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 8;
+ fra.me.nitni_local_ref_head = NULL;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[3] = NIT_NULL;
+ fra.me.REG[4] = NIT_NULL;
+ fra.me.REG[5] = NIT_NULL;
+ fra.me.REG[6] = NIT_NULL;
+ fra.me.REG[7] = 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:37 */
+ fra.me.REG[6] = CALL_standard___string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
+ /* ../lib/standard/collection/array.nit:24 */
+ REGB0 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[6])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
}
- variable9 = ((parser_nodes___Start___n_base_t)CALL( variable7 /*node_tree*/,COLOR_parser_nodes___Start___n_base))( variable7 /*node_tree*/) /*Start::n_base*/;
- variable8 = variable9;
- variable9 = TAG_Bool(( variable8 /*node_module*/==NIT_NULL) || VAL_ISA( variable8 /*node_module*/, COLOR_AModule, ID_AModule)) /*cast AModule*/;
- if (!UNTAG_Bool(variable9)) { fprintf(stderr, "Assert%s failed (%s: %d)\n", "", LOCATE_syntax___SrcModuleLoader___parse_file, 45); nit_exit(1);}
- variable10 = NEW_syntax_base___MMSrcModule___init( variable0 /*context*/, variable8 /*node_module*/, variable4 /*dir*/, variable3 /*name*/); /*new MMSrcModule*/
- variable9 = variable10;
- variable5 = variable9 /*module*/;
- goto return_label1;
- return_label1: while(false);
- tracehead = trace.prev;
- return variable5;
+ REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[6]);
+ /* syntax/syntax.nit:37 */
+ REGB1 = TAG_Int(0);
+ REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
+ }
+ /* ../lib/standard/kernel.nit:237 */
+ REGB1 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(REGB1));
+ /* syntax/syntax.nit:37 */
+ if (UNTAG_Bool(REGB1)) {
+ fra.me.REG[6] = CALL_standard___string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
+ REGB1 = TAG_Int(0);
+ REGB1 = CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra.me.REG[6])(fra.me.REG[6], REGB1);
+ REGB1 = CALL_standard___kernel___Char___is_lower(REGB1)(REGB1);
+ } else {
+ REGB0 = TAG_Bool(0);
+ REGB1 = REGB0;
+ }
+ fra.me.REG[6] = REGB1;
+ /* syntax/syntax.nit:38 */
+ fra.me.REG[7] = CALL_standard___string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
+ CALL_standard___collection___abstract_collection___Collection___iterate(fra.me.REG[7])(fra.me.REG[7], (&(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:43 */
+ REGB1 = TAG_Bool(!UNTAG_Bool(fra.me.REG[6]));
+ if (UNTAG_Bool(REGB1)) {
+ /* syntax/syntax.nit:44 */
+ REGB1 = TAG_Int(5);
+ fra.me.REG[6] = NEW_Array_standard___collection___array___Array___with_capacity(REGB1);
+ if (!once_value_4) {
+ fra.me.REG[7] = BOX_NativeString("");
+ REGB1 = TAG_Int(0);
+ fra.me.REG[7] = NEW_String_standard___string___String___with_native(fra.me.REG[7], REGB1);
+ once_value_4 = fra.me.REG[7];
+ register_static_object(&once_value_4);
+ } else fra.me.REG[7] = once_value_4;
+ fra.me.REG[7] = fra.me.REG[7];
+ CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[7]);
+ CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[3]);
+ if (!once_value_5) {
+ fra.me.REG[7] = BOX_NativeString(": Error module name \"");
+ REGB1 = TAG_Int(21);
+ fra.me.REG[7] = NEW_String_standard___string___String___with_native(fra.me.REG[7], REGB1);
+ once_value_5 = fra.me.REG[7];
+ register_static_object(&once_value_5);
+ } else fra.me.REG[7] = once_value_5;
+ fra.me.REG[7] = fra.me.REG[7];
+ CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[7]);
+ fra.me.REG[7] = CALL_standard___string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
+ CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[7]);
+ if (!once_value_6) {
+ fra.me.REG[7] = BOX_NativeString("\", must start with a lower case letter and contain only letters, digits and '_'.");
+ REGB1 = TAG_Int(80);
+ fra.me.REG[7] = NEW_String_standard___string___String___with_native(fra.me.REG[7], REGB1);
+ once_value_6 = fra.me.REG[7];
+ register_static_object(&once_value_6);
+ } else fra.me.REG[7] = once_value_6;
+ fra.me.REG[7] = fra.me.REG[7];
+ CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[7]);
+ fra.me.REG[6] = CALL_standard___string___Object___to_s(fra.me.REG[6])(fra.me.REG[6]);
+ CALL_toolcontext___ToolContext___error(fra.me.REG[1])(fra.me.REG[1], NIT_NULL, fra.me.REG[6]);
+ }
+ /* syntax/syntax.nit:47 */
+ fra.me.REG[2] = NEW_SourceFile_location___SourceFile___init(fra.me.REG[3], fra.me.REG[2]);
+ /* syntax/syntax.nit:48 */
+ fra.me.REG[3] = NEW_Lexer_parser___lexer___Lexer___init(fra.me.REG[2]);
+ /* syntax/syntax.nit:49 */
+ fra.me.REG[3] = NEW_Parser_parser___Parser___init(fra.me.REG[3]);
+ /* syntax/syntax.nit:50 */
+ fra.me.REG[3] = CALL_parser___Parser___parse(fra.me.REG[3])(fra.me.REG[3]);
+ /* syntax/syntax.nit:51 */
+ fra.me.REG[6] = CALL_parser___parser_nodes___Start___n_base(fra.me.REG[3])(fra.me.REG[3]);
+ REGB1 = TAG_Bool(fra.me.REG[6]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ REGB0 = TAG_Bool(fra.me.REG[6]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ REGB0 = TAG_Bool(0);
+ REGB1 = REGB0;
+ } else {
+ REGB0 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[6])(fra.me.REG[6], NIT_NULL);
+ REGB1 = REGB0;
+ }
+ }
+ if (UNTAG_Bool(REGB1)) {
+ /* syntax/syntax.nit:52 */
+ fra.me.REG[6] = CALL_parser___parser_nodes___Start___n_eof(fra.me.REG[3])(fra.me.REG[3]);
+ /* syntax/syntax.nit:53 */
+ REGB1 = TAG_Bool(VAL_ISA(fra.me.REG[6], COLOR_parser___parser_nodes___AError, ID_parser___parser_nodes___AError)) /*cast AError*/;
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Assert failed", NULL, LOCATE_syntax, 53);
+ }
+ /* syntax/syntax.nit:54 */
+ fra.me.REG[0] = CALL_parser___parser_nodes___ANode___location(fra.me.REG[6])(fra.me.REG[6]);
+ fra.me.REG[6] = CALL_parser___lexer___AError___message(fra.me.REG[6])(fra.me.REG[6]);
+ CALL_toolcontext___ToolContext___fatal_error(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0], fra.me.REG[6]);
+ }
+ /* syntax/syntax.nit:56 */
+ fra.me.REG[3] = CALL_parser___parser_nodes___Start___n_base(fra.me.REG[3])(fra.me.REG[3]);
+ /* syntax/syntax.nit:57 */
+ REGB1 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ REGB0 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ REGB0 = TAG_Bool(0);
+ REGB1 = REGB0;
+ } else {
+ REGB0 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[3])(fra.me.REG[3], NIT_NULL);
+ REGB1 = REGB0;
+ }
+ }
+ REGB1 = TAG_Bool(!UNTAG_Bool(REGB1));
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Assert failed", NULL, LOCATE_syntax, 57);
+ }
+ /* syntax/syntax.nit:58 */
+ fra.me.REG[2] = NEW_Location_location___Location___with_file(fra.me.REG[2]);
+ /* syntax/syntax.nit:59 */
+ fra.me.REG[2] = NEW_MMSrcModule_syntax___syntax_base___MMSrcModule___init(fra.me.REG[1], fra.me.REG[3], fra.me.REG[5], fra.me.REG[4], fra.me.REG[2]);
+ /* syntax/syntax.nit:60 */
+ goto label7;
+ label7: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[2];
}
-void syntax___SrcModuleLoader___process_metamodel(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, LOCATE_syntax___SrcModuleLoader___process_metamodel, 52};
- val_t variable0;
- val_t variable1;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = param1;
- ((syntax___MMSrcModule___process_supermodules_t)CALL( variable1 /*module*/,COLOR_syntax___MMSrcModule___process_supermodules))( variable1 /*module*/, variable0 /*context*/) /*MMSrcModule::process_supermodules*/;
- ((syntax___MMSrcModule___process_syntax_t)CALL( variable1 /*module*/,COLOR_syntax___MMSrcModule___process_syntax))( variable1 /*module*/, variable0 /*context*/) /*MMSrcModule::process_syntax*/;
- tracehead = trace.prev;
+ void OC_syntax___SrcModuleLoader___parse_file_1(struct stack_frame_t *closctx, val_t p0, struct stack_frame_t *closctx_param, fun_t clos_fun0){
+ struct {struct stack_frame_t me;} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t REGB2;
+ fun_t CREG[1];
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_syntax;
+ fra.me.line = 0;
+ fra.me.meth = LOCATE_syntax___SrcModuleLoader___parse_file;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.nitni_local_ref_head = NULL;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.closure_ctx = closctx_param;
+ fra.me.closure_funs = CREG;
+ fra.me.REG[0] = p0;
+ CREG[0] = clos_fun0;
+ REGB0 = fra.me.REG[0];
+ REGB1 = CALL_standard___kernel___Char___is_digit(REGB0)(REGB0);
+ REGB1 = TAG_Bool(!UNTAG_Bool(REGB1));
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = CALL_standard___kernel___Char___is_letter(REGB0)(REGB0);
+ REGB1 = TAG_Bool(!UNTAG_Bool(REGB1));
+ } else {
+ REGB2 = TAG_Bool(0);
+ REGB1 = REGB2;
+ }
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Char('_');
+ REGB2 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB1));
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ /* ../lib/standard/kernel.nit:381 */
+ REGB1 = TAG_Bool((REGB0)==(REGB1));
+ /* syntax/syntax.nit:38 */
+ REGB2 = REGB1;
+ }
+ REGB2 = TAG_Bool(!UNTAG_Bool(REGB2));
+ } else {
+ REGB1 = TAG_Bool(0);
+ REGB2 = REGB1;
+ }
+ if (UNTAG_Bool(REGB2)) {
+ /* syntax/syntax.nit:40 */
+ REGB2 = TAG_Bool(0);
+ closctx->REG[6] = REGB2;
+ /* syntax/syntax.nit:41 */
+ closctx->has_broke = 1;
+ goto label2;
+ }
+ label2: while(0);
+ stack_frame_head = fra.me.prev;
+ return;
+ }
+static const char LOCATE_syntax___SrcModuleLoader___process_metamodel[] = "syntax::SrcModuleLoader::(mmloader::ModuleLoader::process_metamodel)";
+void syntax___SrcModuleLoader___process_metamodel(val_t p0, val_t p1, val_t p2){
+ struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
+ val_t REGB0;
+ val_t tmp;
+ static val_t once_value_1; /* Once value */
+ static val_t once_value_2; /* Once value */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_syntax;
+ fra.me.line = 63;
+ fra.me.meth = LOCATE_syntax___SrcModuleLoader___process_metamodel;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 4;
+ fra.me.nitni_local_ref_head = NULL;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[3] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[2] = p2;
+ REGB0 = TAG_Bool(VAL_ISA(fra.me.REG[2], VTCOLOR_mmloader___ModuleLoader___MODULE(fra.me.REG[0]), VTID_mmloader___ModuleLoader___MODULE(fra.me.REG[0]))) /*cast MODULE*/;
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Cast failed", NULL, LOCATE_syntax, 0);
+ }
+ /* syntax/syntax.nit:65 */
+ CALL_syntax___MMSrcModule___process_supermodules(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
+ /* syntax/syntax.nit:66 */
+ REGB0 = TAG_Int(3);
+ fra.me.REG[0] = NEW_Array_standard___collection___array___Array___with_capacity(REGB0);
+ if (!once_value_1) {
+ fra.me.REG[3] = BOX_NativeString("Syntax analysis for module: ");
+ REGB0 = TAG_Int(28);
+ fra.me.REG[3] = NEW_String_standard___string___String___with_native(fra.me.REG[3], REGB0);
+ once_value_1 = fra.me.REG[3];
+ register_static_object(&once_value_1);
+ } else fra.me.REG[3] = once_value_1;
+ fra.me.REG[3] = fra.me.REG[3];
+ CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]);
+ fra.me.REG[3] = CALL_metamodel___abstractmetamodel___MMModule___name(fra.me.REG[2])(fra.me.REG[2]);
+ fra.me.REG[3] = CALL_standard___string___Object___to_s(fra.me.REG[3])(fra.me.REG[3]);
+ CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]);
+ if (!once_value_2) {
+ fra.me.REG[3] = BOX_NativeString("");
+ REGB0 = TAG_Int(0);
+ fra.me.REG[3] = NEW_String_standard___string___String___with_native(fra.me.REG[3], REGB0);
+ 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] = fra.me.REG[3];
+ CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]);
+ fra.me.REG[0] = CALL_standard___string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
+ REGB0 = TAG_Int(2);
+ CALL_toolcontext___ToolContext___info(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0], REGB0);
+ /* syntax/syntax.nit:67 */
+ CALL_syntax___MMSrcModule___process_syntax(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
+ stack_frame_head = fra.me.prev;
return;
}
-void syntax___SrcModuleLoader___init(val_t self, int* init_table) {
- struct trace_t trace = {NULL, LOCATE_syntax___SrcModuleLoader___init, 58};
- trace.prev = tracehead; tracehead = &trace;
- if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_SrcModuleLoader].i]) return;
- init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_SrcModuleLoader].i] = 1;
- tracehead = trace.prev;
+static const char LOCATE_syntax___SrcModuleLoader___init[] = "syntax::SrcModuleLoader::init";
+void syntax___SrcModuleLoader___init(val_t p0, int* init_table){
+ int itpos0 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_syntax___SrcModuleLoader].i;
+ struct {struct stack_frame_t me;} fra;
+ val_t tmp;
+ if (init_table[itpos0]) return;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_syntax;
+ fra.me.line = 70;
+ fra.me.meth = LOCATE_syntax___SrcModuleLoader___init;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.nitni_local_ref_head = NULL;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ stack_frame_head = fra.me.prev;
+ init_table[itpos0] = 1;
return;
}
-val_t syntax___MMContext___tc(val_t self) {
- struct trace_t trace = {NULL, LOCATE_syntax___MMContext___tc, 62};
- trace.prev = tracehead; tracehead = &trace;
- tracehead = trace.prev;
- return ATTR_syntax___MMContext____tc( self) /*MMContext::_tc*/;
-}
-void syntax___MMContext___tc__eq(val_t self, val_t param0) {
- struct trace_t trace = {NULL, LOCATE_syntax___MMContext___tc__eq, 62};
- trace.prev = tracehead; tracehead = &trace;
- ATTR_syntax___MMContext____tc( self) /*MMContext::_tc*/ = param0;
- tracehead = trace.prev;
+static const char LOCATE_syntax___MMSrcModule___process_supermodules[] = "syntax::MMSrcModule::process_supermodules";
+void syntax___MMSrcModule___process_supermodules(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_syntax;
+ fra.me.line = 74;
+ fra.me.meth = LOCATE_syntax___MMSrcModule___process_supermodules;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 3;
+ fra.me.nitni_local_ref_head = NULL;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ /* syntax/syntax.nit:77 */
+ fra.me.REG[2] = CALL_syntax___syntax_base___MMSrcModule___node(fra.me.REG[0])(fra.me.REG[0]);
+ CALL_syntax___mmbuilder___AModule___import_super_modules(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1], fra.me.REG[0]);
+ stack_frame_head = fra.me.prev;
return;
}
-void syntax___MMSrcModule___process_supermodules(val_t self, val_t param0) {
- struct trace_t trace = {NULL, LOCATE_syntax___MMSrcModule___process_supermodules, 67};
- val_t variable0;
- val_t variable1;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = ((syntax_base___MMSrcModule___node_t)CALL( self,COLOR_syntax_base___MMSrcModule___node))( self) /*MMSrcModule::node*/;
- ((mmbuilder___AModule___import_super_modules_t)CALL(variable1,COLOR_mmbuilder___AModule___import_super_modules))(variable1, variable0 /*tc*/, self) /*AModule::import_super_modules*/;
- tracehead = trace.prev;
+static const char LOCATE_syntax___MMSrcModule___process_syntax[] = "syntax::MMSrcModule::process_syntax";
+void syntax___MMSrcModule___process_syntax(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_syntax;
+ fra.me.line = 80;
+ fra.me.meth = LOCATE_syntax___MMSrcModule___process_syntax;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 2;
+ fra.me.nitni_local_ref_head = NULL;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ /* syntax/syntax.nit:84 */
+ CALL_syntax___mmbuilder___MMSrcModule___do_mmbuilder(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
+ /* syntax/syntax.nit:85 */
+ CALL_toolcontext___ToolContext___check_errors(fra.me.REG[1])(fra.me.REG[1]);
+ /* syntax/syntax.nit:87 */
+ CALL_syntax___typing___MMSrcModule___do_typing(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
+ /* syntax/syntax.nit:88 */
+ CALL_toolcontext___ToolContext___check_errors(fra.me.REG[1])(fra.me.REG[1]);
+ /* syntax/syntax.nit:90 */
+ CALL_syntax___icode_generation___MMSrcModule___generate_icode(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
+ /* syntax/syntax.nit:91 */
+ CALL_toolcontext___ToolContext___check_errors(fra.me.REG[1])(fra.me.REG[1]);
+ /* syntax/syntax.nit:93 */
+ REGB0 = CALL_syntax___ToolContext___keep_ast(fra.me.REG[1])(fra.me.REG[1]);
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ if (UNTAG_Bool(REGB0)) {
+ CALL_syntax___syntax_base___MMSrcModule___clear_ast(fra.me.REG[0])(fra.me.REG[0]);
+ }
+ stack_frame_head = fra.me.prev;
return;
}
-void syntax___MMSrcModule___process_syntax(val_t self, val_t param0) {
- struct trace_t trace = {NULL, LOCATE_syntax___MMSrcModule___process_syntax, 74};
- val_t variable0;
- val_t variable1;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- ((mmbuilder___MMSrcModule___do_mmbuilder_t)CALL( self,COLOR_mmbuilder___MMSrcModule___do_mmbuilder))( self, variable0 /*tc*/) /*MMSrcModule::do_mmbuilder*/;
- variable1 = ((mmloader___ToolContext___error_count_t)CALL( variable0 /*tc*/,COLOR_mmloader___ToolContext___error_count))( variable0 /*tc*/) /*ToolContext::error_count*/;
- variable1 = TAG_Bool(UNTAG_Int(variable1)>UNTAG_Int( TAG_Int(0)));
- if (UNTAG_Bool(variable1)) { /*if*/
- exit(UNTAG_Int( TAG_Int(1)));
+static const char LOCATE_syntax___ToolContext___keep_ast[] = "syntax::ToolContext::keep_ast";
+val_t syntax___ToolContext___keep_ast(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_syntax;
+ fra.me.line = 98;
+ fra.me.meth = LOCATE_syntax___ToolContext___keep_ast;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.nitni_local_ref_head = NULL;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ /* syntax/syntax.nit:98 */
+ REGB0 = TAG_Bool(ATTR_syntax___ToolContext____keep_ast(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_keep_ast", LOCATE_syntax, 98);
}
- ((control_flow___MMSrcModule___do_control_flow_t)CALL( self,COLOR_control_flow___MMSrcModule___do_control_flow))( self, variable0 /*tc*/) /*MMSrcModule::do_control_flow*/;
- variable1 = ((mmloader___ToolContext___error_count_t)CALL( variable0 /*tc*/,COLOR_mmloader___ToolContext___error_count))( variable0 /*tc*/) /*ToolContext::error_count*/;
- variable1 = TAG_Bool(UNTAG_Int(variable1)>UNTAG_Int( TAG_Int(0)));
- if (UNTAG_Bool(variable1)) { /*if*/
- exit(UNTAG_Int( TAG_Int(1)));
- }
- ((typing___MMSrcModule___do_typing_t)CALL( self,COLOR_typing___MMSrcModule___do_typing))( self, variable0 /*tc*/) /*MMSrcModule::do_typing*/;
- variable1 = ((mmloader___ToolContext___error_count_t)CALL( variable0 /*tc*/,COLOR_mmloader___ToolContext___error_count))( variable0 /*tc*/) /*ToolContext::error_count*/;
- variable1 = TAG_Bool(UNTAG_Int(variable1)>UNTAG_Int( TAG_Int(0)));
- if (UNTAG_Bool(variable1)) { /*if*/
- exit(UNTAG_Int( TAG_Int(1)));
- }
- tracehead = trace.prev;
+ REGB0 = ATTR_syntax___ToolContext____keep_ast(fra.me.REG[0]);
+ stack_frame_head = fra.me.prev;
+ return REGB0;
+}
+static const char LOCATE_syntax___ToolContext___keep_ast__eq[] = "syntax::ToolContext::keep_ast=";
+void syntax___ToolContext___keep_ast__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_syntax;
+ fra.me.line = 98;
+ fra.me.meth = LOCATE_syntax___ToolContext___keep_ast__eq;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.nitni_local_ref_head = NULL;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ REGB0 = p1;
+ /* syntax/syntax.nit:98 */
+ ATTR_syntax___ToolContext____keep_ast(fra.me.REG[0]) = REGB0;
+ stack_frame_head = fra.me.prev;
return;
}