diff --git a/dvm/fdvm/trunk/Sage/lib/include/libSage++.h b/dvm/fdvm/trunk/Sage/lib/include/libSage++.h index c2470f4..28b4cee 100644 --- a/dvm/fdvm/trunk/Sage/lib/include/libSage++.h +++ b/dvm/fdvm/trunk/Sage/lib/include/libSage++.h @@ -1774,6 +1774,7 @@ public: // added by A.S. Kolganov 02.07.2014, updated 21.12.2014 inline SgIfStmt(SgExpression &cond, SgStatement &body, int t); inline SgIfStmt(SgExpression &cond); + inline SgIfStmt(SgExpression* cond); // added by A.S. Kolganov 27.07.2018, inline void setBodies(SgStatement *trueBody, SgStatement *falseBody); @@ -6895,7 +6896,6 @@ inline SgLogIfStmt::~SgLogIfStmt() // SgIfStmt--inlines - inline SgIfStmt::SgIfStmt(int variant): SgStatement(variant) {} @@ -6916,6 +6916,13 @@ inline SgIfStmt::SgIfStmt(SgExpression &cond) : SgStatement(IF_NODE) addControlEndToStmt(thebif); } +inline SgIfStmt::SgIfStmt(SgExpression* cond) : SgStatement(IF_NODE) +{ + if (cond) + BIF_LL1(thebif) = cond->thellnd; + addControlEndToStmt(thebif); +} + inline SgIfStmt::SgIfStmt(SgExpression &cond, SgStatement &trueBody, SgStatement &falseBody, SgSymbol &construct_name):SgStatement(IF_NODE) { BIF_LL1(thebif) = cond.thellnd; diff --git a/dvm/fdvm/trunk/parser/sym.c b/dvm/fdvm/trunk/parser/sym.c index caa1bb6..54f9d8a 100644 --- a/dvm/fdvm/trunk/parser/sym.c +++ b/dvm/fdvm/trunk/parser/sym.c @@ -1839,10 +1839,13 @@ redefine_func_arg_type() } } for(arg = proc->entry.proc_decl.in_list; arg; arg=arg->entry.var_decl.next_in) - if (arg->type->variant == T_ARRAY) + if (arg->type->variant == T_ARRAY) arg->type->entry.ar_decl.base_type = impltype[*arg->ident - 'a']; else - arg->type = impltype[*arg->ident - 'a']; + { + if (*arg->ident - 'a' >= 0) + arg->type = impltype[*arg->ident - 'a']; + } } int