The R Project SVN R

Rev

Rev 14723 | Rev 14977 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 14723 Rev 14904
Line 101... Line 101...
101
    /* Bail out if there is a CTXT_RESTART on the stack--do we really
101
    /* Bail out if there is a CTXT_RESTART on the stack--do we really
102
       want this? */
102
       want this? */
103
    for (c = R_GlobalContext; c; c = c->nextcontext) {
103
    for (c = R_GlobalContext; c; c = c->nextcontext) {
104
	if (IS_RESTART_BIT_SET(c->callflag)) {
104
	if (IS_RESTART_BIT_SET(c->callflag)) {
105
	    inError=0;
105
	    inError=0;
106
	    findcontext(CTXT_RESTART, c->cloenv, R_DollarSymbol);
106
	    findcontext(CTXT_RESTART, c->cloenv, R_RestartToken);
107
	}
107
	}
108
    }
108
    }
109
 
109
 
110
    /* Run all onexit/cend code on the stack (without stopping at
110
    /* Run all onexit/cend code on the stack (without stopping at
111
       intervening CTXT_TOPLEVEL's.  Since intervening CTXT_TOPLEVEL's
111
       intervening CTXT_TOPLEVEL's.  Since intervening CTXT_TOPLEVEL's
Line 438... Line 438...
438
    for (c = R_GlobalContext; c; c = c->nextcontext) {
438
    for (c = R_GlobalContext; c; c = c->nextcontext) {
439
	if (c->callflag & CTXT_FUNCTION )
439
	if (c->callflag & CTXT_FUNCTION )
440
	    nback++;
440
	    nback++;
441
	if (IS_RESTART_BIT_SET(c->callflag)) {
441
	if (IS_RESTART_BIT_SET(c->callflag)) {
442
	    inError=0;
442
	    inError=0;
443
	    findcontext(CTXT_RESTART, c->cloenv, R_DollarSymbol);
443
	    findcontext(CTXT_RESTART, c->cloenv, R_RestartToken);
444
	}
444
	}
445
	if (c->callflag == CTXT_TOPLEVEL)
445
	if (c->callflag == CTXT_TOPLEVEL)
446
	    break;
446
	    break;
447
    }
447
    }
448
 
448
 
Line 480... Line 480...
480
 
480
 
481
    /* find the jump target; do the jump if target is a CTXT_RESTART */
481
    /* find the jump target; do the jump if target is a CTXT_RESTART */
482
    for (c = R_GlobalContext; c; c = c->nextcontext) {
482
    for (c = R_GlobalContext; c; c = c->nextcontext) {
483
	if (IS_RESTART_BIT_SET(c->callflag)) {
483
	if (IS_RESTART_BIT_SET(c->callflag)) {
484
	    inError=0;
484
	    inError=0;
485
	    findcontext(CTXT_RESTART, c->cloenv, R_DollarSymbol);
485
	    findcontext(CTXT_RESTART, c->cloenv, R_RestartToken);
486
	}
486
	}
487
	if (c->callflag == CTXT_TOPLEVEL)
487
	if (c->callflag == CTXT_TOPLEVEL)
488
	    break;
488
	    break;
489
    }
489
    }
490
    /* at this point we should have c == R_TopLevelContext */
490
    /* at this point we should have c == R_TopLevelContext */
Line 712... Line 712...
712
 
712
 
713
    for (c = R_GlobalContext; c; c = c->nextcontext) {
713
    for (c = R_GlobalContext; c; c = c->nextcontext) {
714
	if (c->callflag & mask && c->cloenv == env)
714
	if (c->callflag & mask && c->cloenv == env)
715
	    findcontext(mask, env, val);
715
	    findcontext(mask, env, val);
716
	else if (restart && IS_RESTART_BIT_SET(c->callflag))
716
	else if (restart && IS_RESTART_BIT_SET(c->callflag))
717
	    findcontext(CTXT_RESTART, c->cloenv, R_DollarSymbol);
717
	    findcontext(CTXT_RESTART, c->cloenv, R_RestartToken);
718
	else if (c->callflag == CTXT_TOPLEVEL)
718
	else if (c->callflag == CTXT_TOPLEVEL)
719
	    error("No function to return from, jumping to top level");
719
	    error("No function to return from, jumping to top level");
720
    }
720
    }
721
}
721
}
722
 
722
 
Line 725... Line 725...
725
    RCNTXT *c;
725
    RCNTXT *c;
726
 
726
 
727
    /* Find the target for the jump */
727
    /* Find the target for the jump */
728
    for (c = R_GlobalContext; c != NULL; c = c->nextcontext) {
728
    for (c = R_GlobalContext; c != NULL; c = c->nextcontext) {
729
	if (restart && IS_RESTART_BIT_SET(c->callflag))
729
	if (restart && IS_RESTART_BIT_SET(c->callflag))
730
	    findcontext(CTXT_RESTART, c->cloenv, R_DollarSymbol);
730
	    findcontext(CTXT_RESTART, c->cloenv, R_RestartToken);
731
	else if (c->callflag == CTXT_TOPLEVEL)
731
	else if (c->callflag == CTXT_TOPLEVEL)
732
	    break;
732
	    break;
733
    }
733
    }
734
    if (c != R_ToplevelContext)
734
    if (c != R_ToplevelContext)
735
	warning("top level inconsistency?");
735
	warning("top level inconsistency?");