pike.git / src / docode.c

version» Context lines:

pike.git/src/docode.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: docode.c,v 1.201 2008/05/30 11:20:44 grubba Exp $ + || $Id: docode.c,v 1.202 2008/06/30 13:47:23 mast Exp $   */      #include "global.h"   #include "las.h"   #include "program.h"   #include "pike_types.h"   #include "stralloc.h"   #include "interpret.h"   #include "constants.h"   #include "array.h"
pike.git/src/docode.c:267:    struct compilation *c = THIS_COMPILATION;    emit0(F_POP_MARK);   }      static void do_pop_to_mark(void *ignored)   {    struct compilation *c = THIS_COMPILATION;    emit0(F_POP_TO_MARK);   }    + #ifdef PIKE_DEBUG   static void do_cleanup_synch_mark(void)   {    struct compilation *c = THIS_COMPILATION;    if (d_flag > 2)    emit0(F_CLEANUP_SYNCH_MARK);   } -  + #endif      static void do_escape_catch(void)   {    struct compilation *c = THIS_COMPILATION;    emit0(F_ESCAPE_CATCH);   }      #define DO_CODE_BLOCK(X) do_pop(do_docode((X),DO_NOT_COPY | DO_POP ))      int do_docode(node *n, int flags)
pike.git/src/docode.c:2313:    struct statement_label *p;    int in_catch = 0;    do_docode(CAR(n),0);       /* Insert the appropriate number of F_ESCAPE_CATCH. The rest of    * the cleanup is handled wholesale in low_return et al.    * Alternatively we could handle this too in low_return and    * then allow tail recursion of these kind of returns too. */    for (p = current_label; p; p = p->prev) {    struct cleanup_frame *q; -  for (q = p->cleanups; q; q = q->prev) +  for (q = p->cleanups; q; q = q->prev) {    if (q->cleanup == (cleanup_func) do_escape_catch) {    in_catch = 1;    do_escape_catch();    } -  + #ifdef PIKE_DEBUG +  /* Have to pop marks from F_SYNCH_MARK too if the debug level +  * is high enough to get them inserted, otherwise we'll get +  * false alarms from debug checks in e.g. POP_CATCH_CONTEXT. */ +  else if (d_flag > 2 && +  q->cleanup == (cleanup_func) do_cleanup_synch_mark) { +  /* Use the ordinary pop mark instruction here since we know +  * the stack isn't in synch and we don't want debug checks +  * for that. */ +  do_pop_mark (NULL);    } -  + #endif +  } +  }       emit0(in_catch ? F_VOLATILE_RETURN : F_RETURN);    return 0;    }       case F_SSCANF:    tmp1=do_docode(CDAR(n),DO_NOT_COPY);    tmp2=do_docode(CDR(n),DO_NOT_COPY | DO_LVALUE);    emit2(F_SSCANF, DO_NOT_WARN((INT32)(tmp1+tmp2)), CAAR(n)->u.sval.u.integer);    return 1;