The R Project SVN R

Rev

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

Rev 14629 Rev 14631
Line 99... Line 99...
99
    R_ParseError = 0;
99
    R_ParseError = 0;
100
 
100
 
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 (c->callflag == CTXT_RESTART) {
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_DollarSymbol);
107
	}
107
	}
108
    }
108
    }
109
 
109
 
Line 436... Line 436...
436
 
436
 
437
    /* find the jump target; do the jump if target is a CTXT_RESTART */
437
    /* find the jump target; do the jump if target is a CTXT_RESTART */
438
    for (c = R_GlobalContext; c; c = c->nextcontext) {
438
    for (c = R_GlobalContext; c; c = c->nextcontext) {
439
	if (c->callflag == CTXT_RETURN || c->callflag == CTXT_GENERIC )
439
	if (c->callflag == CTXT_RETURN || c->callflag == CTXT_GENERIC )
440
	    nback++;
440
	    nback++;
441
	if (c->callflag == CTXT_RESTART) {
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_DollarSymbol);
444
	}
444
	}
445
	if (c->callflag == CTXT_TOPLEVEL)
445
	if (c->callflag == CTXT_TOPLEVEL)
446
	    break;
446
	    break;
Line 476... Line 476...
476
{
476
{
477
    RCNTXT *c;
477
    RCNTXT *c;
478
 
478
 
479
    /* find the jump target; do the jump if target is a CTXT_RESTART */
479
    /* find the jump target; do the jump if target is a CTXT_RESTART */
480
    for (c = R_GlobalContext; c; c = c->nextcontext) {
480
    for (c = R_GlobalContext; c; c = c->nextcontext) {
481
	if (c->callflag == CTXT_RESTART) {
481
	if (IS_RESTART_BIT_SET(c->callflag)) {
482
	    inError=0;
482
	    inError=0;
483
	    findcontext(CTXT_RESTART, c->cloenv, R_DollarSymbol);
483
	    findcontext(CTXT_RESTART, c->cloenv, R_DollarSymbol);
484
	}
484
	}
485
	if (c->callflag == CTXT_TOPLEVEL)
485
	if (c->callflag == CTXT_TOPLEVEL)
486
	    break;
486
	    break;
Line 709... Line 709...
709
	mask = CTXT_FUNCTION;
709
	mask = CTXT_FUNCTION;
710
 
710
 
711
    for (c = R_GlobalContext; c; c = c->nextcontext) {
711
    for (c = R_GlobalContext; c; c = c->nextcontext) {
712
	if (c->callflag & mask && c->cloenv == env)
712
	if (c->callflag & mask && c->cloenv == env)
713
	    findcontext(mask, env, val);
713
	    findcontext(mask, env, val);
714
	else if (restart && c->callflag == CTXT_RESTART)
714
	else if (restart && IS_RESTART_BIT_SET(c->callflag))
715
	    findcontext(CTXT_RESTART, c->cloenv, R_DollarSymbol);
715
	    findcontext(CTXT_RESTART, c->cloenv, R_DollarSymbol);
716
	else if (c->callflag == CTXT_TOPLEVEL)
716
	else if (c->callflag == CTXT_TOPLEVEL)
717
	    error("No function to return from, jumping to top level");
717
	    error("No function to return from, jumping to top level");
718
    }
718
    }
719
}
719
}
Line 722... Line 722...
722
{
722
{
723
    RCNTXT *c;
723
    RCNTXT *c;
724
 
724
 
725
    /* Find the target for the jump */
725
    /* Find the target for the jump */
726
    for (c = R_GlobalContext; c != NULL; c = c->nextcontext) {
726
    for (c = R_GlobalContext; c != NULL; c = c->nextcontext) {
727
	if (restart && c->callflag == CTXT_RESTART)
727
	if (restart && IS_RESTART_BIT_SET(c->callflag))
728
	    findcontext(CTXT_RESTART, c->cloenv, R_DollarSymbol);
728
	    findcontext(CTXT_RESTART, c->cloenv, R_DollarSymbol);
729
	else if (c->callflag == CTXT_TOPLEVEL)
729
	else if (c->callflag == CTXT_TOPLEVEL)
730
	    break;
730
	    break;
731
    }
731
    }
732
    if (c != R_ToplevelContext)
732
    if (c != R_ToplevelContext)